PDA

View Full Version : Most ever online NOT count spiders


womensden
07-30-2005, 10:35 PM
I constantly have spiders on my board. Because of this, I added the option to reset my most ever online list (I have had 400-500 spiders on at once on several occasions). Because I would like to have accurate stats, I would LOVE the option to not include spiders on my most ever online list.

Anyone up to it?

amykhar
07-30-2005, 11:50 PM
In online.php, if you have installed my show spiders on forumhome page mod, you will see a section of code that looks like this:


$numberguests = $numberguests - $numberspiders;
$totalonline = $numbervisible + $numberguests + $numberspiders;

// ### MAX LOGGEDIN USERS ################################
if (intval($vbulletin->maxloggedin['maxonline']) <= $totalonline)
{
$vbulletin->maxloggedin['maxonline'] = $totalonline;
$vbulletin->maxloggedin['maxonlinedate'] = TIMENOW;
build_datastore('maxloggedin', serialize($vbulletin->maxloggedin));
}


(If you haven't installed my mod, you can do the part for online.php only and not show them on forumhome)

Anyhow, to get the effect you want, you would change that chunk to this:


$numberguests = $numberguests - $numberspiders;
$totalonline = $numbervisible + $numberguests + $numberspiders;

// ### MAX LOGGEDIN USERS ################################
if (intval($vbulletin->maxloggedin['maxonline']) <= intval($totalonline-$numberspiders))
{
$vbulletin->maxloggedin['maxonline'] = intval($totalonline - $numberspiders);
$vbulletin->maxloggedin['maxonlinedate'] = TIMENOW;
build_datastore('maxloggedin', serialize($vbulletin->maxloggedin));
}


Hope that helps.

Amy

womensden
07-31-2005, 03:29 AM
hmm... I do have your mod install.. But this doesn't seem to be working for me. It is still including the spiders in most ever online.

Here is my code:


$numberguests = $numberguests - $numberspiders;
$totalonline = $numbervisible + $numberguests + $numberspiders;

// ### MAX LOGGEDIN USERS ################################
if (intval($vbulletin->maxloggedin['maxonline']) <= $totalonline)
{
$vbulletin->maxloggedin['maxonline'] = $totalonline - $numberspiders;
$vbulletin->maxloggedin['maxonlinedate'] = TIMENOW;
build_datastore('maxloggedin', serialize($vbulletin->maxloggedin));
}

amykhar
07-31-2005, 03:50 AM
Did you reset it? It's not going to subtract the spiders who were there from your existing max online. I don't want to reset mine to test. ;)

womensden
07-31-2005, 03:56 AM
yes, I reset it a couple of times. I have spiders online now and it just adds them back to the max.

amykhar
07-31-2005, 02:18 PM
Then I guess somebody else is going to have to take a crack at it for you. This is only possible to test on a live board and I don't want to clear out my stats. Sorry.

womensden
07-31-2005, 04:35 PM
Thanks anyway. :)


Anyone else up for the challenge?