View Full Version : Forum Home "Who's Online" viewable only to moderators
RedWingFan
12-28-2004, 09:38 PM
Our "Who's Online" block is something we'd like to limit to moderator/admin users only. There is probably a conditional I could wrap it in, but I don't yet know which template to hack in vB3.0.3 to accomplish this (I'm thinking "FORUMHOME"), or which conditional I should use (although I know it should check for "member of group ___").
Basically, I just want a handful of usergroups to be able to view this, such as super moderators, admins, super admins and the site owner (who has his own 'group').
Searched here, browsed for awhile, but nothing really clicked as being appropriate.
ericgtr
12-28-2004, 09:42 PM
It's defined in the usergroups. Usergroups > Usergroup Manager > (select group) > Edit Usergroup > Who's Online Permissions
RedWingFan
12-28-2004, 09:44 PM
Oh crud...how the heck did I miss that one??
Thanks Eric. :) Now I've got a few groups to go through and change permissions on.
ericgtr
12-28-2004, 09:46 PM
I know what you mean, after using other boards and moving to VB I was like :surprised: I couldn't believe all the default options that they have. This board is fantastic both from a users and an admins perspective.
RedWingFan
12-28-2004, 09:51 PM
Hold on...does this option turn off the "Who's Online" throughout the whole forum, or just on the forum home page? I only want it turned off on the home page.
Sorry, wasn't clear enough there. I wish there was a different way to choose what displays on the home page, selectable by user group perhaps... ;)
I hear ya, too--I admin other forums using other forum systems. Trying to remember all the different options is hair-pulling time! :D
ericgtr
12-28-2004, 09:54 PM
Do you mean for who's viewing the forum etc.? I am not sure about that one but the "who's online" only displays on the forumhome by default.
RedWingFan
12-28-2004, 09:57 PM
OK, I'll clarify. Under "What's Going On", we have the "Currently Active Users" block--this is the one I'd like to turn off, mainly to eliminate the resource usage to generate it. (So this may be more than a template change, I'm thinking now.) Users can still use the separate "Who's Online" page to view who's on, plus, I still would like to keep active users displayed in the threads and forums.
JonUrban
12-28-2004, 10:31 PM
What part of the "Currently Active Users" is the resource hog? Is there a way to limit the resources used by this module?
:-jon
ericgtr
12-28-2004, 10:36 PM
The way I understand it is that the longer you have the online time set for, say 60 minutes instead of 10 makes it easier on the system and requires less resouces. RedWingFan, what about just pulling that variable out of the "What's going on" section of your FORUMHOME template?
RedWingFan
12-29-2004, 12:00 AM
The way I understand it is that the longer you have the online time set for, say 60 minutes instead of 10 makes it easier on the system and requires less resouces. RedWingFan, what about just pulling that variable out of the "What's going on" section of your FORUMHOME template?
I thought about it, but what I'm now thinking is this: if I yank the variable out, all I'm doing is not displaying the contents of it. (Or if I wrap it in a conditional so only mods/admins can view it.) In other words, the variable is still being populated from the database, but all we're doing is not displaying it, when we yank it out of the template. Best thing I could think of is to possibly find out which page the variable is, maybe wrap it in some kind of code to check the usergroup (for admins/mods only), then populate it based on that. In pseudo-code:
IF member_of_groups(mods, admins) {
make database calls to populate $variable
}
RedWingFan
12-29-2004, 12:05 AM
What part of the "Currently Active Users" is the resource hog? Is there a way to limit the resources used by this module?
:-jon
Hi Jon. :) From what I understand, the database query to generate those names is quite resource intensive, and in MySQL, includes a LEFT JOIN, which tends to increase the resource usage even more. I was reading about users with large vBulletin installations over at the Admin Zone forums, and a few of them with large vB forums disabled features like this one.
I did notice when I turned it off completely on the forum home page, the page loaded faster than I've ever seen it. (You can set this under Forum Home Page Options --> Display Logged In Users, with options for No, Yes (random) and Yes (alphabetical). Heck, even if we could find the code that makes this setting conditional per usergroup, it might be a start.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.