summaryrefslogtreecommitdiff
path: root/plugins/data.fortunecookie.php
blob: b5fd1ef2f0bd1a0d68f1cc1dc05b8da804ba2c28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/**
 * @version  $Revision: 1.3 $
 * @package  liberty
 * @subpackage plugins_data
 */

/**
 * definitions
 */
global $gBitSystem;
if( $gBitSystem->isPackageActive( 'tidbits' ) ) {
	define( 'PLUGIN_GUID_DATACOOKIE', 'datacookie' );
	global $gLibertySystem;

	$pluginParams = array (
		'tag' => 'COOKIE',
		'auto_activate' => FALSE,
		'requires_pair' => FALSE,
		'title' => 'Fortune Cookies',
		'description' => tra( "Display a random sentence in the page." ),
		'help_page' => 'DataPluginFortuneCookie',
		'load_function' => 'data_cookie',
		//'help_function' => 'data_cookie_help',
		'syntax' => "{cookie}",
		'path' => LIBERTY_PKG_PATH.'plugins/data.cookie.php',
		//'security' => 'registered',
		'plugin_type' => DATA_PLUGIN
	);
	$gLibertySystem->registerPlugin( PLUGIN_GUID_DATACOOKIE, $pluginParams );
	$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATACOOKIE );

	function data_cookie( $pData, $pParams ) {
		global $taglinelib;
		require_once( TIDBITS_PKG_PATH.'BitFortuneCookies.php' );
		return( $taglinelib->pick_cookie() );
	}
}
?>