2010-06-20, 07:48 PM
How can i add the status of online/offline to the Forum Team List
I tried but all i got was this
http://support.webhostingfox.com/showteam.php
But all of them are showing online, which they are not.
I added (which i got from member.php)
Then added two new templates that are copies of member_profile_online and member_profile_offline but with out the location and replaced the $templates->get("member_profile_offline/online with showteam_online/offline.
Is there any way to actually do this? or any way that will actually work?
I tried but all i got was this
http://support.webhostingfox.com/showteam.php
But all of them are showing online, which they are not.
I added (which i got from member.php)
// User is currently online and this user has permissions to view the user on the WOL
$timesearch = TIME_NOW - $mybb->settings['wolcutoffmins']*60;
$query = $db->simple_select("sessions", "location,nopermission", "uid='$uid' AND time>'{$timesearch}'", array('order_by' => 'time', 'order_dir' => 'DESC', 'limit' => 1));
$session = $db->fetch_array($query);
if(($memprofile['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1 || $memprofile['uid'] == $mybb->user['uid']) && !empty($session))
{
// Fetch their current location
$lang->load("online");
require_once MYBB_ROOT."inc/functions_online.php";
$activity = fetch_wol_activity($session['location'], $session['nopermission']);
$location = build_friendly_wol_location($activity);
$location_time = my_date($mybb->settings['timeformat'], $memprofile['lastactive']);
eval("\$online_status = \"".$templates->get("member_profile_online")."\";");
}
// User is offline
else
{
eval("\$online_status = \"".$templates->get("member_profile_offline")."\";");
}
Above of // Fetch the list of groups (in showteam.php) which are to be shown on the pageThen added two new templates that are copies of member_profile_online and member_profile_offline but with out the location and replaced the $templates->get("member_profile_offline/online with showteam_online/offline.
Is there any way to actually do this? or any way that will actually work?