Icon Of Ofl And Onl In In Viewuser Profile (lavalair)
Started on the old forum in September 2007 · view the original in the archive · old links redirect here
as to insert icone of online and offline in
/////////////////////////////////viewuser profile
else if($action=="viewuser") {...
????
-> ...{ $iml = "<img src="images/onl.gif" alt="+"/>"; }else{ $iml = "<img src="images/ofl.gif" alt="-"/>"; }...
where and as to insert this?
(lavalair)
in index.php
of this I know, more which codigo to use accurately that I want to know External image (may be gone)
of this I know, more which codigo to use accurately that I want to know External image (may be gone)
i dont remember but i think there is a function in lavalair's core called isonline that returns whether a user is online or offline based on the id of the user. if its not there create this
function isonline($uid) {
$online = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE userid='".$uid."'"));
if($online[0]>0) {
return true;
}else{
retrun false;
}
}
next in the user profile put something like this
if(isonline($who)==true) {
$onlineimg = "<img src=\"images/online.gif\" alt=\"*\"/>";
}else{
$onlineimg = "<img src=\"images/offline.gif\" alt=\"*\"/>";
}
now where u want the image to show just put echo $onlineimg; or echo "$onlineimg";
thats in the index.php?action=viewuser