Skip to content
Snippets Groups Projects
Commit 7d992a19 authored by Esther Brunner's avatar Esther Brunner
Browse files

helper plugin patch

darcs-hash:20070227122635-20862-e10e801a5224585fa32d8dc3401fd5eb98d70930.gz
parent 3b974784
No related branches found
No related tags found
No related merge requests found
......@@ -155,6 +155,23 @@ class DokuWiki_Plugin {
return $conf;
}
/**
* Loads a given helper plugin (if enabled)
*
* @author Esther Brunner <wikidesign@gmail.com>
*
* @param $name name of plugin to load
* @param $msg message to display in case the plugin is not available
*
* @return object helper plugin object
*/
function loadHelper($name, $msg){
if (!plugin_isdiabled($name)) $obj =& plugin_load('helper',$name);
else $obj = NULL;
if (is_null($obj) && $msg) msg("Helper plugin $name is not available or invalid.",-1);
return $obj;
}
// standard functions for outputing email addresses and links
// use these to avoid having to duplicate code to produce links in line with the installation configuration
......
......@@ -8,7 +8,7 @@
// plugin related constants
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
$plugin_types = array('admin','syntax','action','renderer');
$plugin_types = array('admin','syntax','action','renderer', 'helper');
/**
* Returns a list of available plugins of given type
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment