Helpful Information
 
 
Category: vBulletin 2.x
Cont.: [RELEASE v2] Top Posters

tubedogg on 05.14.2001

The problem here is the installation of the new code, which reset the stats. Wait three days and look at it each day. It should start recording correctly. If it does not, then please come back and show me the stats for each day.


thread:
http://www.vbulletin.com/forum/showthread.php?threadid=16340&pagenumber=3
for what reason is that thread closed by Kier ?
or the hack will not be "supported" any more ?
should it be removed from the forum ?

@tubedogg:

after 3 days, there is the same problem with topposter: allways showing the entries from yesterday.

read the first post.... its been withdrawn due to to many bugs, theres un-installation instructions on it

I have modified the Top Poster script now it works at my Forum (http://ra.tribes.de/vb)
the fault was that there is an "if" Clause where it compares the Dates from $today and $toppostall (or so) and if this values were "!=" it requests the Stats from yesterday
but the Days are not equal on every new day !!! so it writes new stats every day
so I have coded another "if" Clause an in the functions.php I have rewritten the toppostall Funtion into two seperate functions one for posts and one for threads
now it works great

but when tubedogg donīt want to support his script anymore I will not post the modifications

I really didn't want to get involved here, but...

Originally posted by Froschie
the fault was that there is an "if" Clause where it compares the Dates from $today and $toppostall (or so) and if this values were "!=" it requests the Stats from yesterday
but the Days are not equal on every new day !!! so it writes new stats every day

This isn't accurate. Here's a basic idea of how it worked:

During installation, it got stats from yesterday and for so far today and wrote them to a "cache" (a hidden template).
Every time that index.php is called, it compares the date today to the date the "cache" was last updated. If it was not updated today, then it needs to be updated, so then it the ran the gettopall and gettop24 functions. (The gettoptoday function runs every time index.php is run because it's a running total of today and needs to be up-to-date.) The gettopall function would then compare yesterday's stats to the stats in the cache. If yesterday's number of posts was greater than in the "cache", it would rewrite that part of the cache, and same for the thread.

So you see the date comparison had little to do with anything except to see if the cache was up to date.

That being said, Froschie if you wish you may release the rewritten hack as your own, however I will not take any responsibility for it nor will I support it.

Originally posted by Froschie
I have modified the Top Poster script now it works at my Forum (http://ra.tribes.de/vb)
the fault was that there is an "if" Clause where it compares the Dates from $today and $toppostall (or so) and if this values were "!=" it requests the Stats from yesterday
but the Days are not equal on every new day !!! so it writes new stats every day
so I have coded another "if" Clause an in the functions.php I have rewritten the toppostall Funtion into two seperate functions one for posts and one for threads
now it works great

but when tubedogg donīt want to support his script anymore I will not post the modifications

hi Froschie,

well i think tubedogg's hack was great and i will to use it if you post your modification. if you wan't to make it public you can email me :p.

thx
nicky

Hi,

I think this hack does not work with 2.0.0 final. In which files can I include this hack?

I withdrew this hack and am no longer supporting it. It looks like you registered after I discontinued this hack and therefore if you have it it is likely not my version, which I will not support in any case.










privacy (GDPR)