Extension Modules
General Information
Extension modules can extend the functionality of single site modules. An extension module always fits a specific site module to be executed and used there. It may change navigation/permission entries and much more, depending on the module. Extension modules extend the functionality of existing site modules without editing the site module's code itself.
Developer Information
- Max 16 characters for module name (
RNAME
). - Start name with "ext" (e.g.,
extnote
). - No special chars in module folder name or rname, starting underscore is dedicated to official modules.
Installation
Method 1: Store
- Login to the Administrator Site Module.
- Navigate to "Extensions".
- Download the desired extension through the web interface in the "Store".
- Activate the desired downloaded extension.
Method 2: Upload
- Login as Administrator or privileged user in the administrator module.
- Navigate to "Extensions".
- Upload the extension's .zip file.
- Activate the desired extension.
Method 3: Manually
- Login to your web server with FTP/SFTP.
- Unpack the required extension modules folder.
- Move the extracted folder to the
_data/SITEMODNAME/_extension/EXTNAME
directory. - The extension is activated automatically if moved inside that folder.
Available Variables
If an extension script is loaded, mostly you will have dynamic variables for you to get your extension modules information.
Variable Name | Description |
---|---|
$object["extension"]["info"] | Version File Loadup in this Variable |
$object["extension"]["path"] | Full Path to extension |
$object["extension"]["name"] | Name of the extension |
$object["extension"]["prefix"] | Prefix for MySQL or Redis |
$object["extension"]["cookie"] | Cookie/Session Prefix |
$object["extension"]["prefix_variables"] | Prefix for Variables of all kind |
$object["extension"]["lang"] | Language Object for this Extension |
Folder Structure
Organize your site module extensions ZIP file as follows. Replace RNAME
with your module name. See inside folders readme.md for some more information.
_admin
Scripts to be injected into the _administrator module.
./RNAME/_admin/
├── mod_setting.php (Module Settings for Admin Module)
├── mod_nav.php (Module Navigation for Admin Module)
├── mod_site.php (Module Site for Admin Module)
├── mod_permission.php (Module Permissions for Admin Module)
├── mod_topbar.php (Module Topbar Injection for Admin Module)
├── index.php (Prevent Directory Listing)
├── README.md (Readme file with Folder Informations)
_config
Configuration to be injected at site module initialization.
./RNAME/_config/
├── config_pre.php (Pre-startup configuration)
├── config_post.php (Post-startup configuration)
└── config.php (Main configuration file)
├── index.php (Prevent Directory Listing)
├── README.md (Readme file with Folder Informations)
_cron
Store your code for cronjobs in this folder!
./RNAME/_cron/
├── cron.example.php (Example Cronjob File)
├── .. (Store your other integrated cronjobs here.)
├── index.php (Prevent Directory Listing)
├── README.md (Readme file with Folder Informations)
_css
Store your css code in this folder!
./RNAME/_css/
├── css.example.php (Example CSS File)
├── .. (Store your other css files here.)
├── index.php (Prevent Directory Listing)
├── README.md (Readme file with Folder Informations)
_images
Preview images for the readme.md file.
./RNAME/_images/
├── ... (Content you may add)
├── index.php (Prevent Directory Listing)
├── README.md (Readme file with Folder Informations)
_js
Store your js code in this folder!
./RNAME/_js/
├── js.example.php (Example JS File)
├── .. (Store your other js files here.)
├── index.php (Prevent Directory Listing)
├── README.md (Readme file with Folder Informations)
_lang
Language Translations for sites in this extensions _admin folder and multi-langual store.
./RNAME/_lang/
├── de.php (Translation File for German)
├── en.php (Translation File for English)
├── es.php (Translation File for Spanish)
├── fr.php (Translation File for French)
├── it.php (Translation File for Italian)
├── ja.php (Translation File for Japanese)
├── zh.php (Translation File for Chinese)
├── ... (Other language Files you may add)
├── index.php (Prevent Directory Listing)
├── README.md (Readme file with Folder Informations)
_lib
Store your php code in this folder!
./RNAME/_lib/
├── lib.example.php (Example Library File)
├── .. (Store your other library files here.)
├── index.php (Prevent Directory Listing)
├── README.md (Readme file with Folder Informations)
_mysql
Store your mysql tables in this folder!
./RNAME/_mysql/
├── mysql.example.php (Example MySQL File for example table)
├── .. (Store your other mysql files here.)
├── index.php (Prevent Directory Listing)
├── README.md (Readme file with Folder Informations)
_runtime
Store your runtime files in this folder! (For the Background Linux Worker)
./RNAME/_runtime/
├── run.example.php (Example runtime File)
├── .. (Store your other runtime files here.)
├── index.php (Prevent Directory Listing)
├── README.md (Readme file with Folder Informations)
_theme
Theme files for your module.
./RNAME/_theme/
├── ... (Content you may add)
├── index.php (Prevent Directory Listing)
├── README.md (Readme file with Folder Informations)
_update
Theme files for your module.
./RNAME/_update/
├── 200.php (Example Update File to update to Build 200 from previous versions)
├── ... (Other Update Files)
├── index.php (Prevent Directory Listing)
├── README.md (Readme file with Folder Informations)
_wfc
Store your wfc php classes code in this folder!
./RNAME/_wfc/
├── wfc.example.php (Example WFC Library File)
├── .. (Store your other WFC library files here.)
├── index.php (Prevent Directory Listing)
├── README.md (Readme file with Folder Informations)
_worker
Store your runtime worker files in this folder! (For the Background Linux Worker)
./RNAME/_worker/
├── worker.example.php (Example runtime worker File)
├── .. (Store your other worker files here.)
├── index.php (Prevent Directory Listing)
├── README.md (Readme file with Folder Informations)
Files
Files in the extensions root directory.
./RNAME/
├── changelog.php (Changelog info)
├── index.php (Prevent Directory Listing)
├── LICENSE.md (Extensions License)
└── preview.jpg (Preview image)
├── README.md (Extensions Readme)
├── version.php (Versioning info)
Example Module
We have an example template image module for developers in our github repository in the /_developers/_extension
folder.