![]() |
User Rank by Posts
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> Code:
<if condition="$post[postrank]"><div><b>$vbphrase[rah_urbp_rank]: #$post[postrank]</b></div></if> Code:
<if condition="$show['lastactivity']"> Code:
<if condition="$userinfo[postrank]"><div>$vbphrase[rah_urbp_rank]: #$userinfo[postrank]</div></if> Standard (Global) Phrases Used: rah_urbp_rank = "Poster Rank" Known Bugs: None. Revision History: v1.0.0 - Initial Release |
One albeit obvious note, ranks will not show up until after the first time the cron job is run. If you want them to show up right away, you need to run the cron job manually.
|
hmm I'll try it out and see how it does.
thanks for the hack :D |
installed :)
|
So it says what rank they are in the postbit, I like ^^
nice work. |
Now that's pretty cool! :D
[high]* projectego clicks install[/high] |
Thanks Farcaster .. nice and simple but useful. Just like the wife :D
Clicked install |
why nobody thought of this before. Thanks Robert !
|
i thought you could do this in vBulletin as standard?
|
Quote:
|
All times are GMT. The time now is 04:30 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|