Excerpt |
---|
A plugin is a separate package with additional functionality for CONTENIDO which mostly is added to the backend. Plugins are systemwide ressources. |
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.
Child pages (Children Display) | ||||
---|---|---|---|---|
|
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 name of the ZIP archive file must only contain the plugin 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.
...
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 |
| |||||
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 |
|
| |||||||||||
extension | PHP extensions |
| ||||||||||||
class | PHP classes |
| ||||||||||||
function | PHP functions |
|
Tag dependencies - dependencies to other plugins
Info |
---|
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 |
|
|
Tag contenido - database specific information
...
The order of the XML tags must be the same as listed below.
Tag name | Description | Available attributes | Example | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
areas | Managing areas |
|
| |||||||||||||||
actions | Managing actions |
|
| |||||||||||||||
frames | Managing frames |
|
| |||||||||||||||
nav_main | Managing main navigations |
|
|
|
| |
nav_sub | Managing sub navigations |
area, level, navm
|
|
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 |
|
Tag plugin_dependencies - dependencies to other plugins
...
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.
...
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.
Code Block | ||||
---|---|---|---|---|
| ||||
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.
Code Block | ||
---|---|---|
| ||
//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.
Tip |
---|
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 stepsYou 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.