vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Banned Users on "Currently Active Users" (https://vborg.vbsupport.ru/showthread.php?t=298570)

MattGarner 05-29-2013 04:05 PM

Banned Users on "Currently Active Users"
 
Hi all,

I've done a search but the stuff that gets mentioned doesn't seem to be doing the trick. I am wondering if there is a way to basically hide banned users from showing up on the currently active users. Anyone have any ideas?

Cheers,

John Lester 05-29-2013 08:44 PM

Edit includes/functions_databuild.php

Search for (occurs twice):

Code:

usergroupid NOT IN (3,4);
Replace with:
Code:

usergroupid NOT IN (3,4,8);
Find next and repeat. You can add other user groups (by usergroup id #) if you wish just follow the format between the ()'s and you should be good to go :)

MattGarner 06-09-2013 09:41 AM

Quote:

Originally Posted by John Lester (Post 2424850)
Edit includes/functions_databuild.php

Search for (occurs twice):

Code:

usergroupid NOT IN (3,4);
Replace with:
Code:

usergroupid NOT IN (3,4,8);
Find next and repeat. You can add other user groups (by usergroup id #) if you wish just follow the format between the ()'s and you should be good to go :)

That didn't seem to do anything :(

kh99 06-09-2013 02:03 PM

It won't take effect until something causes the user stats to be rebuilt. One way to force it would be to manually run the "Daily Statistics Log" scheduled task.

John Lester 06-09-2013 06:24 PM

Quote:

Originally Posted by kh99 (Post 2426860)
It won't take effect until something causes the user stats to be rebuilt. One way to force it would be to manually run the "Daily Statistics Log" scheduled task.

Oh crap, yea I forgot to mention that it wouldn't change until someone registers, or you create a new member, or delete a member. Sorry :p

Bow Walker 06-11-2013 06:04 PM

I would also like to be able to have the 'banned' users not appear in the 'Current Active Users'.

But - being a total neophyte as far as php code is concerned - I'd appreciate being directed to where I can insert the user id of the banned members, thus causing them to be invisible to registered members browsing my forum.

Thank you in advance for any help.

kh99 06-12-2013 10:33 AM

Well, John Lester pretty much summed it up in post #2: you need to get a copy of the file includes/functions_databuild.php on your local computer (either get it from the vb distribution, or download it via ftp from your server). If you download it from your server, make a copy of it on your computer so that you save the original. This way if something goes wrong with the changes, you should just be able to upload the unchanged file to fix it. If you're using the one from the vb distribution, make a copy of it before editing it.

Next you need to edit the file using a programming editor (or use notepad if you don't have anything else - don't use Word or wordpad or other word processing editor). Find this:
Code:

usergroupid NOT IN (3,4)

which is in two places: one is on a line by itself, the other is near the end of a long line. In both places you want to add 8 to the list, so it looks like this:
Code:

usergroupid NOT IN (3,4,8)
Then save it and use ftp to upload it to your server, in the includes directory, overwriting the existing file.

John Lester 06-12-2013 05:30 PM

There is no place to enter a userid, you can only do this by usergroupid. If you want specific individuals to not show up, but don't want them banned you will have to create a user group just for them and add the usergroupid as explained earlier in the thread.

kh99 06-12-2013 05:50 PM

Quote:

Originally Posted by John Lester (Post 2427720)
There is no place to enter a userid, ...


Oh right. Obviously I thought he meant usergroupid. :o

MattGarner 06-17-2013 04:27 PM

Quote:

Originally Posted by kh99 (Post 2426860)
It won't take effect until something causes the user stats to be rebuilt. One way to force it would be to manually run the "Daily Statistics Log" scheduled task.

Quote:

Originally Posted by John Lester (Post 2426915)
Oh crap, yea I forgot to mention that it wouldn't change until someone registers, or you create a new member, or delete a member. Sorry :p

Even after that being done manually or a user has joined up recently, they are still showing up.

John Lester 06-17-2013 11:24 PM

Are you sure you found both instances of the code and made the change to each instance? Also, did you input the proper user group id?

If you would post the two bits of code we can look it over and see if there's a mistake.

Terrablade 11-07-2013 09:00 PM

No such thing as usergroupid NOT IN (3,4); in vb 3.8.7. pl3

I cant find none of that to modify... is it different?


All times are GMT. The time now is 04:54 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.01470 seconds
  • Memory Usage 1,739KB
  • 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
  • (6)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (12)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