The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Top Thank Earners (monthly stats) for non-vb pages Details »» | |||||||||||||||||||||||||||
Top Thank Earners (monthly stats) for non-vb pages
Developer Last Online: Aug 2015
Top Thank Earners (monthly stats) for non-vb pages
Version: 1.02 Author: LBmtb[/email] Last updated: May 3nd, 2007 DESCRIPTION: This displays the top X thank earners in X month. The X's are configurable. You can have multiple tables in a single page. For example: you can have "Top 20 in May 2007" and have "Top 5 in April 2007" or any other combination you can think of. The table it produces is a plain jane table but can be styled with CSS. The table's class is "top_thanks" and the rows have alternating classes ("odd" and "even") in case you want to do alternating colors for the rows. Here's what it looks like: HTML Code:
<table width="100%" cellpadding="0" cellspacing="0" summary="two months ago" class="top_thanks"> <th scope="col">Position</th><th scope="col">Username</th><th scope="col">Thanks Earned</th> <tr class="odd"> <td scope="row">1</td> <td><a href="http://localhost/forum/member.php?u=610">Winston</a></td> <td><a href="http://localhost/forum/search.php?do=findthanks&u=610">97</a></td> </tr> <tr class="even"> <td scope="row">2</td> <td><a href="http://localhost/forum/member.php?u=191">LBmtb</a></td> <td><a href="http://localhost/forum/search.php?do=findthanks&u=191">71</a></td> </tr> </table> If using the caching technique ... the queries are cached for an hour to speed up the page and reduce server load. For more on the PEAR cacheing stuff, read this: http://books.google.com/books?id=iUf...rRRQ#PPA272,M1 A basic understanding of PHP (or be able to follow directions very well) will help a lot here. VERSION HISTORY: 1.00: Initial release 1.01: Made using the cached technique optional. 1.02: Cleaned stuff up. Made it a bit easier to use and configure. REQUIREMENTS: 1) Pear must be setup on your server to use the cached technique. You MIGHT need to do an ini_set() to get the Cache/DB.php available to you. 2) vbSEO is optional. See instructions for how to get vbSEO'ized member urls. 3) Abe's Post Thank You Hack. You may download it here: https://vborg.vbsupport.ru/showthread.php?t=122944 4) The page you use this on needs to have a php extension or if it's html, parse it as php (you can set this in htaccess) INSTALLATION INSTRUCTIONS: 1) Open thanks1-02.php and fill in variables under "FILL IN STUFF BELOW, mk?" 2) Upload thanks1-02.php to your site (same directory where your top thank earner page will be) 3) On the stats page, add the following somewhere before the stats and change first two variables if you'd like: PHP Code:
PHP Code:
thanks() takes two optional arguments. Those arguments are epoch values for the beginning and end of a different month. Example 1: For stats from two months ago, do this: PHP Code:
PHP Code:
DEMO: http://www.socaltrailriders.org/top-thanks.php HELP/TROUBLESHOOTING: I will try and support this mod as much as time allows on the vBulletin.org thread. Customizations to your own website can be done for a fee. PM me about that if necessary. COPYRIGHT: Please do not remove the copyright from the script. DONATE: If you use and appreciate this script, please say thank you by donating something: Donate Show Your Support
|
Comments |
#2
|
|||
|
|||
1st post reserved just in case.
|
#3
|
|||
|
|||
what i want! perfect
|
#4
|
|||
|
|||
nice hack but doesnt work for me
|
#5
|
|||
|
|||
Any error? Where are you stuck?
|
#6
|
|||
|
|||
i getting this error on my self created php file:
Code:
Warning: mkdir(/usr/www/users/xxx/db_cache/): Keine Berechtigung in /usr/local/lib/php/Cache/Container/file.php on line 339 Fatal error: Call to undefined function: query() in /usr/local/lib/php/Cache/DB.php on line 189 |
#7
|
|||
|
|||
The first part of your error is the script running into a problem when trying to make the db_cache folder. It creates that folder inside of the directory that your using the script and it holds the files with the cached queries. I actually also ran into the problem too and instead of f'ing with it, I just created it myself. That's probably the easiest thing to do. And then I chmod'd it 777.
The second part of your error has to do with the query. Might be fixed after the db_cache folder is made. Would you or anyone else want an option to use the regular (non-caching) way of querying the database? It'll avoid that db_cache folder problem. |
#8
|
|||
|
|||
hi thanks for yer message. I created the folder (and chmod), now the error message is reduced:
Code:
Fatal error: Call to undefined function: query() in /usr/local/lib/php/Cache/DB.php on line 189 |
#9
|
|||
|
|||
Possible to put this in the forumhome somehow ?
. |
#10
|
|||
|
|||
What kind of queries are involved here and can I alter it to update cache like every 12 hours instead? I just get a little worried since I have over 1.3 million "thanks" issued on my board. Thanks for any advice you may be able to give.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|