The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Help Finding Code...
I'm trying to write a mod to not count spiders towards the maxloggedin variable that vB stores in the database. I've looked through amykhar's spider hack (with her permission) to try and determine what to do. It's helped me a little bit, as I see how she is popping the spiders to the stack, and unpopping them (technically, its an array, but oh well) to print them. What I'm trying to find is where vB actually counts the maxloggedin variable and updates it in the database. I figure by installing her code there and adding mine to that file, I can get this to work.
My problem is, I can't find where the vB calculates the maxloggedin users. Can anyone help me find this location in the source code? Thanks. Note: I asked about this in requests as well, but figured I could work on it on my own too. If you want to see my thread there... https://vborg.vbsupport.ru/showthread.php?t=101401 |
#2
|
|||
|
|||
The only place I can find where build_datastore() is called to build maxloggedin is in forumhome.php (or index.php if you've got a default install).
Seems a bit flawed, because most of my members dont visit that page (which might explain why my numbers are so low |
#3
|
||||
|
||||
Well, I was thinking index.php, but that seemed flawed to me too.
*goes to look* |
#4
|
|||
|
|||
It is done in the index.php. The number is determined from the session table, and then written to the datastore.
It doesn't matter if people visit the index.php, they are always logged in the session table. All that is needed is that sometimes someone visits index.php to update the counters in the datastore. You could either count the number of spiders in the index.php, based on the user agent stored in the session table, or add a is_spider column to the session table and set that accordingly at the time the session row is written and then count selecting the is_spider column. |
#5
|
||||
|
||||
What I was thinking was to find where it actually adds the users together to find the number, then add up the number of spiders currently found, and subtract it to find the total number. Its kindof a bad workaround, but it would work.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|