Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
9 registered (mcasado, Mike L, Gizmo, SD, Bjab, driv, SteveS, nims2, Ruben), 23 Guests and 14 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 04/22/10
Posts: 5
Top Posters (30 Days)
Ruben 63
SD 54
Gizmo 48
gliderdad 33
Dunny 21
driv 18
Iann128 16
dbremer 16
Stan 15
Mark S 13
Latest Photos
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Gizzo Marx
Topic Options
#218315 - 10/22/08 04:41 PM [FIXED for 7.4.1] [7.4] online/offline indicator on profile pages is always online
Yarpâ„¢ Offline
Registered: 08/30/06
Posts: 1513
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
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#218327 - 10/22/08 06:25 PM Re: [7.4] online/offline indicator on profile pages is always online [Re: Yarpâ„¢]
Yarpâ„¢ Offline
Registered: 08/30/06
Posts: 1513
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 06:26 PM)
_________________________
Top



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Edit Post
by Bert
Today at 01:19 PM
A positive note
by SteveS
Yesterday at 09:36 PM
How to locate links to particular site if they are only used in images?
by Conrad
02/10/12 09:41 PM
Pictures not displaying
by Marker23
02/09/12 10:04 PM
Issue with logging out constantly
by Flanuva
02/09/12 07:05 PM
Forum Stats
10213 Members
36 Forums
33667 Topics
180917 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image