Forums / Cotonti / Extensions / cross plugin code or data

using functions from other plugins to get data or ..

Trustmaster
#30877 2011-10-02 08:09

In Siena you just do this:

PHP
1
require_once cot_incfile('module_name', 'module');

or to reuse plugin functions:

PHP
1
require_once cot_incfile('plugin_name', 'plug');

You can also detect if that module or plugin is loaded on site:

PHP
1
2
3
4
5
6
7
8
9
10
11
if (cot_plugin_active('plugin_name'))
{
    require_once cot_incfile('plugin_name', 'plug');
    // ...
}
 
if (cot_module_active('module_name'))
{
    require_once cot_incfile('module_name', 'module');
    // ...
}
May the Source be with you!