Server Side Includes (SSI)
The web server supports server side includes. Specially formatted text will be replaced with dynamic data.
This feature is used in most of the example pages that come with AbelCam.
The included files have a .inc extension.
If you want to take advantage of these feature, have a look at the example files.
Enable SSI
By default SSI is enabled for all html documents.
If you want to save a few CPU cycles and parse html files with includes only, edit config.xml and
change
AutoSSI = True to
AutoSSI = False
If AutoSSI is disabled, only files with an extension of .shtml will be parsed for server side includes.
include files
- include a file from the local directory
<!--#include file="myfile.txt" -->
this will replace the above line with the contents of the file myfile.txt
- include a file from the webserver root
<!--#include file="/myrootfile.txt" -->
this will replace the above line with the contents of the file myrootfile.txt
include web pages
you can include any webpage in yours:
- <!--#include file="http://www.seiz.ch/ad.html" -->
this will replace the above line with the contents of the web page http://www.seiz.ch/ad.html
include commands
you can include commands in your web pages:
- <!--#include exec="dir c:\" -->
this will replace the above line with the directory listing
include vserver link
the build in Windows Media Server runs on a port unknown to the web page.
To include a link to the multimedia content,
use the vserver include:
- <!--#include vserver -->
this will replace the above line with the windows media server url (eg mms://localhost:8090)
include frame rates
- <!--#include framerate-capture -->
this will be replaced with the frame rate set for the cam device
- <!--#include framerate-stored -->
this will be replaced with the replay frame rate
include output size
- <!--#outputwidth -->
this will be replaced with the width of the selected cameras picture
- <!--#outputheight -->
this will be replaced with the height of the selected cameras picture
use this when you are switching camera output size some times and you don't want to change the web pages.
include capture folder
- <!--#capturefolder -->
this will be replaced with the local save path for the selected camera
include tuner
- <!--#include tuner -->
this will be replaced with the tuner channel control if a tv tuner is the active video device
See also the TV Tuner Wiki Page
include videoinputs
- <!--#include videoinput -->
this will be replaced with the video input control if a device with multiple video inputs is the active video device
include pdacams
- <!--#include pdacams -->
this will be replaced with links for all active cams to cam.html?cam=camnr
include random number
- <!--#random -->
this will be replaced with a random number, used for unique URLs to prevent browser side caching
include current time
- <!--#timenow -->
this will be replaced with the current time
include server name
- <!--#servername -->
this will be replaced with whatever you entered for your server name in the web configuration
include camera name
- <!--#camname -->
this will be replaced with whatever you entered for the camera name
include camera number
- <!--#currentcam -->
this will be replaced with the current camera number
include client statistics
- <!--#clientstats -->
this will be replaced with a table containing the client statistics
include country statistics
- <!--#countrystats -->
this will be replaced with a table containing the country access statistics if Show request country is enabled
no caching directive
- <!--#nocache -->
this will add cache defeating headers for this (html) file to prevent browser caching
include plugin links
- <!--#plugins -->
this will be replaced with the default links for all active plugins
include configuration
- <!--#config -->
this will be replaced with xml data containing information about all active cameras
includes for javascripting
- <!--#camarray -->
creates a javascript array with the active cams
- <!--#camnamearray -->
creates a javascript array with the names of the active cams
example taken from header.inc:
<script type="text/javascript"><!--
camArray = new Array();
<!--#camarray -->
camNameArray = new Array();
<!--#camnamearray -->
//--></script>
<script type="text/javascript" src="/include/functions.js?cam=<!--#currentcam -->"></script>
- <!--#videoinputarray -->
creates a javascript array with the configured video input channels
this is used in the file wwwroot\include\videoinputs.inc to create the URLs to select the video inputs
see also Device with multiple video inputs
conditional includes
For various features of AbelCam you can define conditional includes. Those will be included or excluded depending on which features of AbelCam are active.
Tilt/Pan Device
<!--#include start tiltpan -->
this will be shown if a tilt / pan device is active
<!--#include stop tiltpan -->
<!--#include start no tiltpan -->
this will be shown if no tilt / pan device not active
<!--#include stop no tiltpan -->
Show Pan / Tilt / Zoom Values
Pan:
<!--#pan -->
Tilt:
<!--#tilt -->
Zoom:
<!--#zoom -->
Zoom
<!--#include start zoom -->
this will be shown if Zoom Min is not equal Zoom Max
<!--#include stop zoom -->
<!--#include start no zoom -->
this will be shown if Zoom Min is equal Zoom Max
<!--#include stop no zoom -->
Chat
<!--#include start chat -->
this will be shown if chat is enabled
<!--#include stop chat -->
<!--#include start no chat -->
this will be shown if chat is disabled
<!--#include stop no chat -->
Video Server
<!--#include start videoserver -->
this will be shown if the Video Server is active
<!--#include stop videoserver -->
<!--#include start no videoserver -->
this will be shown if the Video Server is not active
<!--#include stop no videoserver -->
Tuner
<!--#include start tuner -->
this will be shown if the video device is a TV tuner
<!--#include stop tuner -->
<!--#include start no tuner -->
this will be shown if the video device is no TV tuner
<!--#include stop no tuner -->
Multiple Inputs
<!--#include start videoinput -->
this will be shown if the video device has multiple video inputs
<!--#include stop videoinput -->
<!--#include start no videoinput -->
this will be shown if the video device does not have multiple video inputs
<!--#include stop no videoinput -->
Motion detection / Local Save replay
<!--#include start replay -->
this will be shown if local save is active and replay count is > zero
<!--#include stop replay -->
<!--#include start no replay -->
this will be shown if local save is not active or replay count is <= zero
<!--#include stop no replay -->
Client Statistics
<!--#include start clientstats -->
this will be shown if client statistics are active
<!--#include stop clientstats -->
<!--#include start no clientstats -->
this will be shown if client statistics are not active
<!--#include stop no clientstats -->
<!--#include start countrydetect -->
this will be shown if Show request country is enabled
<!--#include stop countrydetect -->
<!--#include start no countrydetect -->
this will be shown if Show request country is not enabled
<!--#include stop no countrydetect -->
Camera Description
<!--#description --> shows the cameras descriptive text (html version). You may use this to include URLs to other pages, images, anything.
Current Time
<!--#timenow --> shows the current time
Plugins
<!--#plugins --> shows a link to all active
Web Plugins
to see all these examples in use, check out the html files delivered with AbelCam