![]() |
Remove Admin from who's online counter
Hello,
i want to reduce the counter "registered users" in the footer if the admin (hidden) is online. Is it possible with the Hook "forumhome_loggedinuser" ? Can someone give me a tip how I can implement this? Thanks peterherman |
Have a look here on how to hide the admin at the online list
https://vborg.vbsupport.ru/showthread.php?t=230238 |
I think this should work (using forumhome_loggedinuser):
Code:
if (!fetch_online_status($loggedin)) |
@borbole
thanks for the tip! @kh99, The Code works perfect! Thank you very very much. Regards peterherman |
1 Attachment(s)
Hello,
sorry, but i have one more question. The counter on the forumhomepage is correct now. But the page "who is online" counts one more registered member as the forum homepage. See also the attached pictures. Is the problem to solve? Thanks |
Try creating a new plugin using hook online_complete and this code:
Code:
$numbermembers -= $numberinvisible; |
Sorry kh99, but the Code doesent work.
With this code the counter in "who is online" is two numerator to large. (from the perspective of an registered user) Example: One registered Member is online and the (hidden) Administrator is online. Then the counter says "3 registered members online" From the perspective of the admin is all ok. |
Seems to work for me - are you sure you got the code right? I don't see how it could increase the member count.
|
I have test it again, but it does not work.
I create a new plugin with th hook online_complete, then i put the code in and activate it and save it. Then i see, that the counter increase the member count. After, i deactivate the plugin, then the counter decrease. |
Hmm...what version of vb do you have?
As a test, try temporarily changing the code to this: Code:
$numbermembers = "$numbermembers, $numberguests, $numberinvisible, $numbervisible"; |
My vb version is 4.1.10
I have test it with the new code. The result is the same as with the first code. |
Quote:
Code:
$numbervisible -= $numberinvisible; In fact it should be OK to leave both lines in there, and then it should still work if you upgrade some day. |
Thank you for your big patience with me, but it does not work yet.
The counter increase the member count now with one point not with two. |
What does it say if you disable that plugin? I think there was a bug in online user counts but I'm not sure when it got fixed. I also don't have vb4.1.10 installed (I'm trying to install it now) so I haven't been able to try it myself.
|
If i disable this plugin then the counter increase the member count two numerator.
|
Yeah, I think that was a bug in vb4.1.10. I have a completely fresh install with only 2 users, and the Who's Online page shows 3 Members (but only when one of them is invisible).
Try this code: Code:
$numbervisible -= (2 * $numberinvisible); |
Yeaaar, it works now perfect.
Thank you very much and thanks for your patience. I think i make an update in a few weeks, then i try the first Code. Thank you an regards peterherman |
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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|