Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Mod Name / Version: Recent Top Posters 1.0

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.


Attachments
84964-RecentTopPosters1.0.zip (0 Bytes, 81 downloads)

Sponsored Links
Joined: Aug 2000
Posts: 1,290
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,290
Finally Rick Add it!


- Custom Web Development
http://www.JCSWebDev.com
Joined: May 2002
Posts: 362
Junior Member
Junior Member
Offline
Joined: May 2002
Posts: 362
Works Greattttttt!! Awesome Josh! Major Kudos to you!

Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
Just out of curiousity, since sidepal isn't working for 6.2 ( See Here) is there another way to inlude this on the main page of the forums?

Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Err.. upgrade to 6.3?


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Sponsored Links
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
sidebarpal worked in 6.2 for me.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369

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.

Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
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.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Let me check that thread - last I remember you wern't able to get in installed under 6.2.

Glad you did. Let me go check that thread.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
https://www.ubbdev.com/forum/showflat.php?Number=77855

There's no replies to that mod? Were you having trouble with it?
Where's the thread where you asked for help.... I must have missed it?

Sponsored Links
Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
Actually I posted it under the thread that it's discussion is under Here (last post on the page)

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
Works great!

Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
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 />				}

And then added this near the top:
Code
$sidebar_include['tenrecent'] = "4";

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Much easier than that. The functionality to turn on/off pal boxes is built in already. So your code is not needed.

Since it's "custombox1"

just open the sidebarpal.php script and near the top - there are settings to turn on/off and arrange all the pal boxes.

All you need to do is turn custom box 1 on in the sidebar.

Then in your normal IIP settings (click the dave lozier copyright notice at the bottom of your page) - you can set the cache time for custombox 1.

Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
I see, I guess my confusion is that there wasn't an actual custombox1pal.php just custombox1.php and that's why I added it in that way.

Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
Also if you want your top posters for the calendar month you need to do the following:

Find:

$tString = str_replace("<<NUMPOSTERS>>",$topposters,$pal_TopPosters[0]);

Below it add

$tString .= " (";
$tString .= date("F");
$tString .= ")";

and change the query to:

$FirstOfMonth = mktime(0,0,0, date("m"),1,date("Y"));
$LastOfMonth = mktime(0,0,0, date("m")+1,1,date("Y")) - 86400;

$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.


Nikos
Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
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.
Attachments
89143-recenttopposters.txt (0 Bytes, 54 downloads)


Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)