Clone this wiki locally
This is a brief introduction how to use and create your own plugins for the CMS
To use a plugin downloaded from a third party just place the contents in the "app/plugins" folder or your own PLUGINS folder, as defined in index.php.
All plugins need to be placed in their own separate folders. Their existence in the plugins folder automatically makes them installed and active.
If there are any configuration options they will become available in the configuration page of the website administration.
To extend the website with your own plugins please visit the kisscms-plugins repo which contains examples and walkthroughs how to create your own custom logic...
Plugin folders have the same file structure as the APP folder. Although not all folders may not be required, based on the plugin specs, a plugin folder can contain any of the following:
- bin: Can contain configuration options in the file config.php
- controllers: Files that are called from custom URLs (Path in the form: /controller/method/vars)
- helpers: Classes that add functionality like connecting to SDKs and adding new sections.
- lib: Where third-party scripts are placed
- models: New data objects (only available for the plugin)
- views: Presentation markup for the plugin logic.
If the plugin has variables that can be configured (ex. the twitter username for a twitter plugin) you can enter them in the file "bin/config.php" in the following form:
Config::register("main", "site_name", "KISSCMS");
Views in plugins are located in"
Ideally all the jQuery plugins you use would optionally call require() to load them before your code. Most likely jQuery has already been loaded for you by the main foot.php view, but it's always good to make the call every time - RequireJS is intelligent enough to only load the file once.