Version: 1.00, by fury
Developer Last Online: Sep 2018
Version: 2.2.x
Rating:
Released: 12-27-2002
Last Update: Never
Installs: 15
No support by the author.
Note to users who have installed Xenon's Optimizing Forumhome v2.0 located here need not install this hack. Furthermore, should you wish to install that hack later on after installing this one, you will need to either uninstall it, or forego the section instructing you to modify the logged in users code.
-------------
This simple hack modifies the Logged in users list on the forumhome, reducing queries by one. This is done by knocking off the extra query for guest counting and instead changing the way the while loop that is used for the logged in users list works.
In other words, less queries = win.
Versions of vBulletin: 2.2.x
Tested on: 2.2.9
Modifications: File only (no database or template modifications)
Example: http://www.otcentral.com/forum/index.php
Except for the showing of one less query on the query count, you can see that the result is truly unnoticeable. Logged in users operates the same exact way as it does before the hack is made.
Although there's not much that can go wrong with this hack, support will be provided in this thread and by email. Preferrably thread in case someone else runs across the same problem.
Update: 12/29/2002 - 0:11
Version 1.0.1 released - Counter was still counting duplicate sessions but not displaying them.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
DISTINCT is there to make sure no sessions get repeated in the logged in user list. I took that out because no matter how many guests would be there, it would only show up with the first. In its place I put a username token check to make sure the list doesn't already have the user in it.
The number of users online on the index is after this mod not the same as the detaild list when you look at the locations and ip. On the index there were 20 and on the detailed list 13! So it looks there is a problem.
It seems to work fine on my board. Have you applied any other hacks that affect the logged in users part of your forumhome? Can I get a link to the board you installed it on?
Nevermind. I see the problem. The check which prevents duplicate sessions from showing is put outside of the registered user counter. The file is fixed, if you already installed this hack here is the code to move:
PHP Code:
if (!substr_count($activeusers_bare,"|||".$username."|||")) {
REPLACE it with this
PHP Code:
if (!substr_count($activeusers_bare,"|||".$loggedin['username']."|||")) {
Surely the vB devs would've thought of this for vB3, I think Kier said vB3's index.php is down to 8 queries... That's not bad considering all the info on it (number of users browsing each forum, last post title, etc)