Source for file data.userlink.php
Documentation is available at data.userlink.php
* @subpackage plugins_data
* @author bigwasp bigwasp@sourceforge.net
// +----------------------------------------------------------------------+
// | Copyright (c) 2005, bitweaver.org
// +----------------------------------------------------------------------+
// | All Rights Reserved. See below for details and a complete list of authors.
// | Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html 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
// +----------------------------------------------------------------------+
define( 'PLUGIN_GUID_DATAUSERLINK', 'datauserlink' );
'auto_activate' => FALSE,
'requires_pair' => FALSE,
'load_function' => 'data_userlink',
'title' => 'UserLink per login or email',
'help_page' => 'DataPluginUserLink',
'description' => tra("Will show a link to the userpage for a given login name or email."),
'help_function' => 'data_userlink_help',
'syntax' => "{USERLINK login='bigwasp'}",
'<table class="data help">'
. '<th>' . tra( "Key" ) . '</th>'
. '<th>' . tra( "Type" ) . '</th>'
. '<th>' . tra( "Comments") . '</th>'
. '<td>' . tra( "string" ) . '<br />' . tra( "(optional)") . '</td>'
. '<td>' . tra( "The login name to generate the link" ) . '</td>'
. '<td>' . tra( "string" ) . '<br />' . tra( "(optional)") . '</td>'
. '<td>' . tra( "The e-mail address to generate the link" ) . '</td>'
. '<td>' . tra( "string" ) . '<br />' . tra( "(optional)") . '</td>'
. '<td>' . tra( "The label to show; default is user's name" ) . '</td>'
. tra("Example: ") . "{USERLINK login='admin' label='Site Administrator'}";
$myHash['login'] = $login;
} else if ( isset ( $email ) ) {
$myHash['email'] = $email;
} else if ( isset ( $user_id ) ) {
$myHash['user_id'] = $user_id;
$user = $gBitUser->userExists($myHash);
$tmpUser = $gBitUser->getUserInfo( array( 'user_id' => $user ) );
$tmpUser['link_label'] = $label;
$ret = $gBitUser->getDisplayName( TRUE, $tmpUser );
|