Back to vBulletin 3.6 Add-ons

User Rank by Posts
Mod Version: 1.0.0, by Farcaster

This modification is in the archives.
vB Version: 3.6.7 Rating: (3 votes - 4.33 average) Installs: 63
Released: 13 Jul 2007 Last Update: Never Downloads: 281
Not Supported DB Changes Template Edits Additional Files  

This is a quick modification I made for my own forum to rank all of my users by the number of posts they've made and make that ranking available on the postbit and profile pages. No extra queries are added, except for the cron job that runs to update the statistics at an interval you specify, which will add 4 queries when called.

This hack was only tested on 3.6.5, but it may work on 3.5.x as well. If anyone confirms that, let me know.

Installation Instructions
- 1 XML upload
- 1 File upload
- 2 optional template modifications

1. Upload the file rank_users_by_post.php to your forum/includes/cron directory.
2. Use the Product Manager to import the product file product-rah_user_rank_by_posts.xml
3. By default, user ranks will be updated once per hour. If you want to change the frequency of the updates, go into the Schedule Task Manager and find the job "Update User Post Ranks". You may change this script to run as often or as little as you like. You can run it manually to get an idea of how long it will take to run, which give you a good idea of how frequently you can safely run it. (On my forum, it runs almost instantaneously with over 2000 members.)
4. If you want to add the poster's rank to each post, you can add it anywhere by referencing the $post[postrank] variable. On my forums, I added it just under the users post count by finding:

Code:
                    <div>
                        $vbphrase[posts]: $post[posts]
                    </div>
And below that, add:

Code:
<if condition="$post[postrank]"><div><b>$vbphrase[rah_urbp_rank]: #$post[postrank]</b></div></if>
5. You can also reference the rank on the profile page. On my forums, I added it just above the user's last activity by editing the MEMBERINFO template and finding:

Code:
<if condition="$show['lastactivity']">
And above that, add:

Code:
<if condition="$userinfo[postrank]"><div>$vbphrase[rah_urbp_rank]: #$userinfo[postrank]</div></if>
And that's all there is to this one. It is a very simple hack, but I figured I'd share.

Standard (Global) Phrases Used:
rah_urbp_rank = "Poster Rank"

Known Bugs:
None.

Revision History:

v1.0.0 - Initial Release

Download

This modification is archived, downloads are still allowed.

File Type: %1$s rah_user_ranking_by_posts.zip (1.7 KB, 307 downloads)

Screenshots

Click image for larger version
Name:	postbit.PNG
Views:	2098
Size:	44.3 KB
ID:	66909   Click image for larger version
Name:	profile.PNG
Views:	1366
Size:	30.5 KB
ID:	66910  


vblts.ru supports vBulletin®, 2022-2024