Custom Content Plugin
By default Virtual Radar Server does not let you modify the web site that it creates. If you modify the site then it will refuse to serve the modified files.
The Custom Content Plugin lets you customise the web site that Virtual Radar Server creates by injecting content into the site or by replacing any or all of the web site's files.
Download and installation
The Windows installer for the plugin can be downloaded from the download page. Close Virtual Radar Server before running the installer. When the installer asks for the installation location select the same folder that you installed Virtual Radar Server into.
Run Virtual Radar Server and click
Tools | Plugins. You will be shown a list of all installed plugins:
Options button to bring up the configuration screen:
If this button is not ticked then the plugin will not modify the site created by Virtual Radar Server.
This button, when clicked, creates a new "Inject into HTML" entry.
This button, when clicked, deletes the selected "Inject into HTML" entry.
The Custom Content plugin lets you inject content into any HTML file in the Virtual Radar Server web site. The content is stored in a file on your computer. Enter the full path and filename of that file here.
Do not store your custom content files in the Virtual Radar Server's program files folder. It could be erased by the installer when you next update Virtual Radar Server.
The content of the file must be valid HTML.
At / Of
These two dropdowns control where your file will be injected into the HTML. You can inject content into the START or END of the HEAD or BODY of the HTML.
Enter the address of the HTML file that you want to inject content into. You can enter an asterisk (*) for the address, in which case your content will be injected into every HTML file served by Virtual Radar Server.
Addresses are from the root of the site, so /Desktop.html will inject the content into the desktop map page, /Mobile.html will inject content into the mobile map page and so on.
The addresses are not case sensitive.
Site root folder
If you enter the full path to a folder on your computer here then the web server will look in this folder for files to serve before it looks in the standard web folder. This means that you can use this folder to supply your own versions of the files that are in the standard web site, or add new files to the site.
Do not store your web content in Virtual Radar Server's program folder. It could be erased the next time that you run the Virtual Radar Server installer.
Resource images folder
Older versions of Virtual Radar Server would store all of the site's images in a resources file, they were compiled into the executable.
This pratice has largely stopped, most of the images are now served from files that you can override. However there are some exceptions to this, most notably the iPhone and iPad splash screen images.
You can override resource images by creating a folder and entering the full path to that folder here. Any images in the folder that have the same name and format as the resource image will be served in place of the resources image. You should try to keep the same dimensions as the original image if possible.
The full set of resource images can be found in source control:
How To …
Change the site's settings
Hook the site's events
Replace the site's files
The Custom Content plugin can only be used to modify the site that is served from the Web folder under Virtual Radar Server's program folder. It cannot be used to:
- Inject content into files that are served from resources - specifically the old web site files (e.g. GoogleMap.html, iPhone.html etc.)
- Override content that is served from resources.
- Inject into or change content that is created by a plugin unless the plugin is serving files from disk.