Settings


The Simple Website Manager requires a file that defines the directories and options for its operation. This file must be locaed in src/settings.php unless you edit the index.php script to place it somewhere else. The following variables are set in the settings.php script.

Variable Default Usage
$baseweb URL of the website used to construct URLs relative to the website
$rooturl URL of this web Used to reference this website. If the website is a sub-area this will point to the location of the index.php file for the sub-area. For the main web, this should be the same as $baseweb.
$rootdir index.php directory Sets the root file system directory for this web. This should be the directory where index.php is located. This value is usually set in the index.php file before loading settings.php. However, you can change it if appropriate.
$pagedir $rootdir/pages Contains the content pages and table of contents (TOC) files
$uplddir $rootdir/uploads Generic file upload directory. This is the default location used by the upload.html form.
$imgsdir $rootdir/images Directory for image file
$sndsdir $rootdir/sounds Directory for sound and other media files
$datadir $rootdir/data Location of the user accounts/passwords file. If possible, this directory should be located above the website root. For example, if the website main directory is /usr/website/myweb, the data directory can be placed at /usr/website/data so that it cannot be reached with a URL reference. This helps keep the information secure.
$srcdir $rootdir/src Directory containing the simple website mangager scripts.
$styldir $rootdir/styles Directory for alternate style sheets. The root directory contains the style sheet in use (style.css). You can modify the head.php script to select a style sheet on a per-user or site basis.
$mceurl $rooturl/tiny_mce URL, relative or absolute, for the TinyMCE editor script.
$siteTitle none The website title. This will be put in the title tag of the page head.
$siteDesc none Description of the website. Mainly used for RSS feeds.
$keywords none Keywords to be placed in a meta tag on each page. Separate each keyword with a comma.
$copyright none Copyright notice to be placed on the footer.
$userXML true Set this to true if you want to store user information in an XML file. Set to false otherwise.
$userTXT false Set this to true if you want to store user information in a text file. Set to false otherwise.
$tocXML true Set this to true if you want to store table of contents in an XML file. Set to false otherwise.
$tocTXT false Set this to true if you want to store user information in an XML file. Set to false otherwise.
$editfancy true Set this to true to use the TinyMCE editor for pages.
$rsscount 10 Number of items to send when a RSS feed request is made.
$showStuff true

Associative array indicating which parts of the layout should be displayed. The keys for the array are

  • banner => show/hide the banner area
  • footer => show/hide the footer area
  • lside => show/hide the left sidebar
  • rside => show/hide the right sidebar
  • login => show/hide the login form

Set the element true to show an area and false to hide it.

If you don't set either userTXT or userXML true, a file containing the admin password is used. The login name is ignored.

If you don't set either tocTXT or tocXML true, the directory listing of the pages directory is used. Page titles are stored individually in files named page.title.

Dan's Web Site