Online/Offline statusas forume
Parašė Enzo 2008 gegužės 8 18:05:00
Taigi kodas yra ne mano, bet šiek tiek ištaisiau jį, nes kreivai rodė.
[b]Būdas be paveiksliuko:[/b]
1. Atsidarote viewthread.php
2. Susirandate: [code]if ($data['user_avatar'] != "") {
echo "<img src='".IMAGES."avatars/".$data['user_avatar']."' alt='".$locale['567']."'><br><br>\n";
$height = "185";
} else {
$height = "70";
}[/code]
3. Po juo dedate: [code]echo"
<span class='shoutboxdate'>Statusas:</span> ";
$lastseen = time() - $data['user_lastvisit'];
if($lastseen < 60) {
$lastseen = "<nobr><span class='shoutboxdate'>Online</span></NOBR>";
} else {
$lastseen = "<nobr><span class='shoutboxdate'>Offline</span></NOBR>";
}
echo "$lastseen";[/code]
[b]Būdas su paveiksliukais[/b]
1. Atsidarote viewthread.php
2. Susirandate: [code]if ($data['user_avatar'] != "") {
echo "<img src='".IMAGES."avatars/".$data['user_avatar']."' alt='".$locale['567']."'><br><br>\n";
$height = "185";
} else {
$height = "70";
}[/code]
3. Po juo dedate: [code]echo"<br>
<span class='alt'>Status:</span> ";
$lastseen = time() - $data['user_lastvisit'];
if($lastseen < 60) {
$lastseen = "<nobr><img src='".BASEDIR."forum/images/online.png' style='vertical-align:absMiddle;' title='User is Online' alt='User is Online'></NOBR>";
} else {
$lastseen = "<nobr><img src='".BASEDIR."forum/images/offline.png' style='vertical-align:absMiddle;' title='User is Offline' alt='User is Offline'></NOBR>";
}
echo "$lastseen";[/code]
Na, o štai paveiksliukai: [img align=left]http://gam3r.info/forum/images/offline.png[/img]
[img align=left]http://gam3r.info/forum/images/online.png[/img]