Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
Who's Online
3 registered (Mtier, packlite, Thelockman), 26 Guests and 23 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 06/07/06
Posts: 28
Top Posters (30 Days)
Ruben Rocha 95
Rick 85
Mark S 74
Gizmo 49
Thelockman 49
driv 35
Sirdude 32
ntdoc 28
packlite 27
AllenAyres 25
Latest Photos
bear test
Beach Barbie-Q
Sunset
Accept the challenge!
Trees
Topic Options
Rate This Topic
#218315 - 10/22/08 01:41 PM [FIXED for 7.4.1] [7.4] online/offline indicator on profile pages is always online
blaaskaak Offline

****

Registered: 08/30/06
Posts: 1316
Loc: Breda, NL
The change log says:
Feature: Added the online/offline indicator to the profile pages.

Well, we might have the mood icon there, but there is no code whatsoever in the script that generates the page that acually looks if a user is online/offline smile
_________________________

Top
#218327 - 10/22/08 03:25 PM Re: [7.4] online/offline indicator on profile pages is always online [Re: blaaskaak]
blaaskaak Offline

****

Registered: 08/30/06
Posts: 1316
Loc: Breda, NL
For anyone interested, this is the fix I implemented on my board to have it actually display an online indicator.

/scripts/showprofile.inc.php
find:
Php Code:

	$mood_alt = preg_replace("#.(gif|jpg|png)$#","",$mood); 


Replace with:
Php Code:

	$extraquery = "";
	if (!$config['DISABLE_ONLINE_INVISIBLE'] && ($user['USER_MEMBERSHIP_LEVEL'] != "Administrator" && !preg_match("/Moderator/",$user['USER_MEMBERSHIP_LEVEL']))) {
		$extraquery = "AND t2.USER_VISIBLE_ONLINE_STATUS = 'YES'";	
	}
	$query = "
		SELECT count( t1.USER_ID )
		FROM ubbt_ONLINE AS t1, ubbt_USER_PROFILE AS t2
		WHERE t1.USER_ID = t2.USER_ID
		AND t1.USER_ID = ?
		$extraquery
	";
	$sth = $dbh->do_placeholder_query($query,array($User),__LINE__,__FILE__);
	list($isonline) = $dbh -> fetch_array($sth);	
	if (!$isonline) {
		$mood = "offline.gif";
		$mood_alt = $ubbt_LANG['OFFLINE'];
	} else {
		$mood_alt = "{$ubbt_LANG['ONLINE']}   ".preg_replace("#.(gif|jpg|png)$#","",$mood);
	}
 


/templates/default/showprofile.tpl

find
Code:
<img src="{$config.BASE_URL}/images/{$style_array.mood}/{$mood}" alt="{$lang.ONLINE}   {$mood_alt}" title="{$lang.ONLINE}   {$mood_alt}" />


replace with:
Code:
<img src="{$config.BASE_URL}/images/{$style_array.mood}/{$mood}" alt="{$mood_alt}" title="{$mood_alt}" />



Edited by blaaskaak (10/22/08 03:26 PM)
_________________________

Top


Shout Box

Today's Birthdays
theregit
Recent Topics
7.4.2 UNREAD
by Thelockman
Today at 05:23 PM
7.4.1 show/hide category bug
by Seattlebrian
Today at 11:56 AM
7.4.2 Discussion
by Rick
Today at 10:21 AM
UBBCentral now running 7.4.2
by Rick
Today at 10:21 AM
New members don't get access and are not displayed in the config panel
by Yomar
Yesterday at 03:32 AM
Forum Stats
4298 Members
33 Forums
30693 Topics
156040 Posts

Max Online: 978 @ 06/24/07 08:19 PM