gayus wrote:The code is still show the First and Last Name.
How to change to username?
Thank you:)
It's worked i fixed to username. Check this out:
www.christernet.com/gayus
Replace the code customurl.php adjust with your website
@ /components/com_profiler/plugin/user/plug_cbcustomurltab/
with the following code:
[code:1]
<?php
/**
* Zoom Tab Class for handling the CB tab api
* @package Community Builder
* @author Unknown, PeterMixt, JoomlaJoe, Beat
*/
// 12/7/2006 10:07AM | Fixed to username by gayus/GW.
class getCustomurlTab extends cbTabHandler {
/**
* Constructor
*/
function getCustomurlTab() {
$this->cbTabHandler();
}
function getDisplayTab($tab,$user,$ui) {
$params=$this->params;
global $database;
//if ( $username ) {
$query = "SELECT username FROM #__users as username WHERE id = ". $user->id;
$database->setQuery( $query );
//print $database->getQuery();
$username = $database->loadObjectList();
//} else {
// $username = htmlentities($user->username);
//}
$agetekst = $params->get('CustomUrlText', "Url"«»);
$mi = array(); $mi["_UE_MENU_STATUS"][$params->get('CustomUrlText', "Url"«»)]["Url"]=null;
$siteurl = $params->get('SiteUrl', "
www.christernet.com
"«»);
if ($username[0]->username=="Administrator"«»)
{
$username[0]->username="admin";
}
$this->addMenu( array( "position" => "menuList" ,
"arrayPos" => $mi ,
"caption" => $siteurl."/".$username[0]->username ,
"url" => "" ,
"target" => "" ,
"img" => null ,
"alt" => null ,
"tooltip" => ""«») );
} //end getDisplayTab
} //end class getZoomTab.
?>
[/code:1]