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
|
function GetUser( &$row ) {
$result = $this->_out_format;
$profillink = sefRelToAbs("index.php?option=com_comprofiler&task=userProfile&user=".$row->id);
$displayname = $this->GetUserName( $row, $this->_format_name );
//show tooltip if enable
if( $this->_show_tooltip == 1 ) {
$tooltip = $this->GetTooltip( $row );
$profile = $this->mosToolTip($tooltip, $displayname, "", "", $displayname, $profillink, 1 ); // TODO: noch nciht fertig
} else {
$profile = $this->link( $profillink, $displayname );
}
$result = str_replace("U%", $profile, $result);
if( $this->_cb_age > 0 ) {
$result = str_replace("B%", $this->GetAge( $row, $this->_cb_age ), $result);
} else {
$result = str_replace("B%", "", $result);
}
//link to profile from avatar
$avatarlink = "";
if( $this->_cb_avatar > 0 ) {
$avatarlink = $this->link( $profillink, $this->GetAvatar( $row, $this->_cb_avatar, false ) );
}
$result = str_replace("A%", $avatarlink, $result);
if( $this->_cb_gender > 0 ) {
$result = str_replace("G%", $this->GetGender( $row, $this->_cb_gender ), $result);
} else {
$result = str_replace("G%", "", $result);
}
if( $this->_show_online > 0 ) {
$result = str_replace("O%", $this->GetOnlineStatus( $row ), $result );
} else {
$result = str_replace("O%", "", $result);
}
if( $this->_pms_link > 0 ) {
$result = str_replace( "P%", $this->GetPmsLink($row), $result );
} else {
$result = str_replace( "P%", "", $result );
}
//hits
$result = str_replace( "H%", ($this->_show_hits > 0)?( $row->hits ):(""), $result );
//registration date
$result = str_replace( "R%", ($this->_show_register > 0)?( $this->FormatDate($row->registerDate) ):(""), $result );
//lastupdate date
$result = str_replace( "L%", ($this->_show_lastupdatedate > 0)?( $this->FormatDate($row->lastupdatedate) ):(""), $result );
//custom fields 1-3
$result = str_replace( "C1%", ($this->_cb_show_custom1 > 0)?( $this->GetCustomField($row->s4jcustom1, $this->_cb_show_custom1, $this->_cb_custom1_image) ):(""), $result );
$result = str_replace( "C2%", ($this->_cb_show_custom2 > 0)?( $this->GetCustomField($row->s4jcustom2, $this->_cb_show_custom2, $this->_cb_custom2_image) ):(""), $result );
$result = str_replace( "C3%", ($this->_cb_show_custom3 > 0)?( $this->GetCustomField($row->s4jcustom3, $this->_cb_show_custom3, $this->_cb_custom3_image) ):(""), $result );
return $result;
} |
Partager