see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ // | Author: StarRider // | Rewritten for bitweaver by Author // +----------------------------------------------------------------------+ // $Id$ /** * definitions */ define( 'PLUGIN_GUID_DATAPLUGINHELP', 'datapluginhelp' ); global $gLibertySystem; $pluginParams = [ 'tag' => 'PLUGINHELP', 'auto_activate' => false, 'requires_pair' => false, 'load_function' => '\data_pluginhelp', 'title' => 'PluginHelp', // and Remove the comment from the start of this line 'help_page' => 'DataPluginPluginHelp', 'description' => KernelTools::tra("This plugin will display the plugin's Help."), 'help_function' => '\data_pluginhelp_help', 'syntax' => "{PLUGINHELP plugin= }", 'plugin_type' => DATA_PLUGIN, ]; $gLibertySystem->registerPlugin( PLUGIN_GUID_DATAPLUGINHELP, $pluginParams ); $gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAPLUGINHELP ); // Help Function function data_pluginhelp_help() { $help = '' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'
'.KernelTools::tra( "Key" ).''.KernelTools::tra( "Type" ).''.KernelTools::tra( "Comments" ).'
plugin'.KernelTools::tra( "string").'
'.KernelTools::tra("(manditory)").'
'.KernelTools::tra( "The Name of the Plugin to be displayed.") .'
'.KernelTools::tra( "There is").' No '.KernelTools::tra( "Default.") .'
' . KernelTools::tra("Example: ") ."{PLUGINHELP plugin='pluginhelp' } - Will display the Plugin\'s Help
" . KernelTools::tra("Example: ") ."{PLUGINHELP plugin='pluginhelp' showdata=true } - Will display the Plugin\'s PluginParams"; return $help; } /* Load Function function data_pluginhelp($data, $params) { global $gLibertySystem; extract ($params); if (!isset($plugin)) {// Exit if the Parameter is not set return pluginError('PluginHelp', KernelTools::tra('There was No Plugin Named for').' PluginHelp '.KernelTools::tra('to work with.')); } foreach (array_keys($gLibertySystem->mPlugins) as $pluginGuid) { $pluginParams = $gLibertySystem->mPlugins[$pluginGuid]; if ($pluginParams['plugin_type'] == DATA_PLUGIN && isset($pluginParams['description']) && $pluginParams['tag'] == strtoupper($plugin)) $thisGuid = $pluginGuid; } if (!isset($thisGuid)) { // The Plugin was not found $ret = '
' .'
' .'

'.KernelTools::tra('Error in the Plugin "').'PluginHelp

' .'

' .'
' .KernelTools::tra('The Plugin Name Specified').' plugin='.$plugin.' '.KernelTools::tra('does not exist.') .'
'; '
'; return $ret; } $pluginParams = $gLibertySystem->mPlugins[$thisGuid]; if (!is_array($pluginParams)) // Something is Wrong - Exit return KernelTools::tra('The Plugin Name Given To PluginHelp "').plugin.KernelTools::tra('" Either Does Not Exist Or Is Not Active.'); $runhelp = $pluginParams['help_function']; $runhelp = $runhelp(); $ret = '' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .''; if ($thisGuid != 'datalibrary') $ret .= // This button is not needed by the Plugin Library {LIB} '' .'' .''; $ret .= '
Plugin Data
'.$pluginParams['title'].'
GUID => '.$thisGuid.'tag => '.$pluginParams['tag'].'auto_activate => '.($pluginParams['auto_activate'] ? 'True' : 'False').'requires_pair => '.($pluginParams['requires_pair'] ? 'True' : 'False').'
').'description => '.$pluginParams['description'].'
load_function => '.$pluginParams['load_function'].'help_function => '.$pluginParams['help_function'].'
syntax => '.$pluginParams['syntax'].'
help_page => '.$pluginParams['help_page'].'
' .'' .'
' .'
'.KernelTools::tra('Parameter Data').'
' .'
~np~'.$runhelp.'~/np~
'; return $ret; } */