<p><strong><font face="Verdana"></font></strong></p>
<h2><font face="Verdana">Table of Contents</font></h2>
<ol>
    <li><font face="Verdana">Introduction </font></li>
    <li><font face="Verdana">Adding Modules </font></li>
    <li><font face="Verdana">Creating Modules </font></li>
    <li><font face="Verdana">Changing the main Splash Screen </font></li>
    <li><font face="Verdana">Creating a Skin </font></li>
    <li><font face="Verdana">Sharing your modules / skins / splash screens </font></li>
</ol>
<h2><font face="Verdana">Introduction</font></h2>
<p><font face="Verdana">Lemon CMS is a very simple to use content management system.&nbsp; It uses a flat file system which makes it easy to configure and port into any existing website or to any new website.&nbsp; </font></p>
<p><font face="Verdana">This documentation details the steps that can be taken to further customize your copy of Lemon CMS.&nbsp; The instructions detailed in this document are <strong><em>NOT</em></strong> neccessary to get your copy of Lemon CMS up and running, these are additional steps that can be taken to further customize your&nbsp;CMS by adding modules or creating&nbsp;skins for it.&nbsp;&nbsp;They should only be taken if you&nbsp;are interested in changing the look of your Lemon CMS or to add additional modules.&nbsp; For instructions on setting up Lemon CMS into your site please refer to <em>readme.htm.</em></font></p>
<p><font face="Verdana"></font></p>
<h2><font face="Verdana">Adding Modules</font></h2>
<p><font face="Verdana">As of Lemon CMS v1.1.0&nbsp;you now have the ability to snap-in modules into the CMS.&nbsp;&nbsp;Adding a module is very simple whether the module is created specifically to be used with Lemon CMS or you wish to port an existing PHP script&nbsp;into Lemon CMS.&nbsp;&nbsp;</font></p>
<p><font face="Verdana">To add a module created for Lemon CMS,&nbsp;simply&nbsp;copy the module into a sub-directory in&nbsp;your <em>lemon_includes/modules/</em> directory.&nbsp;Now simply refresh your browser window,&nbsp;if the module was properly created&nbsp;you will notice it has appeared in your menu.</font></p>
<p><font face="Verdana">If you wish to de-activate a module so that it does not display in the CMS menu simply open the <em>.mod</em> file for that module and change the 4th line&nbsp;from a 1 to a 0.&nbsp; If you wish to reactive a disabled module simple change the 4th line in the .mod file back to a 1.&nbsp;&nbsp;</font></p>
<p><font face="Verdana">To remove a module&nbsp;completely simply delete the&nbsp;.mod file and directory from your <em>lemon_includes/modules</em> directory for the module you wish to remove.&nbsp;&nbsp;</font></p>
<h2><font face="Verdana">Creating&nbsp;Modules</font></h2>
<p><font face="Verdana">Creating&nbsp;a module is simple and requires two steps :</font></p>
<ol>
    <li><font face="Verdana">Create a <em>.mod</em> file to configure your module in <em>lemon_includes/modules/</em> </font></li>
    <li><font face="Verdana">Create a sub-directory in <em>lemon_includes/modules/</em> and copy your module in there </font></li>
</ol>
<p><font face="Verdana">Both the directory and the .mod file should have the same name eg <em>preferences.mod </em>and <em>preferences</em>.&nbsp;</font></p>
<h3><font face="Verdana">Step 1: Creating and configuring a <em>.mod</em> file</font></h3>
<p><font face="Verdana">In the directory <em>lemon_includes/modules/&nbsp;</em> simply create a file&nbsp;with the extension <em>.mod</em>. The first 4 lines of data in .mod file&nbsp;are used to setup the configuration of your module.&nbsp;&nbsp; </font></p>
<p><font face="Verdana">Line 1 = The sub-directory that the module is housed in<br />
Line 2 = The display title of the module as it will appear in the CMS Menu<br />
Line 3 = A short description of the module which will be used as the title HTML tag in the menu display<br />
Line 4 = Module Status.&nbsp; 1 = On, 0 = Off.</font></p>
<p><font face="Verdana">Everything after line 4 is omitted.&nbsp; This space can be used for a full description of what the module does and how to configure it.</font></p>
<p><font face="Verdana">A preferences module is included with this distribution which can be used as an example.</font></p>
<h3><font face="Verdana">Step 2:&nbsp;Creating&nbsp;a module for Lemon CMS</font></h3>
<p><font face="Verdana">Create a directory under <em>lemon_includes/modules/&nbsp;</em> that will house your module (make sure that this directory has the same&nbsp;name you specified in the .mod file).&nbsp;&nbsp;Give it a logical name so that it is easy to identify.&nbsp; </font></p>
<p><font face="Verdana">Lemon CMS will look for index.php in your module directory.</font></p>
<p><font face="Verdana">The main thing to&nbsp;remember is <strong><em>NOT</em></strong>&nbsp; to use echo or print, instead&nbsp;store all string data in the variable $content.</font></p>
<p><font face="Verdana">Constants used in Lemon CMS are defined in the lemon_includes/config.php file and they are<br />
&nbsp;<br />
_PATH &nbsp;&nbsp;the root path where Lemon CMS is stored<br />
</font><font face="Verdana">_PATHCONTENT the root directory of where your website is stored<br />
_URL&nbsp; &nbsp;&nbsp;the URL to Lemon CMS base directory<br />
_URLCONTENT &nbsp;the URL to where&nbsp;your website is stored<br />
<br />
Config variables are also stored in the lemon_includes/config.php file and they are<br />
<br />
$FILETYPES['editable'] &nbsp; &nbsp;&nbsp;Filetypes that can load in the editor<br />
$FILETYPES['notuploadable']&nbsp;&nbsp;Files that cannot be uploaded via the CMS<br />
$FILETYPES['DefaultExtension']&nbsp;The default extension added to files created in the CMS.&nbsp; Include the &quot;.&quot;.&nbsp; For no default extension <br />
<br />
$CONFIG['skin'] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The skin used in the CMS.<br />
$CONFIG['modules']&nbsp;&nbsp;&nbsp;&nbsp;If Modules should be active or not.<br />
<br />
To use the config variables you must first make them global by including the following statements :<br />
&nbsp;global $FILETYPES;<br />
&nbsp;global $CONFIG;<br />
<br />
This is not neccessary for constants as constants are defined as super globals in PHP</font></p>
<p><font face="Verdana">You can use the preferences module as an example.</font></p>
<p><font face="Verdana">If you have an existing script you wish to use in the CMS adding it should be as simple as creating a .mod file, converting all echo/print commands and verifing the paths are correct.</font></p>
<h2><font face="Verdana">Creating a Skin for Lemon CMS</font></h2>
<p><font face="Verdana">As of Lemon CMS 1.10 you have the ability to skin the CMS. If you have&nbsp;some knowledge of CSS this is a simple task.</font></p>
<p><font face="Verdana">Skins are stored in <em>lemon_includes/templates/skins/</em>.&nbsp; </font></p>
<p><font face="Verdana">Create a directory for your skin in <em>lemon_includes/templates/skins/</em>&nbsp;giving it a&nbsp;logical name.&nbsp; Copy over&nbsp;the default skin directory to use as a template and edit it as you wish.</font></p>
<p><font face="Verdana">If you have the preferences module turned on (as it is by default) your new skin will automatically be selectable from the preferences module.&nbsp; If you would like to set your new skin to the default skin for Lemon CMS simply modify your <em>lemon_includes/config.php</em> to load the new skin by default.</font></p>