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.
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 the plugin name, for example: linkchecker.zip
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 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" 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 | none | <nav_main> <nav>locationname</nav> </nav_main> | ||||||||||
nav_sub | Managing sub navigations | area, level, navm
| <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> |
Tag plugin_dependencies - dependencies to other plugins
This tag is reserved for further implementations of plugin dependencies. The structure of tags is not final and may change.
plugin_install.sql, plugin_uninstall.sql and plugin_update.sql
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 ...
CONTENIDO default plugins.
CONTENIDO provides bundle of different standard plugins.
Smarty Wrapper
Smarty wrapper provides smarty template engine for CONTENIDO Backend and Frontend.
After installation of plugin smarty template can be used in CONTENIDO Modules or Plugins.
//get smarty frontend or backend template object via singleton pattern $tplFrontend = cSmartyBackend::getInstance(); $tplBackend = cSmartyFrontend::getInstance(); //assign some data and display template $tplFrontend->assign("some_value_key", $some_value); $tplFrontend->display("templates/some_template.tpl");
Advanced mode rewrite:
Advanced mode rewrite plugin aka. AMR provides rewriting of default CONTENIDO url's to SEO friendly url's.
AMR is high configurable plugin, you can set how your url should looks like.
Example: show language in url or url ending with index.html etc.
Always activate this plugin after CONTENIDO installation. Url's looks nicer and human readable.
Url without AMR: www.some-url/cms/front_content?idart=1&lang=3
Url with AMR: www.some-url/cms/myniceurlcat/myniceurlart/index.html
User Forum:
User Forum plugin provides management of posted comments in CONTENIDO backend.
The comments are posted through standard content_user_forum module.
Linkchecker:
Linkchecker plugin checks url's in CONTENIDO content and shows unreacheable urls.
With this plugin you can check internal and external url's.
Cronjobs Overview:
With cronjobs overview you can edit and execute existing cronjobs.
The creation of new cronjobs in backend of CONTENIDO is not possible because of security reason.
Workflow:
Workflow plugin provides creation of new workflows and their steps.
The step can be creation of new article, publish etc.
The workflow steps can be assigned to the users, which should execute the steps.