liberty
[ class tree: liberty ] [ index: liberty ] [ all elements ]

Source for file data.creationtime.php

Documentation is available at data.creationtime.php

  1. <?php
  2. /**
  3.  * @version  $Revision$
  4.  * @package  liberty
  5.  * @subpackage plugins_data
  6.  */
  7. // +----------------------------------------------------------------------+
  8. // | Copyright (c) 2005, bitweaver.org
  9. // +----------------------------------------------------------------------+
  10. // | All Rights Reserved. See below for details and a complete list of authors.
  11. // | Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details
  12. // |
  13. // | For comments, please use phpdocu.sourceforge.net documentation standards!!!
  14. // | -> see http://phpdocu.sourceforge.net/
  15. // +----------------------------------------------------------------------+
  16. // | Author: James H Thompson (jht@lj.net)
  17. // +----------------------------------------------------------------------+
  18.  
  19. /**
  20.  * definitions
  21.  */
  22. global $gBitSystem;
  23. // this executes before all packages are registered so can't reliably check isPackageActive here!
  24. define'PLUGIN_GUID_DATA_CREATIONTIME''datacreationtime' );
  25. global $gLibertySystem;
  26. $pluginParams array (
  27.     'tag'           => 'CREATIONTIME',
  28.     'auto_activate' => TRUE,
  29.     'requires_pair' => FALSE,
  30.     'load_function' => 'data_creationtime',
  31.     'title'         => 'Creation Time',
  32.     'help_page'     => 'DataPluginCreationTime',
  33.     'description'   => tra("This plugin will display the creation time of a page."),
  34.     'help_function' => 'data_creationtime_help',
  35.     'syntax'        => "{creationtime}",
  36.     'plugin_type'   => DATA_PLUGIN
  37. );
  38. $gLibertySystem->registerPluginPLUGIN_GUID_DATA_CREATIONTIME$pluginParams );
  39. $gLibertySystem->registerDataTag$pluginParams['tag']PLUGIN_GUID_DATA_CREATIONTIME );
  40.  
  41. // Help Routine
  42. function data_creationtime_help({
  43.     return tra"Example: " )."{creationtime}<br />";
  44. }
  45.  
  46. //The actual handler for the plugin 
  47. function data_creationtime$data$params&$pCommonObject {
  48.     return smarty_modifier_bit_short_datetime$pCommonObject->mInfo['created');
  49. }
  50. ?>

Documentation generated on Wed, 29 Jul 2015 13:56:19 +0000 by phpDocumentor 1.5.0-lsces