![]() |
How can't I show banned users in online page?
Hello,
How can't I show banned users in online page? Thanks |
you can create one plugin at
forumhome_loggedinuser_query WIth This Code Code:
$hook_query_where .=" AND user.usergroupid != 8"; Note: This will hide ban user from Who's Online for everyone |
Okay, Thank you very much
|
Quote:
|
Quote:
prodct: vbulletin hook: forumhome_loggedinuser_query title: hide banned users exec. order: 5 php code: PHP Code:
|
Oh my that's not how I was trying to do it :D Thanks BoP5 :)
|
I've done that code and its still showing the banned usergroup on the who's online
|
Quote:
|
Im trying to do it on a 3.8.3.
Would that effect it at all? |
No it's the same on all 3.8/3.7 versions... But I noticed you posted your index.php isn't working- so that would make a difference since this is only visible on index.php.
|
They want it on the who's online page. ;)
|
Quote:
this code will work for forumhome. |
Quote:
|
Try using the same plugin code, only use hook location "online_query" instead.
|
Quote:
Guests are not counted. Example: Active Users: 316 (316 members and 0 visitors.) Don't show banned users, but not counted visitors |
What exactly are you trying to do and on what page? Who's Online or Who's logged in? (They are different pages.)
|
Quote:
Not forum/online.php |
Indeed I can confirm it does remove all the guests as well. Unfortunately I have no explanation as to why though... This is a pretty simple query adjustment... :confused:
|
Have you tried:
Code:
$hook_query_where .=" AND user.usergroupid <> '8'"; |
Quote:
Anyway, i have made a new code for this thing, which is much better than previous one. Why it is better: it counts banned user in online list but don't show their username. (like invisible mode) Plugin Hook: forumhome_loggedinuser Code: Code:
if ($loggedin['usergroupid'] == 8) { Note: 1. where 8 is the banned usergroupid. 2. And don't forget to remove old plugin (if u created) for this thing. |
Quote:
|
Quote:
|
Quote:
|
Works in forumhome, Currently Active Users, but increase server load (2000 users online)
Quote:
|
Quote:
if u have 2000 member (excluding guest) online, then i think you should not even have currently active users list. |
Quote:
|
Quote:
Find: PHP Code:
PHP Code:
|
Why not just use the hook?
|
Quote:
|
Kind of defeats the purpose of making it easy on upgrades. There has to be an easier way to accomplish it. I will see what I can figure out.
|
Hello,
For Plugin This: Who Has Visited Today Total members that have visited the forum in the last 24 hours: What should I do to not display the members of the banned? Thanks |
Since guest have also usergroup 8 (which is strange I guess) you may something like this in your plugin:
Code:
$hook_query_where .= " AND (usergroupid != 8 OR posts=0)"; |
gave me some headache but finally came up with this solution for the online_query hook:
PHP Code:
The showmember condition is needed, because otherwise ISNULL is checked twice and non-guests are included again. |
All times are GMT. The time now is 10:08 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|