Patrick's CMS


Version updates

When updating the system to a new version make sure the version number [1.0 etc] and cookie [supermicro] are updated in:

readme.txt (version)
/inc/top.php (cookie) maybe
/admin/text/index.txt (version)
/admin/setup.php (version)
/admin/footer.php (version)
/admin/top.php (cookie) maybe

Date all updated stylesheets.

Direct access to files

Preventing system files from being directly accessed in a browser can be done with .htaccess, but that won't work on a Windows server. This CMS therefore uses another method.

Every 'included' file in the /inc/ folder contains at the top:

if(!defined('ACCESS')) {
  die('Direct access not permitted.');

This should mean that unless ACCESS is defined, if the files are viewed in a browser the only thing shown is "Direct access not permitted." Access is permitted by defining ACCESS with:

define('ACCESS', TRUE);

... in any file with a PHP 'include' or 'required' – those are e.php, s.php and /inc/html.php.

Break points (default theme)

stylesheet.css applies to screen widths of 798px and over, which corresponds to the column width of 740px + 20px margins each side + 18px for a scrollbar. If the window is minimised to side margins less than 20px mobile.css kicks in and the column becomes flexible but then with 16px side margins plus the scrollbar. The only exception is paragraph class "w" which has side margins of zero to allow content such as images to extend right across.

mobile.css has an additional break point for when the screen width is over 640px and which affects font sizes, the bottom navigation bar and the width of the search box.


Page last modified: 03 December, 2022