# DEVELOPER'S GUIDE

1. Requirements
2. Directories
3. Coding standards
4. Add new options in the menu
5. Add new links in the header
6. Add new tabs in the administration interface

1. ## Requirements

   If you modify POSH, do not forget to submit your changes to give us chance to improve the POSH tool to the community. For that, contact us on http://www.portaneo.net

2. ## Directories

   Directories usages :
   - admin : PHP pages and scripts that manage the admin interface
   - cache : XML caches of the application informations (modules, categories, ...)
   - images : All the pictures used in the application (except modules' ones)
   - includes : All the javascript files and PHP includes
   - l10n : Language files
   - modules : modules used in the application
   - cache : rss modules caches
   - external : pictures and scripts used by modules
   - pictures : icons of the modules
   - quarantine : temporary folder used by tutorial for users module creation
   - portal : PHP pages and scripts php that manage the main pages
   - styles : All the css files of the application
   - tools : Tools used by the application (rss parser, ...)
   - tutorial : PHP pages and scripts that manage the tutorial

3. ## Coding standards

   All the PHP pages must call includes/session.inc.php and previously define the variables $not_access (1 : the user must be connected to open this page, 0 : the user is not connected) et $granted ("A": grant access only for admin users, "I": grant access only for connected POSH users).
   To access the database, use the class "connection" of the file includes/connection.inc.php.
   You can add new javascript / php functions through plug-ins. See "test" plug-ins as an example.

4. ## Add new links in the header

   To add new links in the portals header (next to "connection link") :
   - Modify the "headlinks" parameter of the "adm_config" table, by adding new link just like the existing ones (fct: function called (type link(\"your_link\") for an hyperlink), label: name displayed, img:pictures of the link, comment:text displayed on mouseover, anonymous: is the option available on the homepage?, connected: is the option available on the personal portals). Links are sorted the same way in "adm_config" and in the portals.
   - From admin interface, Submit the "general settings" to re-generate the includes/config.js. file

5. ## Add new tabs in the administration interface

   - Create your PHP files in the admin/ folder
   - Add the new tabs in the "adm_tabs" table :
     name : tab id label : tab title type : type 4 param : name of the PHP file that opens when we click on the tab

And don't forget to become a POSH contributor by sending us your developments !