Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 07 Jun 2012, 08:53
peterherman peterherman is offline
 
Join Date: Jul 2010
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
Reply With Quote
  #2  
Old 07 Jun 2012, 12:28
borbole's Avatar
borbole borbole is offline
 
Join Date: Jan 2010
Have a look here on how to hide the admin at the online list

http://www.vbulletin.org/forum/showthread.php?t=230238
__________________
My mods.
Reply With Quote
  #3  
Old 07 Jun 2012, 12:38
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
I think this should work (using forumhome_loggedinuser):


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #4  
Old 07 Jun 2012, 12:50
peterherman peterherman is offline
 
Join Date: Jul 2010
@borbole
thanks for the tip!

@kh99,

The Code works perfect!

Thank you very very much.

Regards
peterherman
Reply With Quote
  #5  
Old 07 Jun 2012, 16:37
peterherman peterherman is offline
 
Join Date: Jul 2010
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
Attached Images
File Type: jpg usercounter.jpg (6.5 KB, 8 views)
File Type: jpg usercounter2.jpg (3.9 KB, 8 views)
Reply With Quote
  #6  
Old 07 Jun 2012, 17:30
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Try creating a new plugin using hook online_complete and this code:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #7  
Old 07 Jun 2012, 18:02
peterherman peterherman is offline
 
Join Date: Jul 2010
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.
Reply With Quote
  #8  
Old 07 Jun 2012, 18:07
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Seems to work for me - are you sure you got the code right? I don't see how it could increase the member count.
Reply With Quote
  #9  
Old 07 Jun 2012, 18:24
peterherman peterherman is offline
 
Join Date: Jul 2010
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.
Reply With Quote
  #10  
Old 07 Jun 2012, 18:29
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Hmm...what version of vb do you have?

As a test, try temporarily changing the code to this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #11  
Old 07 Jun 2012, 18:36
peterherman peterherman is offline
 
Join Date: Jul 2010
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.
Reply With Quote
  #12  
Old 07 Jun 2012, 18:40
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Originally Posted by peterherman View Post
My vb version is 4.1.10
Oh, that's the trouble. Try this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


In fact it should be OK to leave both lines in there, and then it should still work if you upgrade some day.
Reply With Quote
  #13  
Old 07 Jun 2012, 18:51
peterherman peterherman is offline
 
Join Date: Jul 2010
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.
Reply With Quote
  #14  
Old 07 Jun 2012, 18:58
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
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.

Last edited by kh99; 07 Jun 2012 at 19:15.
Reply With Quote
  #15  
Old 07 Jun 2012, 19:12
peterherman peterherman is offline
 
Join Date: Jul 2010
If i disable this plugin then the counter increase the member count two numerator.
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Do not count invisible admin in online count totals calorie vBulletin 3.0 Full Releases 12 29 Feb 2008 18:39
Remove Admin/Moderator Post Count from Posts cpradio vBulletin 2.x Full Releases 8 29 Oct 2002 22:29



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 16:24.

Layout Options | Width: Wide Color: