Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
User Rank by Posts Details »»
User Rank by Posts
Version: 1.0.0, by Farcaster Farcaster is offline
Developer Last Online: Jun 2014 Show Printable Version Email this Page

Category: Statistics Modifications - Version: 3.6.7 Rating:
Released: 07-12-2007 Last Update: Never Installs: 63
DB Changes Template Edits
Additional Files  
No support by the author.

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 07-13-2007, 11:06 PM
Spank Spank is offline
 
Join Date: Jan 2007
Location: Scotland
Posts: 809
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I see what you mean, numbered ranks. Nice idea. ^_^
Reply With Quote
  #13  
Old 07-14-2007, 12:48 AM
alessai alessai is offline
 
Join Date: Feb 2006
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great instaled.....
Reply With Quote
  #14  
Old 07-14-2007, 12:56 AM
2impulsiv 2impulsiv is offline
 
Join Date: Jan 2007
Location: Australia
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Love your work Farcaster....


Cheers..

Reply With Quote
  #15  
Old 07-14-2007, 04:07 PM
aakhan136 aakhan136 is offline
 
Join Date: Nov 2006
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks
Reply With Quote
  #16  
Old 07-14-2007, 05:45 PM
johnrizz's Avatar
johnrizz johnrizz is offline
 
Join Date: Apr 2006
Posts: 333
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a cool hack, thanks!

Farcaster, I have a question! On the bottom of this pic I see a mod that I would love to have. haha! Its the Distance to Member: Did you make this or do you know were I can get it?

Reply With Quote
  #17  
Old 07-14-2007, 06:03 PM
Andyucs's Avatar
Andyucs Andyucs is offline
 
Join Date: Nov 2006
Location: Okcular, Turkey
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice tnx
Reply With Quote
  #18  
Old 07-15-2007, 02:12 AM
Farcaster Farcaster is offline
 
Join Date: Dec 2005
Posts: 386
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by stone0075 View Post
Distance to Member: Did you make this or do you know were I can get it?
Yes, it is part of a larger hack I wrote. My site features a "Player Registry" that members can search for other members within a certain radius of their location and by a number of other criteria. Its proprietary, I fear, and not one I have published publicly.
Reply With Quote
  #19  
Old 07-30-2007, 06:42 AM
Majest Majest is offline
 
Join Date: Apr 2006
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Farcaster View Post
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.
How would one do that?
Reply With Quote
  #20  
Old 07-30-2007, 08:05 PM
BigDog56 BigDog56 is offline
 
Join Date: Jan 2007
Posts: 430
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Got it installed, works as advertised! Thank you!
Reply With Quote
  #21  
Old 07-31-2007, 09:06 AM
ymy ymy is offline
 
Join Date: Feb 2003
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed and work fine

Thanks

Ymy

.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:03 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05462 seconds
  • Memory Usage 2,308KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete