Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Top Posters per Forum (shown in forumdisplay) Details »»
Top Posters per Forum (shown in forumdisplay)
Version: 1.00, by Gary King Gary King is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 07-31-2003 Last Update: Never Installs: 21
 
No support by the author.

What does this hack do?

This hack shows the top poster in each forum, in the forumdisplay template (so when viewing the forum, you can see the top poster for that forum).

The line that displays the top poster for the forum is in the template, so you can move it anywhere you want it to show up!

Modifications

Change Log

version 1.1
  • enables you to specify how many top posters you want to have displayed per forum
  • adds commas in between usernames in the top posters list

Screenshots
forumdisplay v1.1
forumdisplay v1.0

Enjoy!

Show Your Support

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

Comments
  #12  
Old 08-02-2003, 02:01 AM
karmanis karmanis is offline
 
Join Date: Jun 2003
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you very much Gary! (karmanis clicks Install )

However, to make this hack a must, I would suggest you make 2 modifications...


1) Make visible the 10 most active members instead of only the first. (Such a thing will be in coherence with the title of the hack, "top posterS")

This would extend the functionality of the hack, and make it act as a whole information block instead of a simple line. Furthermore, it is more tempting if 10 users could see their name, rather than have just one been satisfied.



2) Modify the query to get the posters from not only the current forum but from the forum and its childforums .


The last one is going to solve the problem stated by TonTon, which also happens to me and is caused because if you are currently at a category and not at a forum, the query does not find any posts in the category so it can not find any posters to show.

Making the query to get the posts from all the childforums, the hack will be able to show the top posters like a charm.



Thanks again,
this is going to be a hack in great demand here at vb.org !
Reply With Quote
  #13  
Old 08-02-2003, 02:03 AM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

v1.1 coming right up!
Reply With Quote
  #14  
Old 08-02-2003, 09:50 PM
Ryan Ashbrook's Avatar
Ryan Ashbrook Ryan Ashbrook is offline
 
Join Date: Dec 2002
Location: Cincinnati, Ohio
Posts: 422
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice hack, however, I have had members change their names from what they originally registered with, and your hack shows their very first name.

How can I fix this?
Reply With Quote
  #15  
Old 08-03-2003, 12:47 AM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, my hack pulls the usernames from the user table, so unless you've changed things so that your users' usernames aren't from that table anymore, then you'll have to modify the hack accordingly.
Reply With Quote
  #16  
Old 08-03-2003, 12:58 AM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Top Posters per Forum v1.1 is now out!

New features include:
  • enables you to specify how many top posters you want to have displayed per forum
  • adds commas in between usernames in the top posters list

Stay tooned for other updates and announcements!
Reply With Quote
  #17  
Old 08-03-2003, 10:07 AM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would this work faster with an index on the post table
Reply With Quote
  #18  
Old 08-03-2003, 12:24 PM
karmanis karmanis is offline
 
Join Date: Jun 2003
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

...Where is the attachment for version 1.1 ?
Does this retrieve the posters counting also the posts inside subforums ???

thanx
Reply With Quote
  #19  
Old 08-03-2003, 12:45 PM
LadyBeth LadyBeth is offline
 
Join Date: Jun 2003
Location: East Coast
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can this be modified so that the Administrator is not included?
THanks!
Beth
Reply With Quote
  #20  
Old 08-03-2003, 01:14 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 09:24 AM karmanis said this in Post #17
...Where is the attachment for version 1.1 ?
Does this retrieve the posters counting also the posts inside subforums ???

thanx
In the first post of this thread. If you don't get it, then try clearing your cache
Reply With Quote
  #21  
Old 08-03-2003, 01:24 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 09:45 AM LadyBeth said this in Post #18
Can this be modified so that the Administrator is not included?
THanks!
Beth
Replace the
PHP Code:
// Top Posters Per Forum hack v1.0 by Gary W.
$topposter=$DB_site->query("SELECT COUNT(post.postid) AS posts,userid,username FROM post
    LEFT JOIN thread ON post.threadid = thread.threadid
    LEFT JOIN forum ON forum.forumid = thread.forumid
    WHERE forum.forumid=
$forumid
    GROUP BY userid ORDER BY posts DESC LIMIT 0,
$topposterno"); 
with
PHP Code:
// Top Posters Per Forum hack v1.0 by Gary W.
$topposter=$DB_site->query("SELECT COUNT(post.postid) AS posts,post.userid,post.username FROM post
    LEFT JOIN thread ON post.threadid = thread.threadid
    LEFT JOIN forum ON forum.forumid = thread.forumid
    LEFT JOIN user ON user.userid = post.userid
    WHERE forum.forumid=
$forumid AND user.usergroupid != 6
    GROUP BY userid ORDER BY posts DESC LIMIT 0,
$topposterno"); 
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 10:22 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04526 seconds
  • Memory Usage 2,313KB
  • 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
  • (2)bbcode_php
  • (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