Technical Manual
LightNEasy basic files
LightNEasy consists basically of 5 php files, a css file, and a few third party products besides the wysiwyg editor..
The third party products are TinyMCE, the WYSIWYG editor, preg_find, a function to read and sort directories, thumbsup for displaying thumbnails, litebox, a javascript for displaying images and seccode, a script that generates the catchpa image and provides a way to validate the input, and dewplayer, a flash mp3 player.
The 5 LightNEasy main files are inside the LightNEasy subfolder and are:
- lightneasy.php - the core of the CMS.
- runtime.php - contains the functions used by the generated pages. After you generate the pages, lightneasy.php is no longer used by the generated pages. The login link, however, points to it.
- common.php - contains the functions used by both lightneasy.php and runtime.php
- admin.php - contains the functions used only when you are logged in. It is not included if you are not logged.
- rss.php - generates a RSS feed to the news module.
- install.php - creates the folders data, galeries, downloads and plugins, creates and populates the database or the data files depending on the version.
Inside the css folder, you can find the file lightneasy.css. This CSS contains the classes used by LightNEasy to display its content, like the news module and the contact form.
LightNEasy is started through 2 identical files which are in the root of your website: index.php and LightNEasy.php. The reason why there are 2 identical start files is that index.php is to be overwritten when LightNEasy generates the pages. LightNEasy.php remains so that you can call it directly (usually, you don't need to, the login link takes you back to LightNEasy).
The content of these 2 files, for all LightNEasy versions, is:
include('./LightNEasy/lightneasy.php');
?>
Folder Structure:
After a successfull install, a LightNEasy website will have the following folder structure:
- css - contains lightneasy.css and also the css files used by litebox. Attribute 755.
- data - Atribute 755 if install manages to create it. If you had to create the folder by yourself, its attributes must be set to 777:
- SQLite version: contains pages.db, the database file.
- no database version: contains config.php, menu.dat, which contains the menu structure, linkcat.dat, newscat.dat and downloadcat.dat with a default general category for links, news and downloads, one html file for each page. LightNEasy will also eventually create the files news.dat, links.dat, downloads.dat and comments.dat.
- downloads - the folder to where the files to download will be uploaded. Attribute 755.
- galeries - the folder that will contain the gallery images. Each gallery will be one subfolder. Attribute: 777.
- images - contains the images used by LightNEasy and litebox, as well as the images uploaded by the user to include in the content of the pages. This folder contains the file image_list.js, which contains the list of the images uploaded by the user (not the gallery images). Both the folder and image_list.js must be set to 777.
- js - the folder to place javascripts. Litebox is there, as well as the flash mp3 player.
- languages - the folder containing the language files. The default install includes only the english language file.
- LightNEasy - contains the LightNEasy files install.php, lightneasy.php, runtime.php, common.php, admin.php and the third party files preg_find.php, thumbsup.php and seccode.php.
- plugins - the folder to place LightNEasy plugins, one in each subfolder.
- templates - the folder containing the templates. LightNEasy template is the default one, and should never be deleted, because LightNEasy defaults to it if it finds a template file missing.
- tiny_mce - the TinyMCE wysiwyg editor.
- root folder - will contain only the files index.php and LightNEasy.php. The generated pages will be placed here, and index.php will be overwritten, so LightNEasy must have write access to this folder.