Plugin Folders and Files
├── bol
| ├── {db_table_name}_dao.php
| ├── {db_table_name}.php
| └── service.php
├── classes
| ├── action_controller.php
| ├── {classname}.php
| └── notification_{classname}.php
├── components
| └── floatbox.php
├── controllers
| ├── access_level.php
| ...
| └── widgets.php
├── static
| ├── css
| └── js
├── views
| ├── components
| └── floatbox.html
| └── controllers
| └── access_level_index.html
| ...
| └── widgets_index.html
├── activate.php
├── deactivate.php
├── init.php
├── install.php
├── uninstall.php
├── cron.php
├── plugin.xml
└── langs.zip
'bol' stands for 'Business Object Layer', it is the pathway to access databases.
├── bol
| ├── {db_table_name}_dao.php ◀
| ├── {db_table_name}.php
| └── service.php
The Data-Access-Object file is the file where the SQL queries to the plugin table are located. Remember the mnemonic rhyme: D-A-O, that's where your queries go.
Note: It is recommended not to use names for databases, tables and fields that are reserved to SQL, such as "text", "insert", "export", etc.. To avoid false interpretations at all you can even prefix these names by e.g. the first letter of your plugin, so that "name" becomes "sname" and so on.
├── bol
| ├── {db_table_name}_dao.php
| ├── {db_table_name}.php ◀
| └── service.php
This file contains amongst other things all field names of the plugin's database table. For savety reasonst it should not contain any SQL / database queries.
├── bol
| ├── {db_table_name}_dao.php
| ├── {db_table_name}.php
| └── service.php ◀
This file gets called first inside the bol folder and builds the connection between
all of the other table files.
If you do not have any plugin tables but want to read tables of other plugins then
these queries can be placed into this file.
This folder can be used e.g. for Event Listeners that detect if somebody uploads a profile picture.
├── classes
| ├── action_controller.php ◀
| ├── {classname}.php
| └── notification_{classname}.php
description follows.
├── classes
| ├── action_controller.php
| ├── {classname}.php ◀
| └── notification_{classname}.php
description follows.
├── classes
| ├── action_controller.php
| ├── {classname}.php
| └── notification_{classname}.php ◀
description follows soon
├── components
| └── floatbox.php
Widget php files are stored in the components folder, if your plugin does not need an extra page but will be displayed as a widget on e.g. the profile or dashboard.
├── controllers
| ├── access_level.php
| ...
| └── widgets.php
Page / plugin page php files are stored in the controllers folder, if your plugin needs to have an extra page.
├── views
| ├── components
| └── floatbox.html
| └── controllers
| └── access_level_index.html
| ...
| └── widgets_index.html
This folder contains the Template HTML files for your plugin controllers (=pages) and components (=widgets) since according to Smarty layout and functionalities should be separated from each other.
├── static
| ├── css
| ├── js
| └── images
The pugin's custom CSS, JavaScript, Images (and Fonts) go into this folder. This folder will be copied to ow_static
inside oxwall's root directory after plugin install.
├── plugin.xml
This file is required and stores all important plugin information.
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<name>{Plugin Name}</name>
<key>{unique_plugin_key}</key>
<description>{The plugin description goes here}</description>
<author>Friedrich Schultheiss</author>
<authorEmail>mail@friedrich-schultheiss.de</authorEmail>
<authorUrl>http://symdesign.de</authorUrl>
<developerKey>f44785619aaabbbcccdddeeefffgggc4</developerKey>
<build>1</build>
<copyright>(C) 2016</copyright>
<license>The BSD License</license>
<licenseUrl>http://www.opensource.org/licenses/bsd-license.php</licenseUrl>
</plugin>
├── init.php
This file is required, all the main pages get listed (routed) inside here
├── activate.php
├── deactivate.php
These files are required, add here special instructions in case if you need more than the default
Both files are required.
├── install.php ◀
├── uninstall.php
Place MySQL setup queries inside it.
├── install.php
├── uninstall.php ◀
It executes the deactive.php
Note: An uninstall also deletes all user files of the plugin. To avoid losing them when unstalling a plugin you can create a folder in the root directory where this data is stored.
├── cron.php
This file is for cron jobs.
Note: Do not make any SQL queries besides in files install, service and record_dao for safety reasons!
└── langs.zip
This file contains all translations for the plugin and keeps the translations available after a reinstallation. Therefor after development and translation it should be exported from the Oxwall backend {sitename}/admin/settings/dev-tools/languages