Plugin
Since CONTENIDO 4.9 plugins are installed via the Plugin manager.
Beside plugins from the community (so called third party plugins) CONTENIDO itself is released with various default plugins, which can be activated without downloading them.
- AMR - Advanced Mod Rewrite — Advanced Mod Rewrite plugin (AMR) provides rewriting of default CONTENIDO URIs to SEO friendly URIs.
- Content allocation — Content allocation plugin provides creation of tagging tree and tag articles.Tagging can be used for common reasons like building of knowledge trees or search
- Cronjobs overview — With the plugin Cronjobs overview you can edit and execute existing cronjobs. Edit means you can edit crontab, not the content of cronjob.
- Frontendlogic — The frontendlogic plugin is able to include certain fields for the permissions of frontenduser groups.
- Frontendusers — Frontendusers plugin allows you to extend CONTENIDO frontendusers without modifying the core of CMS.
- Linkchecker — The Linkchecker plugin checks URI's in CONTENIDO content and shows unreacheable or broken URLs.
- Newsletter — The Newsletter plugin allows you send newsletter emails to subscribers.
- PIFA - Form Assistant — The form assistant plugin PIFA allow for the easy creation of forms in the CONTENIDO backend that can be displayed anywhere in your sites frontend.
- PISS - Solr Search — The solr search plugin provides a SOLR search connector for content search in CONTENIDO.
- PIUS - URL Shortener — The URL Shortener plugin provides an overview of all defined short URLs for articles and allows for editing or deleting them.
- Smarty Wrapper — The Smarty wrapper provides a wrapper interface to use the Smarty http://www.smarty.net template engine for CONTENIDO Backend and Frontend.
- User Forum — User Forum plugin provides management of posted comments in CONTENIDO backend.
- Workflow — The Workflow plugin provides creation of new workflows and their steps.
Structure of a plugin
Plugins must follow a given structure so they can be installed correctly. Once at all, all files of a plugin package are packed to an ZIP archive, which later is unpacked from the installation routine of the plugin manager.
The content of this ZIP file must fit to the following guidelines.
ZIP archive filename
The name of the ZIP archive file must only contain some name, for example: linkchecker.zip. This name is not relevant for your folder name at plugin directory.
plugin.xml
Each plugin must have a XML file which contains metadata for the plugin itself and for the installation in the system. Among other things this file is responsible for the folder name in the plugins directory of CONTENIDO. Most important it contains all relevant entries for some special database tables, so the plugin is accessible in the backend (creating menu entries and so on). These tables are: actions, area, files, frame_files and nav_sub.
The XML is divided into multiple parts - each separated to a XML tag. XML files must be valid against the plugin file schema located at xml/plugin_info.xsd located in the plugin managers plugin directory.
Universal Unique Identifier (UUID)
Each plugin must have an UUID to identify it globally. These IDs base on the values for the plugin_name and copyright fields in this file. UUIDs only can be generated on the CONTENIDO website.
Tag general - meta information (required)
This tag contains meta information about the plugin which also are displayed in frontend. The tag has the attribute "active" which should have the value "1".
Tag name | Description | Required? | Example |
---|---|---|---|
plugin_name | Full plugin name. | yes | <general active="1"> <plugin_name>Linkchecker</plugin_name> <plugin_foldername>linkchecker</plugin_foldername> <uuid>428CB6BC-2DE3-284D-34C9-C30C010F6B20</uuid> <description>Checks intern and extern links to valid</description> <author>Frederic Schneider (4fb)</author> <copyright>four for business AG</copyright> <mail>frederic.schneider@4fb.de</mail> <website>http://www.4fb.de</website> <version>2.0.1</version> </general> |
plugin_foldername | Name of the plugin folder. | yes | |
uuid | The universal Unique ID. | yes | |
description | Description of the plugins functions. | no | |
author | Author | yes | |
copyright | Copyright notice | yes | |
Mail address for support | no | ||
website | Website address for support | no | |
version | Version of the plugin | yes |
Tag requirements - requirements for new plugins
Tag name | Description | Available attributes | Example | ||||||
---|---|---|---|---|---|---|---|---|---|
contenido | Versions of CONTENIDO |
| <requirements php="5.2.3"> <contenido minversion="4.9.0" /> <extension name="mysql" /> <class name="cRegister" /> <function name="i18n" /> </requirements> | ||||||
extension | PHP extensions |
| |||||||
class | PHP classes |
| |||||||
function | PHP functions |
|
Tag dependencies - dependencies to other plugins
This tag is available since CONTENIDO version 4.9.5
This tag contains information for plugin dependencies. The plugin manager checks if uuid is available in the database and if the required plugin is active.
Tag name | Description | Available attributes | Example | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
depend | Dependencies to other plugins |
| <dependencies> <depend uuid="82b117e94bb2cbcbce4e56b79a7d0c23" minversion="1.0.0" maxversion="1.0.1">Smarty Wrapper</depend> </dependencies> |
Tag contenido - database specific information
This tag contains database specific information for adding entries to special database tables (mentioned above) to be able to display the plugin in the backend navigation.
Each tag expects attributes which have the same value as their fields in the corresponding database table.
The order of the XML tags must be the same as listed below.
Tag name | Description | Available attributes | Example | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
areas | Managing areas |
| <areas> <area parent="linkchecker" relevant="1" menuless="1">lc_whitelist</area> </areas> | ||||||||||
actions | Managing actions |
| <actions> <action area="linkchecker">linkchecker</action> </actions> | ||||||||||
frames | Managing frames |
| <frames> <frame area="linkchecker" filetype="main" name="linkchecker/includes/include.linkchecker.php" frameId="4" /> </frames> | ||||||||||
nav_main | Managing main navigations |
| <nav_main> <nav name="menuname">pluginname/xml/lang_de_DE.xml;navigation/menuname/main</nav> </nav_main> | ||||||||||
nav_sub | Managing sub navigations |
| <nav_sub> <nav area="linkchecker" level="0" navm="1">linkchecker/xml/lang_de_DE.xml;navigation/content/linkchecker/main</nav> </nav_sub> |
Tag content_types - registration of own content types
This tag contains information to register own content types.
Tag name | Description | Required? | Example |
---|---|---|---|
type | Content type name | yes | <content_types> <type>CMS_NAME</type> </content_types> |
plugin_install.sql, plugin_uninstall.sql and update sql files
These files contain additional statements executed on the installation, uninstall or update of the plugin.
Both files expects one statement per line. Multi line statements are currently not supported and will lead to errors.
Because plugin database tables must have a special prefix, a special keyword "!PREFIX!" is available to replace it accordingly. Statements, which does not contain this placeholder are not executed.
Furthermore, it is only possible to execute the following database operations.
Installation type | Available operations |
---|---|
Installation |
|
Uninstall |
|
Update |
|
The prefix placeholder contains the common database table prefix (per default: "con_") following by the chars "pi" for plugin.
INSERT INTO !PREFIX!_news_log ... gets INSERT INTO con_pi_news_log ...
You can also define version specific update sql files. Format: plugin_update_oldversionnumber_to_newversionnumber.sql. Please replace "oldversionnumber" with your old plugin versioh number without dots, for example "10" for version 1.0 and replace "newversionnumber" with your new plugin version number without dots, for example "11" for version 1.1. Your update filename: plugin_update_10_to_11.sql. With this file your plugin run your update statements, if you have installed plugin version 1.0 and want to updated it with plugin version 1.1.