Plugins

All content comes from plugins, running from the plugins directory.

If you are a developer who wants to implement a new plugin, the file.php plugin is the simplest possible example. Each plugin class must implement a function named getContent whose returned output is a fragment of HTML, returned to the main routine dirCrawler.class.php. Examine a function named doBlocksXML in dirCrawler.class.php to see how and where the getContent($this) function is called, for each plugin specified in this page's XML file. Examine the contents of the layouts directory to see examples of layout definitions.

Classes are matched to their respective HTML block elements in the current layouts/className.xml layout file. The default layout file (if no other layout XML is specified) is layouts/robo.xml
In the robo.xml example below each block element has an ID and a SRC attribute, where the id maps that block to the appropriate CSS and the src maps that block to the right plugin class in the plugins directory. Blocks whose src is "container" are the only blocks that do not execute code. Containers simply contain other blocks.

In the example below the division whose id is "hbanner" invokes the plugins/file.php class to generate the right content. Further details about the file.php plugin can be found in documentation for the file.php plugin.

Every website has a default layout defined in conf/globals.ini

The defalt default is robo.xml. But it doesn't have to be.
In the robo.xml example below, on a typical website most (but not all) layouts vary from the default layout only in the <div id="main-content"> section.

Each layout specifies which plugins, css files and (optionally) which js files are needed to make this layout run.

Sample robo.xml