Plugins
Plugins are placed inside the "plugins" folder, each on its own subfolder, which is named after the plugin.
Plugins can be called from the content, using marker % !#plugin pluginame#! %, or (LNE 3 database or LNE 2.3 no database and up) from the template, using marker $#plugin pluginame#$.
Plugins consist of a set of files, placed inside the plugin folder: first.mod, header.mod, onload.mod, place.mod, include.mod, setup.mod.
- first.mod - code that is to be put at the very start of the page, just before <head>. Good for placing php functions, for example, or event related actions.
- header.mod - Code to be placed inside the header. It will be placed right before </head>. Good for placing javascript functions or CSS code.
- onload.mod - action to place at <body onload=".........">.
- place.mod - Code to be inserted as-is inside the content. Good for placing javascript code.
- include.mod - That file will be included inside the content. That is the only way to execute php code inside yout content. As the code is included, you can use LightNEasy global variables or call functions included in common.php and runtime.php.
- setup.mod - For executing the setup of the plugin. If present, LightNEasy will include a setup icon for that plugin in the plugin administration page.
The dropdown plugin, available for download, is a good example that you can use to learn how to make a LightNEasy plugin.
Note: a plugin can consist of just one file or all the files above. LightNEasy will check for their existence and use them if present.