View Full Version : how do I get the statistics to 'not count' members in a specific usergroup
kurtbarker
01-22-2006, 09:17 PM
Hey guyz...
In the statistics at the bottom of the page it has members and active members..
For specific usergroups can I exclude them from the total member count?
Thanks guyz
rnmcd
08-29-2007, 01:42 PM
Bump.
I'm looking for the same thing. Maybe the mod already exists but I might be using the wrong search terms.
Any suggestions?
glennno
08-31-2007, 05:43 AM
I've been looking for this too, no help on vbulletin.com.
We imported a Yahoo Group and archived all the old messages, and now all the old usernames are inflating our member count on the home page. It's confusing everyone. Not everyone from that group joined the vB forum, and all the new usernames of those who did are different. We cannot change any of those usernames, for reasons specific to the forum.
This is a pain. It seems so simple, there's got to be a way.
rnmcd
09-07-2007, 01:56 PM
<bump>
Paul M
09-07-2007, 06:42 PM
You would need to rewrite the queries in the build_user_statistics() function. There are no hooks in that function.
rnmcd
09-07-2007, 06:50 PM
That's not something that is in the template is it?
Paul M
09-07-2007, 06:52 PM
Nope, it's php code.
fxs158
09-22-2007, 01:32 AM
anyone able to help with this?
jamoss
12-30-2007, 09:07 PM
For the home page active users, edit index.php
SEARCH FOR (around line 401):
WHERE session.lastactivity > $datecut
AFTER THAT, ADD:
AND user.usergroupid in (x,x,x)
... where x,x,x are the usergroups you want it to show.
For the Member List feature, you can create a plugin:
Hook Location: memberlist_query_userscount
PHP CODE:
$ids='x,x,x';
where x,x,x are the usergroups you want it to show.
silurius
02-09-2010, 05:58 PM
Bump!
For my 3.8.3 site, I edited index.php exactly as jamoss described, but it did not appear to have any effect. I cleared my browser cache, ran the "Daily Statistics Log" scheduled task, ran the "Rebuild Statistics" counter update. Anything else I'm missing? I assume vBulletin has changed enough since 2007 to indicate something new, but I have no idea where to look.
Thanks in advance!
Edit: Here is my code:
$forumusers = $db->query_read_slave("
SELECT
user.username, (user.options & " . $vbulletin->bf_misc_useroptions['invisible'] . ") AS invisible, user.usergroupid,
session.userid, session.inforum, session.lastactivity, session.badlocation,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid
$hook_query_fields
FROM " . TABLE_PREFIX . "session AS session
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = session.userid)
$hook_query_joins
WHERE session.lastactivity > $datecut AND user.usergroupid in (5,6,7,10)
$hook_query_where
" . iif($vbulletin->options['displayloggedin'] == 1 OR $vbulletin->options['displayloggedin'] == 3, "ORDER BY username ASC") . "
");
silurius
02-11-2010, 09:33 PM
Anyone?
silurius
02-16-2010, 03:26 PM
Sorry for the multiple bumps. Third time's the charm?
edward hamilton
02-22-2010, 05:31 PM
I've also been trying to figure out how to not count New Members Waiting Email Confirmation in the Members online stats.
I'd like to not show new registrations usernames in the stats as they can be decieving and spammers usernames show up here.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.