MyWebServer
Home Free Downloads Docs FAQ's The Collective Community Tools Help About MyWebServer

MyWebServer |   Technical Info
 
  Virtual Page Overriding

Virtual Pages are dynamic pages that MyWebServer creates on the fly when ever they are requested. In contrast to normal static web pages which are html files that don't change at all and are sent by MyWebServer to a web browser when requested.

Here is a list of the Virtual Pages MyWebServer provides.

Favorites List Page - Contains the favorites list from your web browser.
Search Page - Lets users search for files through your published directories.
Download Page - Lets users Browse through your published directories for files to download.
Upload Page - Lets users upload files to a directory you specify. 
User List Page - Publishes a list of who has been on your server recently. 
Webmasters Page - Lets you easily check your messages, uploads and posts. 
Remote Administration Page - Lets you modify the server options and properties.
Virtual Toolbar Page - Allows you to easily include the MyWebServer Toolbar in your pages.

Virtual page overriding allows you to modify the way MyWebServer displays these pages by adding your own HTML fragments to the pages. Each page will have 4 possible opportunities for you to add HTML fragments. 

HTMLHeader Section
HTML fragments placed in this section of a page will appear in between the <HEAD> and </HEAD> tags of the page. This is where you would want to place scripts and styles etc.

Header Section
HTML fragments placed in this section of a page will appear at the top of the page somewhere after the <BODY> tag on the page. 

Body Section
HTML fragments placed in this section of a page will appear after the main content on the page and before the NavBar section of the page. 

Footer Section
HTML fragments placed in this section of a page will appear after the NavBar section of the page. 

Adding Your Own Sections To Virtual Pages
You add HTML fragments to any section of a Virtual Page by creating an override file and placing HTML fragments in the override file.

The first step would be to add a directory in your server root directory called MWS. This is where all override files are to be placed. You can create override files with any of the following file names. Just place some HTML fragments in a file, give the file one of the following names and they will be inserted into the page specified by the first part of the file name.


FileDownloadHeader.html
FileDownloadHTMLHeader.html
FileDownloadBody.html
FileDownloadFooter.html

FileUploadHeader.html
FileUploadHTMLHeader.html
FileUploadBody.html
FileUploadFooter.html

FileListHeader.html
FileListHTMLHeader.html
FileListBody.html
FileListFooter.html

FavoritesHeader.html
FavoritesHTMLHeader.html
FavoritesBody.html
FavoritesFooter.html

SearchHeader.html
SearchHTMLHeader.html
SearchBody.html
SearchFooter.html

HandleSearchHeader.html
HandleSearchHTMLHeader.html
HandleSearchBody.html
HandleSearchFooter.html

SendMessageHeader.html
SendMessageHTMLHeader.html
SendMessageBody.html
SendMessageFooter.html

HandleSendMessageHeader.html
HandleSendMessageHTMLHeader.html
HandleSendMessageBody.html
HandleSendMessageFooter.html

UserListHeader.html
UserListHTMLHeader.html
UserListBody.html
UserListFooter.html

HandlePostHeader.html
HandlePostHTMLHeader.html
HandlePostBody.html
HandlePostFooter.html

WebMasterHomeHeader.html
WebMasterHomeHTMLHeader.html
WebMasterHomeBody.html
WebMasterHomeFooter.html

Navigator.html
The Virtual Page Navigator.html is a virtual page that includes buttons to navigate to MyWebServers other virtual pages. You can get more info on including Navigator.html in your web pages by reading the article on using the Virtual Toolbar at:
https://mywebserver.org/us/help/techinfo/UsingTheVirtualToolbar.shtml

You can add your own HTML fragments to the MyWebServer virtual toolbar either above the toolbar or below the toolbar. To do this add your HTML fragments to a file and give it one of the following names. Remember to place the file in the MWS directory discussed above.

NavigatorBody.html  
NavigatorFooter.html

The difference between NavigatorBody.html and NavigatorFooter.html is that items in NavigatorBody.html Will appear above the Navigation Buttons and items in NavigatorFooter.html will appear after the Navigation Buttons.

Special Entries In The MyWebServer Configuration File
You can make entries in the MyWebServer Configuration file that can effect the look and style of MyWebServers built in application pages. The configuration file is named MyServer.ini and it is located in the same directory as MyWebServer.exe. You can add entries with the following names in the [Config] or [Server-2-Config] sections of the file.

vpPageProperties                A Page Properties String like: bgColor=#ff00ff
vpTableProperties               A Table Properties String like: BORDER=0
vpTHRowProperties               A Table Header Row Properties String like: bgColor=#66ccff
vpOddRowProperties              A Odd Row Number Properties String like: bgColor=#cbfad2
vpEvenRowProperties             A Even Row Number Properties String like: bgColor=#caeaff
vpNavBarBtnProperties           A Nav Bar Buttons Properties String like: target='_parent'
vpNavBarBtnImgProperties        A Nav Bar Buttons Image Properties String like: height='25' width='75'
vpEnablePageHeaders             A Enable Headers Properties String like: Y

Here are some example entries.

[Config]
vpPageProperties=bgColor=#ff00ff
vpTableProperties=BORDER=0
vpTHRowProperties=bgColor=#66ccff
vpOddRowProperties=bgColor=#cbfad2
vpEvenRowProperties=bgColor=#caeaff
vpNavBarBtnProperties=target='_parent'
vpNavBarBtnImgProperties=height='25' width='75'
vpEnablePageHeaders=Y

[ Home ] [ Downloads ] [ Docs ] [ FAQs ] [ The Collective ] [ Community ] [ Tools ] [ Help ] [ About ]