Description: The current "Top Posters" addon (or Pal Box) only goes by total post count. Your large numbers will always be on top. This is an alternative which allows it to show the top (active) posters within the last X number of days. Included in the ZIP is an addon file (recenttopposts.php) and a Pal box for IIP (custombox1pal.php). Use whichever you prefer.
Working Under: UBB.Threads 6.2-6.3
Mod Status: Beta
Any pre-requisites: IIP if you want to use the Pal Box
Author(s): JoshPet
Date: 06/14/03
Credits: Musky & JC for requesting it.
Files Altered: none
New Files: recenttopposters.php, custombox1pal.php
Database Altered: none
Info/Instructions: If you are using the Pal Box with IIP - upload to your pals directory. It works with page caching to save load time, so you can configure it as Custom Box 1 in the IIP setup. Upload the pal script to your pals folder, edit the variables at the top - and activate it/position it as Custom Box 1.
If using the addon script, upload and include in your page.
NOTE: For BOTH scripts - there are variables near the top of the files to edit. You can determine the number of top posters to show and how many days it will go back to check. There is even an option to exclude certain forums (like a test forum). This is especially useful if users bogus post in test forums just for the sake of appearing on the top poster's list.
Also Note: This may be a high-load query on forums with a large number of posts. If it slows down your IIP page - I would recommend increasing the cache time so it doesn't update as refreently. Use at your own risk.
Disclaimer: Please backup every file that you intend to modify. If the modification modifies the database, it's a good idea to backup your database before doing so.
Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.
This mod doesn't really have anything to do with the sidebar mod.
This is an addon (like the other addons included with threads) that you can include into a regular php page - and there's a Pal box to act as one of the custom boxes in IIP.
We used the sidebar mod here the whole time we ran 6.2 - so it'll work just fine. However the instructions that I have released were written for 6.3. I didn't want to waste my time writing instructions and trying to support for a old version. So I usually post stuff for the latest version.
If you've had a good bit of experience applying hacks to threads - you could adapt it to 6.2. But I'm sure you'll want 6.3 eventually.
If you needed to run it under 6.2. Myself or one of the other Developers for Hire could be enlisted to install this into 6.2.
I am probably going to wait a while on 6.3 because of all I have done with 6.2.3. One thing I have learned from installing all the hacks I have is that I should have created my own little change log
As far as the sidebar hack goes, for all intesive purposes it does work with the exception of this last snag which doesn't appear to be major enough for me to need to hire someone to fix, is this issue what you are refering to Josh? I realize I ask a lot of questions here and figure this is why I haven't received a response to my last issue regarding sidebar so I have decided to leave it be.
My biggest concern for a hack was to get the Uploads to a remote server and I have pulled it off all on my own, not a real hack by your standards but it does work and is user friendly. Had I not been able to I can assure you I would have hired someone from here for help. You guys are busy people and I understand that, all the help you guys have provided me is appreciated.
I wasn't quite sure what I needed to do to add this in my sidepal, I read the instructions and still wasn't quite sure I have it working just fine but am not sure about how often it will cache? It was at 30 days by default and I changed it to 5, uploaded again and even though the header (Top 10 active posters in the last 5 days) the post amount didn't, it's been over an hour also. Here is what I did to install it (6.2.3) BTW Great hack!
I opened up sidabarpal.php and added this:
Code
if ($sidebar_include['tenrecent'] == $x && !$xused) {<br /> include "$thispath/pals/custombox1pal.php";<br /> $xused = 1;<br /> }
$strWhere = "AND B_Posted BETWEEN '$FirstOfMonth' AND '$LastOfMonth' ";
$query = " SELECT U_Username, COUNT( B_Number ) AS TotalPosts, U_Number FROM w3t_Users, w3t_Posts WHERE U_Number > 1 AND U_Number = B_PosterId $strWhere GROUP BY U_Username ORDER BY TotalPosts DESC $limit ";
This should give you the top posters of the calendar month. With a small adaptation of the SQL query to Josh's pal box you can set this up.
Hey Josh, I don't mean to step on your toes, but I made the recenttopposter.php file more compliant and added some classes that prevented the text from being displayed disproportioned in comparison with other sidepals. For my board, at least, some themes were displaying the text at a larger size. The small changes I made fixed it.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.