Here is the code I am trying to fix :
[code:1] <?php
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
global $mosConfig_offset;
global $database;
global $mosConfig_lang,
global $mosConfig_mbf_content;
global $ueConfig;
global $mosConfig_hits;
global $mosConfig_vote;
global $my;
global $mosConfig_absolute_path;
global $mosConfig_lang;
global $return=null;
$query = "SELECT DISTINCT m.*,u.name,u.email,u.username,c.avatar,c.avatarapproved, u.id, IF(s.session_id=null,0,1) AS 'isOnline' "
. "\n FROM #__comprofiler_members AS m"
. "\n LEFT JOIN #__comprofiler AS c ON m.memberid=c.id"
. "\n LEFT JOIN #__users AS u ON m.memberid=u.id"
. "\n LEFT JOIN #__session AS s ON s.userid=u.id"
. "\n WHERE m.referenceid=". $user->id .""
. "\n AND c.approved=1 AND u.block=0 AND c.confirmed=1"
. $isVisitor
. "\n ORDER BY m.membersince DESC"
;
$database->setQuery( $query );
$connections = $database->loadObjectList();
if(!count($connections)>0) {
$return .= _UE_NOCONNECTIONS;
return $return;
}
$boxHeight = $ueConfig+46;
$boxWidth = $ueConfig+28;
foreach($connections AS $connection) {
$conAvatar=null;
$conAvatar=getFieldValue('image',$connection->avatar,$connection);
$emailIMG=getFieldValue('primaryemailaddress',$connection->email,$connection,null,1);
$pmIMG=getFieldValue('pm',$connection->username,$connection,null,1);
$onlineIMG=getFieldValue('status',$connection->isOnline,$connection,null,1);
if($connection->accepted==1 && $connection->pending==1) $actionIMG = "<img src=\"components/com_comprofiler/images/pending.png\" border=\"0\" alt=\""._UE_CONNECTIONPENDING."\" title=\""._UE_CONNECTIONPENDING."\" /> <a href=\"".sefRelToAbs("index.php?option=com_comprofiler&act=connections&task=removeConnection&connectionid=".$connection->memberid)."\" onclick=\"return confirmSubmit();\" ><img src=\"components/com_comprofiler/images/publish_x.png\" border=\"0\" alt=\""._UE_REMOVECONNECTION."\" title=\""._UE_REMOVECONNECTION."\" /></a>";
elseif($connection->accepted==1 && $connection->pending==0) $actionIMG = "<a href=\"".sefRelToAbs("index.php?option=com_comprofiler&act=connections&task=removeConnection&connectionid=".$connection->memberid)."\" onclick=\"return confirmSubmit();\" ><img src=\"components/com_comprofiler/images/publish_x.png\" border=\"0\" alt=\""._UE_REMOVECONNECTION."\" title=\""._UE_REMOVECONNECTION."\" /></a>";
elseif($connection->accepted==0) $actionIMG = "<a href=\"".sefRelToAbs("index.php?option=com_comprofiler&act=connections&task=acceptConnection&connectionid=".$connection->memberid)."\"><img src=\"components/com_comprofiler/images/tick.png\" border=\"0\" alt=\""._UE_ACCEPTCONNECTION."\" title=\""._UE_ACCEPTCONNECTION."\" /></a> <a href=\"".sefRelToAbs("index.php?option=com_comprofiler&act=connections&task=removeConnection&connectionid=".$connection->memberid)."\"><img src=\"components/com_comprofiler/images/publish_x.png\" border=\"0\" alt=\""._UE_REMOVECONNECTION."\" title=\""._UE_DECLINECONNECTION."\" /></a>";
$tipField = "<b>"._UE_CONNECTEDSINCE."</b> : ".dateConverter($connection->membersince,'Y-m-d',$ueConfig);
if(getLangDefinition($connection->type)!=null) $tipField .= "<br /><b>"._UE_CONNECTIONTYPE."</b> : ".getConnectionTypes($connection->type);
if($connection->description!=null) $tipField .= "<br /><b>"._UE_CONNECTEDCOMMENT."</b> : ".$connection->description;
$tipTitle = _UE_CONNECTEDDETAIL;
$htmltext = $conAvatar;
$style = "style=\"padding:5px;\"";
$tooltipAvatar = cbFieldTip($ui, $tipField, $tipTitle, $width='250', $icon='', $htmltext, $href='', $style, $olparams='',false);
if($my->id==$user->id) {
$return .= "<div class=\"connectionBox\" style=\"position:relative;height:".($boxHeight+24)."px;width:".$boxWidth."px;\">"
. "<div style=\"position:absolute; top:3px; width:auto;left:5px;right:5px;\">".$actionIMG.'</div>'
. "<div style=\"position:absolute; top:18px; width:auto;left:5px;right:5px;\">".$tooltipAvatar.'</div>'
. "<div style=\"position:absolute; bottom:0px; width:auto;left:5px;right:5px;\">"
. $onlineIMG." ".htmlentities(getNameFormat($connection->name,$connection->username,$ueConfig))
. "<br /><a href=\"".sefRelToAbs("index.php?option=com_comprofiler&task=userProfile&user=".$connection->memberid)
."\"><img src=\"components/com_comprofiler/images/profiles.gif\" border=\"0\" alt=\""._UE_VIEWPROFILE."\" title=\""
._UE_VIEWPROFILE."\" /></a> ".$emailIMG." ".$pmIMG."\n";
} else {
$return .= "<div class=\"connectionBox\" style=\"position:relative;height:".$boxHeight."px;width:".$boxWidth."px;\">"
. "<div style=\"position:absolute; top:10px; width:auto;left:5px;right:5px;\">".$tooltipAvatar.'</div>'
. "<div style=\"position:absolute; bottom:0px; width:auto;left:5px;right:5px;\">"
. $onlineIMG." ".htmlentities(getNameFormat($connection->name,$connection->username,$ueConfig))."\n";
}
$return .= "</div></div>\n";
}
$return .= "<div style=\"clear:both;\"> </div>";
return $return;
?>
[/code:1]
(it's a module code)
I can't make it
Post edited by: justberare, at: 2006/04/12 18:28