Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
4 registered (Jake, id242, SD, gliderdad), 32 Guests and 16 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 01/24/07
Posts: 171
Top Posters (30 Days)
Ruben 51
Gizmo 24
DennyP 24
Dunny 15
SteveS 14
AllenAyres 12
SD 10
dbremer 10
drkknght00 9
doug 8
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
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
Temporary Password email not being received
by
05/24/12 10:02 PM
Ability to "like" individual posts (not Facebook "likes)
by doug
05/23/12 09:03 AM
Island Permissions
by ThreadsUser
05/22/12 03:03 PM
streaming video
by prkrgrp
05/20/12 07:02 PM
New Posts Corrupted? Can someone help?
by PianoWorld
05/19/12 09:41 AM
Forum Stats
10492 Members
36 Forums
33842 Topics
181709 Posts

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