see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ // | Author (TikiWiki): Luis Argerich // | Reworked for Bitweaver (& Undoubtedly Screwed-Up) // | by: StarRider // | Reworked from: wikiplugin_avatar.php - see deprecated code below // +----------------------------------------------------------------------+ // $Id: data.avatar.php,v 1.9 2006/08/07 22:14:57 squareing Exp $ /** * definitions */ global $gBitSystem; if( $gBitSystem->isPackageActive( 'wiki' ) ) { // Do not include this Plugin if the Package is not active define( 'PLUGIN_GUID_DATAAVATAR', 'dataavatar' ); global $gLibertySystem; $pluginParams = array ( 'tag' => 'AVATAR', 'auto_activate' => FALSE, 'requires_pair' => FALSE, 'load_function' => 'data_avatar', 'title' => 'Avatar - This plugin is not yet functional.', // Remove this line when the plugin becomes operational // 'title' => 'Avatar', // and Remove the comment from the start of this line 'help_page' => 'DataPluginAvatar', 'description' => tra("This plugin will display a User's Avatar as a Link to a page."), 'help_function' => 'data_avatar_help', 'syntax' => "{AVATAR user= page= float= }", 'path' => LIBERTY_PKG_PATH.'plugins/data.avatar.php', 'security' => 'registered', 'plugin_type' => DATA_PLUGIN ); $gLibertySystem->registerPlugin( PLUGIN_GUID_DATAAVATAR, $pluginParams ); $gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAAVATAR ); // Help Function function data_avatar_help() { $help = '' .'' .'' .'' .'' .'' .'' .'' .'' .'' // Would somebody check the default - it would make more sence if it was the Author of the page instead of whoever is reading it .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'
' . tra( "Key" ) . '' . tra( "Type" ) . '' . tra( "Comments" ) . '
user' . tra( "numeric") . '
' . tra("(optional)") . '
' . tra( "Name of the user who's avatar should be shown (Default = avatar of user accessing page).") . '
page' . tra( "page name") . '
' . tra("(optional)") . '
' . tra( "Used to make the Avatar a link to a specified page. (Default = Homepage of the Avatar's owner)") . '
float' . tra( "key-words") . '
' . tra("(optional)") . '
' . tra( "Specifies how the Avatar is to be alligned on the page. If NOT defined - the text will not wrap around the Avatar. Possible values are:") . ' left or right ' . tra("(Default = ") . 'NOT SET)
' . tra("Example: ") . "{AVATAR user='admin' page='home' float='right'}"; return $help; } // Load Function function data_avatar($data, $params) { // Pre-Clyde Changes // The Parameter user is new - the info was extracted from $data // The next 2 lines allow access to the $pluginParams given above and may be removed when no longer needed global $gLibertySystem; $pluginParams = $gLibertySystem->mPlugins[PLUGIN_GUID_DATAAVATAR]; $ret = 'The plugin "' . $pluginParams['tag'] . '" has not been completed as yet. '; return $ret; } } /****************************************************************************** The code below is from the deprecated AVATAR plugin. All comments and the help routines have been removed. - StarRider require_once( KERNEL_PKG_PATH.'BitBase.php' ); function wikiplugin_avatar($data, $params) { global $gBitSystem; global $gBitUser; extract ($params, EXTR_SKIP); if (isset($float)) $avatar = $gBitSystem->get_user_avatar($data, $float); else $avatar = $gBitSystem->get_user_avatar($data); if (isset($page)) { $avatar = "" . $avatar . ''; } else if ($gBitUser->userExists( array( 'login' => $data ) ) && $gBitSystem->getConfig('users_information', 'public', $data ) == 'public') { $avatar = "" . $avatar . ''; } return $avatar; } */ ?>