Built-in Functions
Contentor has several built-in functions (or functionalities), such as the page editor, the calendar and the ability to browse folders on the server.
Program Logic:
Normally, when a URL is entered, the program 'index' looks first in the database to find a matching page. For example, with the URL http://contentor.net/index/tips, this index program will do a case-insensitive search in the database for entries (sections) with the name '/tips' (it will find '/Tips' and/or '/TIPS'). If nothing is found in the database, it will attempt to execute a program if the page is named 'show/', 'calendar', 'members/', 'edit/', or 'index' if the file can be found in the home folder of the site's server ('show' if the optional photo viewer and 'members' is the forthcoming members listing module).
If the requested page is not found in the database, and is not one of the above programs, the index program will attempt to list the files in a folder with that name in the site's '_localRoot' folder (see http://contentor.net/demo/index/images to see the contents of the demo program's 'images' directory).
If the requested page name is a file that exists on the server, it will attempt to display that file. Known file types include the following file extensions:
Display:
'.jpg', '.gif', '.png', '.bmp', '.txt'
Browse to:
'.php', '.htm', '.html'
Embed in page:
'.pdf', '.swf', '.mp3', '.mpg', '.ppt', '.mid'
For embedded files, the appropriate player/viewer must be installed on the user's computer. A direct link is provided for saving the file to the user's local drive.
The case-sensitivity of file names is dependant on the operating system of the server. Most Unix-type systems (Linux, BSD, etc) are case sensitive, i.e. 'file' is not the same as 'File'.
On Windows systems, 'file' and 'File' would refer to the same file.
Overriding these built-in functions
By creating a page in the data base, you can override the built-in function. pointing your browser to http://contentor.net/edit/calendar would attempt to edit a page in the database called '/calendar'. If you created that page, any attempt to reach the calendar via http://contentor.net/index/calendar would result in the page from the database being displayed instead of the built-in calendar (you could still reach the built-in calendar directly via http://contentor.net/calendar).
In the same way, the browsing of a folder could be prevented by creating a page of the same name in the database. For example, if you log into the demo system and create a page called 'images', the demo image directory could not be viewed (until the demo database was reset). This would be useful for temporary maintenance, etc.
Note that file folder browsing can also be disabled by putting an index file in the folder. The '/util' folder has such an index file that kicks the browser back to the home page of the site.