see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ // | Author: James H Thompson (jht@lj.net) // +----------------------------------------------------------------------+ /** * definitions */ global $gBitSystem; // this executes before all packages are registered so can't reliably check isPackageActive here! define( 'PLUGIN_GUID_DATA_CREATIONTIME', 'datacreationtime' ); global $gLibertySystem; $pluginParams = [ 'tag' => 'CREATIONTIME', 'auto_activate' => true, 'requires_pair' => false, 'load_function' => '\data_creationtime', 'title' => 'Creation Time', 'help_page' => 'DataPluginCreationTime', 'description' => KernelTools::tra("This plugin will display the creation time of a page."), 'help_function' => '\data_creationtime_help', 'syntax' => "{creationtime}", 'plugin_type' => DATA_PLUGIN, ]; $gLibertySystem->registerPlugin( PLUGIN_GUID_DATA_CREATIONTIME, $pluginParams ); $gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATA_CREATIONTIME ); // Help Routine function data_creationtime_help() { return KernelTools::tra( "Example: " )."{creationtime}
"; } //The actual handler for the plugin function data_creationtime( $data, $params, &$pCommonObject ) { return \Bitweaver\Liberty\smarty_modifier_bit_short_datetime( $pCommonObject->mInfo['created'] ); }