The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Users online for mods/admins only
We runa very busy board and the users online is in excess of 1,000 much of the time. This has an effect on performance and since the users online is not essential to members they don't need it so it's on of the things we are looking to remove from members.
However, the staff of the board do need it. I can hide the display of the users online from members easily enough such that it shows only to mods and admins but of course the query still runs and so this offers no performance benefit. So, I need to be able to set it so that the query to get the users online only actually runs when a mod or admin opens the forum index, and not run at all when a normal member opens the page which isn't a template job. Anybody have any ideas where and how this would be acheived? |
#2
|
||||
|
||||
Here's the line you want to change in the code:
PHP Code:
|
#3
|
|||
|
|||
Thank you.
I found the line of code but no matter where I put the new OR clause it makes no difference - if display is turned off in forum home page options then nobody sees the who's online, if it turned on then everyone sees the who's online. I confess it is early in the morning for me and I've had 3 hours sleep so I may be missing something but any help would be much appreciatted. |
#4
|
||||
|
||||
Quote:
i.e PHP Code:
|
#5
|
|||
|
|||
It's still the same.
I think it may be because I am not sure where to actually put the new bit though to be honest. I've tried it everywhere. If it's here Code:
if (($vbulletin->options['displayloggedin'] == 1 OR $vbulletin->options['displayloggedin'] == 2 AND is_member_of($bbuserinfo,5,6,7) OR ($vbulletin->options['displayloggedin'] > 2 AND $vbulletin->userinfo['userid'])) AND !$show['search_engine']) put it here Code:
if (($vbulletin->options['displayloggedin'] == 1 OR $vbulletin->options['displayloggedin'] == 2 OR ($vbulletin->options['displayloggedin'] > 2 AND $vbulletin->userinfo['userid']) AND is_member_of($bbuserinfo,5,6,7)) AND !$show['search_engine']) here Code:
if (($vbulletin->options['displayloggedin'] == 1 OR $vbulletin->options['displayloggedin'] == 2 OR ($vbulletin->options['displayloggedin'] > 2 AND $vbulletin->userinfo['userid'])) AND is_member_of($bbuserinfo,5,6,7) AND !$show['search_engine']) I must be doing something wrong some where. |
#6
|
||||
|
||||
OK, this is tested and working:
Like Lynne said - "You can just turn the option off in vboptions > forum home page > display logged in users (displayloggedin will equal 0)" Then replace: PHP Code:
PHP Code:
|
#7
|
||||
|
||||
Mosh posted the correct code (I should have spelled it out, sorry). But, you need to make sure you also set that option to NO (which Mosh also restated in his post).
|
#8
|
|||
|
|||
It worked beautifully thank you I can't have been getting it in the right place but once I copied the code as Mosh typed it it worked.
Thank you for your help both of you. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|