summaryrefslogtreecommitdiff
path: root/plugins/data.usercount.php
blob: 209efa841b5383ac8e3c023e91575f80c0fff14a (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
/**
 * @version  $Revision: 1.7 $
 * @package  liberty
 * @subpackage plugins_data
 */
// +----------------------------------------------------------------------+
// | Copyright (c) 2004, bitweaver.org
// +----------------------------------------------------------------------+
// | All Rights Reserved. See copyright.txt for details and a complete list of authors.
// | Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
// |
// | For comments, please use phpdocu.sourceforge.net documentation standards!!!
// | -> see http://phpdocu.sourceforge.net/
// +----------------------------------------------------------------------+
// | Author (TikiWiki): Damian Parker <damosoft@users.sourceforge.net>
// | Reworked & Undoubtedly Screwed-Up for (Bitweaver)
// | by: StarRider <starrrider@sourceforge.net>
// | Reworked from: wikiplugin_usercount.php - see deprecated code below
// +----------------------------------------------------------------------+
// $Id: data.usercount.php,v 1.7 2006/08/07 22:14:58 squareing Exp $

/**
 * definitions
 */
define( 'PLUGIN_GUID_DATAUSERCOUNT', 'datausercount' );
global $gLibertySystem;
$pluginParams = array (
	'tag' => 'USERCOUNT',
	'auto_activate' => FALSE,
	'requires_pair' => TRUE,
	'load_function' => 'data_usercount',
	'title' => 'UserCount - This plugin is not yet functional.', // Remove this line when the plugin becomes operational
//	'title' => 'UserCount',                                                                                       // and Remove the comment from the start of this line
	'help_page' => 'DataPluginUserCount',
	'description' => tra("Will show the number of users. If a Group Name can be included to filter the Groups."),
	'help_function' => 'data_usercount_help',
	'syntax' => "{USERCOUNT}Group Name{USERCOUNT}",
	'path' => LIBERTY_PKG_PATH.'plugins/data.usercount.php',
	'security' => 'registered',
	'plugin_type' => DATA_PLUGIN
);
$gLibertySystem->registerPlugin( PLUGIN_GUID_DATAUSERCOUNT, $pluginParams );
$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAUSERCOUNT );

// Help Function
function data_usercount_help() {
	$back = tra("^__Parameter Syntax:__ ") . "~np~{USERCOUNT(key=>value)}~/np~\n";
	$back.= tra("||__::key: ::__ | __::value::__ | __::Comments::__\n");
	$back.= tra("::NONE:: | ::NONE:: | this plugin has no parameters.||^");
	$back.= tra("^__Example:__ ") . "~np~{USERCOUNT()}Registered{USERCOUNT}~/np~^";
	return $back;
}

// Load Function
function data_usercount($data, $params) {
	$ret = "This plugin has not been completed as yet. ";
	return $ret;
}
/******************************************************************************
The code below is from the deprecated USERCOUNT plugin. All comments and the help routines have been removed. - StarRider

function wikiplugin_usercount($data, $params) {
	global $gBitUser;
	extract ($params, EXTR_SKIP);
	$numusers = $gBitUser->count_users($data);
	return $numusers;
}
*/
?>