This page will go through how to create a Plugin for Organizr
Each plugin consists of the following files:
// PLUGIN INFORMATION
$GLOBALS['plugins']['Test'] = [ // Plugin Name
'name' => 'Test', // Plugin Name
'author' => 'CauseFX', // Who wrote the plugin
'category' => 'Testing', // One to Two Word Description
'link' => '', // Link to plugin info
'license' => 'personal', // License Type use , for multiple
'idPrefix' => 'TEST', // html element id prefix (All Uppercase)
'configPrefix' => 'TEST', // config file prefix for array items without the hypen (All Uppercase)
'version' => '1.0.1', // SemVer of plugin
'image' => 'api/plugins/test/logo.png', // 1:1 non transparent image for plugin
'settings' => true, // does plugin need a settings modal?
'bind' => true, // use default bind to make settings page - true or false
'api' => 'api/v2/plugins/test/settings', // api route for settings page (All Lowercase)
'homepage' => false // Is plugin for use on homepage? true or false
class TestPlugin extends Organizr
public function _pluginGetSettings()
'Sample Settings' => [
$this->settingsOption('password-alt', 'TEST-pass-alt',['label' => 'Test Plugin Pass Alt']),
$this->settingsOption('password', 'TEST-password',['label' => 'Test Plugin Password']),
$this->settingsOption('text', 'TEST-text',['label' => 'Test Plugin Text'])
'FYI' => [
$this->settingsOption('html', 'HTML Note', ['html' => '<span lang="en">This is just a note</span>']),
The first thing you will notice is that there is a Global variable set with a
pluginsarray. For this example, our Plugin name is
Also notice on the array we again specify the name of the plugin. Here is a breakdown of the rest of the array keys:
Now that we have finished setting up your Plugin's Global variable array, we can now continue to creating your Plugin's PHP Class.
If you plan on using some of Organizr built in functions and User information, you will need to extend the Organizr Class. Otherwise, you can just create a new class and that is it.
If you want a settings modal, you will need to create a function to supply which config items you will want to set up for your settings modal. Let's start with creating a function to pass an array with our config items.
First, you need to name your function something, let's call this one
_pluginGetSettings, we can also set this function as public if you choose to share those variables with other classes etc...
Next, we will return an array with our Setting's groups. In this example our first Group is called
Sample Settings. Inside this Settings group, we will have 3 config items that we want to setup. Each item is setup via the
settingsOptionfunction. This function takes 3 parameters.
The first option is the type of config item that we are setting up. The second, is the name of the config item. Lastly, we can provide the sometimes-optional extra options needed to set the item up.
Let's take a look at each one.
You can find out all the type of config item options under the
options-functions.phpfile located under
* Always include PLUGINNAME-enabled
* Along with all your other settings from plugin.php
'TEST-enabled' => false,
'TEST-pass-alt' => '',
'TEST-password' => '',
'TEST-text' => ''