e107 Wiki: English | Русский | Deutsch | Français | Magyar | Português | Български | Česky | Nederlands | Ελληνικά | Italiano | Norske | Polska | Slovenščina | Español | Svenska | Translate: Wiki | Page
Adding your own include code to every page via class2.php
A plugin module - also called addon in the core - is a piece of code that will be automatically loaded via
Plugin authors may wish to do this for a number of reasons.
As of e107 v0.7.6, this is accomplished by simply adding an e_module.php file to your plugin folder.
Your plugin will then be registered as a module. Any plugin that has registered itself as a module just needs to place an e_module.php in it's root directory. class2.php will auto-detect this file and execute the code within in at each page load.
The e_module.php files will be run through a require_once() just after the init_session() function. So all e107 variables and user information will be available in your e_module.php
NOTE: Your plugin has to be installed in order for it to register a module. 0.7.6 includes a plugin-scanner in admin->database->Scan plugin directories to register recent plugins' changes.