vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   how do I get the statistics to 'not count' members in a specific usergroup (https://vborg.vbsupport.ru/showthread.php?t=106036)

kurtbarker 01-22-2006 09:17 PM

how do I get the statistics to 'not count' members in a specific usergroup
 
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:

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.


All times are GMT. The time now is 05:23 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00995 seconds
  • Memory Usage 1,730KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (13)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete