Note: Delete any file not listed in the add-on(s) you are setting up.
Note: Add-ons folders should be placed in the system/user/addon folder.
- File
addon.setup.php
variables- 'author' : Your name
- 'author_url' : Link to your profile or company
- 'name' : Name of your add-on
- 'description' : About your add-on
- 'version' : The version of your add-on
- 'namespace' : Your namespace and your addon name
company\add-on
Required Folders/Files:
Replace the word "plugin" in the filename with the snake case name of your plugin.
Place the files in your plugin folder
- Folder plugin
- addon.setup.php
- pi.plugin.php
In the pi.plugin.php file, be sure to replace the class name of "Plugin" with the name of your plugin with the first letter uppercased.
Replace extension
with the name of your extensions name
Place the files in your extension folder
- Folder extension
- addon.setup.php
- ext.extension.php
In the ext.extension.php file, be sure to replace the class name of "Extension_ext" with the name of your plugin with the first letter uppercased followed by _ext.
-
File
ext.extension.php
variables -
In the Properties area at the top of the file set these variables
- $name : The name of your extension
- $version : The version of your extension
- $description : About your extension
- $settings_exist : They can be y/n
- $docs_url : Link to the docs for the extension
-
In the activate_extension() function set these variables
- 'method' : The method that the hook will run when triggered
- 'hook' : System event that will run the method ExpressionEngine Hooks
Note: Navigate through ExpressionEngines Extension Hooks to see which hook works for you.
- In the settings() function
- General pattern:
- $settings[variable_name] => array(type, options, default);
- variable_name: short name for the setting and the key for the language file variable
- Types you can use
- type: i - text input, t - textarea, r - radio buttons, c - checkboxes, s - select, ms - multiselect
- options: can be string (i, t) or array (r, c, s, ms)
- default: array member, array of members, string, nothing
Note: Extension settings can be accessed from the "Developer Add-ons" page in the control panel.
ExpressionEngine Extensions Setting
ExpressionEngine Extensions