No unactivated users in Online24.
English Muffin Offline
Junior Member
**
Posts: 15
Joined: Apr 2010
Post: #1
No unactivated users in Online24.
Hello,

A client is using Labroccas "Online24" plugin however he wants to make it so unactivated users are not shown in the Online24 section on the index.

Here is the coding (only some since of the plugin license):

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
$query = $db->query("
        SELECT u.*
        FROM ".TABLE_PREFIX."users u
        LEFT JOIN ".TABLE_PREFIX."usergroups g ON (g.gid=u.usergroup)
        WHERE u.lastactive > $stime
        ORDER BY u.lastactive DESC
        ");
	while($online = $db->fetch_array($query))
	{
		if(!$online['invisible'] || $mybb->usergroup['canviewwolinvis'] || $online['uid'] === $mybb->user['uid'])
		{
			if($online['invisible'])
			{
				$invisiblemark = "*";
			}
			else
			{
				$invisiblemark = "";

			}
		
			if($online['uid']) {
			$username = $online['username'];
			$username = format_name($username, $online['usergroup'], $online['displaygroup']);
			$onlinemembers .= build_profile_link($username, $online['uid']).$invisiblemark. ", ";
			$membercount++;
			}

			if(!$online['uid']) { $guestcount++;	}
			if(strstr($online['sid'], "bot=")) { $botcount++; }

		}
			if($online['invisible']) { $anoncount++; }

	}


It is meant to work off the sessions tables but I changed it (because client wanted to) have it work of the users table.

Can anyone tell me how to exclude unactivated members/users from the Online24 results please? Smile

04-29-2011 06:58 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
No unactivated users in Online24. - English Muffin - 04-29-2011 06:58 AM

 Standard Tools
Forum Jump: