There are several additional plugin functionalities that may prove useful:
- Plugin Settings: Plugins can store and retrieve settings with a mechanism similar to Journal Settings. Use the Plugin class's
getSetting
andupdateSetting
functions. - Templates: Any plugin can keep templates in its plugin directory and display them by calling:
$templateMgr->display($this->getTemplatePath() . 'templateName.tpl');
See the native import/export plugin for an example.
- Schema Management: By overriding
getInstallSchemaFile()
and placing the named schema file in the plugin directory,generic
plugins can make use of OJS's schema-management features. This function is called on OJS install or upgrade. - Data Management: By overriding
getInstallDataFile()
and placing the named data file in the plugin directory,generic
plugins can make use of OJS's data installation feature. This function is called on OJS install or upgrade. - Helper Code: Helper code in the plugin's directory can be imported using
$this->import('HelperCode'); // imports HelperCode.inc.php