ARC can be extended with third party plugins if those files follow certain conventions, as described on this page:
Name your extension MyPrefix_MyExtensionPlugin, save it as MyPrefix_MyExtensionPlugin.php, and place the file in the
If you are using a prefix that differs from "ARC2" (e.g. "MyApp"), you can alternatively place the plugin in a sub-directory of
If you follow these conventions, ARC will be able to find and include your plugin:
In the class file itself, you should add your name, a basic description, and possibly a link to the ARC and/or Plugin website. You also have to define a parent Class (use
Below you see a basic template for an ARC Plugin. Once you have created and tested your class, you may want to send an announcement to the mailing list so that we can help spread the word. Selected Plugins will be listed on a dedicated page on the ARC website.
Name your extension MyPrefix_MyExtensionPlugin, save it as MyPrefix_MyExtensionPlugin.php, and place the file in the
plugins directory. The prefix and the extension name must not contain underscores. If you are using a prefix that differs from "ARC2" (e.g. "MyApp"), you can alternatively place the plugin in a sub-directory of
plugins (e.g. plugins/myapp/MyApp_MyExtensionPlugin.php), for example as a bundle including additional files. The directory must have a lowercase name. If you follow these conventions, ARC will be able to find and include your plugin:
...
$my_ext = ARC2::getComponent('MyPrefix_MyExtensionPlugin', $config);
...Class if you don't extend a particular component). Below you see a basic template for an ARC Plugin. Once you have created and tested your class, you may want to send an announcement to the mailing list so that we can help spread the word. Selected Plugins will be listed on a dedicated page on the ARC website.
<?php
/*
homepage: ARC or plugin homepage
license: http://arc.semsol.org/license
class: ARC2 My Extension Plugin
author:
version: yyyy-mm-dd
*/
ARC2::inc('Class');
class ARC2_MyExtensionPlugin extends ARC2_Class {
function __construct($a = '', &$caller) {
parent::__construct($a, $caller);
}
function ARC2_MyExtensionPlugin ($a = '', &$caller) {
$this->__construct($a, $caller);
}
function __init() {
parent::__init();
}
/* plugin code */
...
}