Plugins allow you to extend Known’s functionality.
In fact, it’s recommended that every piece of functionality or design that you add to Known is done through a plugin, so that you can upgrade the core Known platform without jeopardizing your customizations. We’ve made this extremely simple.
The plugin’s folder must sit inside /IdnoPlugins.
Every plugin must have at least two files:
Plugins may also contain the following files:
The plugin.ini file contains a number of text entries:
[Plugin description]
name = "The name of the plugin"
version = "The plugin's version number"
author = "Author's name"
author_email = "Author's email address"
author_url = "http://authors-url/"
description = "A short description that will be displayed in the administration panel"
More may be added over time. These entries are displayed in Known’s administration panel but may also be displayed in a future plugin directory.
Plugins are all defined as classes inside the IdnoPlugins namespace. For example, if your plugin was called Banana, its folder would be /IdnoPlugins/Banana, and all its classes would be in the IdnoPlugins/Banana namespace. This namespace maps exactly to the plugin’s file location - so, for example, IdnoPlugins/Banana/Main would be found at /IdnoPlugins/Banana/Main.php. Please do not write a banana plugin. (Or do. We’re not the boss of you. Whatever has appeal.)
If the plugin is not installed, only plugin.ini is ever read by Known, and then only on the plugin administration page.
If the plugin is installed, the plugin is loaded before any output is written to the screen, as follows:
- Any URLs associated with the plugin are registered
- Any template extensions associated with the plugin are registered
- Any event hooks associated with the plugin are registered (eg, the plugin might register a function to be called when note objects are created)
Each template file contains its own