Code update for view_player

General Chat, Comments
Post Reply
illusions
Posts: 31
Joined: Thu Mar 06, 2014 12:46 pm

Code update for view_player

Post by illusions »

this is a small update for the view_player/content.php

find on line 65 and 66

Code: Select all

 echo "<tr><td width='1%'><b>" . str_replace(" ", " ", Translate("Online")) . ":</b></td>";
    echo "<td>" . Translate((IsPlayerOnline($_GET["id"]) ? "Yes" : "No")) . "</td></tr>";
and underneath add

Code: Select all

$result = $db->Execute("select last_action from users where id = ?", $_GET["id"]);
    $res = FormatDate($result->fields[0]);
    echo "<tr><td width='1%'><b>" . str_replace(" ", " ", Translate("Last Seen")) . ":</b></td>";
    echo "<td>" . FormatDate($result->fields[0]) . "</td></tr>";
Users online will now be able to see when the user who is offline was actually Last active
Tangled
Posts: 12
Joined: Wed Oct 01, 2014 5:29 am

Re: Code update for view_player

Post by Tangled »

Awesome great fix!
Post Reply

Return to “General”