Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

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: 3.0.1 Rating:
Released: 06-06-2004 Last Update: Never Installs: 15
 
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!

View screenshots for examples!

Instructions

Open forumdisplay.php and find
PHP Code:
eval('print_output("' fetch_template('FORUMDISPLAY') . '");'); 
add above (change $topposterno to how many top posters per forum you want to show)
PHP Code:
// Top Posters Per Forum hack v1.0 by Gary W.
$topposterno 5;

$topposter $DB_site->query("SELECT COUNT(post.postid) AS posts,userid,username FROM " TABLE_PREFIX "post AS post
    LEFT JOIN " 
TABLE_PREFIX "thread AS thread ON post.threadid = thread.threadid
    LEFT JOIN " 
TABLE_PREFIX "forum AS forum ON forum.forumid = thread.forumid
    WHERE forum.forumid=
$forumid
    GROUP BY userid ORDER BY posts DESC LIMIT 0, 
$topposterno");

$topposterno2 $topposterno;

while (
$top $DB_site->fetch_array($topposter))
{
  
$topposterno--;

  if (
$topposterno == 0)
  {
    
$and "and ";
    
$final "!";
  }
    
    eval (
'$topposters .= "' $comma fetch_template('topposters') . '";');
  
//eval ("\$topposters .= \"" . $comma . fetch_template("topposters"). "\";");
  
$comma ",";

open FORUMDISPLAY template and find
HTML Code:
$navbar
below add
HTML Code:
<td><span class="smallfont">This forum's top $topposterno2 posters are: $topposters</span></td>
add a template named topposters with following content
HTML Code:
$and<b><a href="member.php?$session[sessionurl]u=$top[userid]">$top[username]</a></b> with <b>$top[posts]</b> posts$final
OPTIONAL STEPS

If you want it to work faster (on large boards especially),
then run the following query on your database:
[sql]
ALTER TABLE post ADD INDEX (username);
[/sql]

Show Your Support

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

Comments
  #2  
Old 06-07-2004, 12:24 AM
lifesourcerec's Avatar
lifesourcerec lifesourcerec is offline
 
Join Date: Jan 2002
Posts: 429
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks! Now, is there a way to put it in a table (something simple like the "attached thumbnails" box). would make them look more organized.
Reply With Quote
  #3  
Old 06-07-2004, 12:35 AM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm not one for cosmetics; so if someone wants to give some HTML code on where it should go, then be my guest, and please share it as well I just provide the functionality
Reply With Quote
  #4  
Old 06-07-2004, 12:40 AM
lifesourcerec's Avatar
lifesourcerec lifesourcerec is offline
 
Join Date: Jan 2002
Posts: 429
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed it without problems
Reply With Quote
  #5  
Old 06-07-2004, 05:46 AM
MindTrix's Avatar
MindTrix MindTrix is offline
 
Join Date: Apr 2002
Location: United Kingdom
Posts: 1,833
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice one Gary Thanks for releasing
Reply With Quote
  #6  
Old 06-07-2004, 10:26 PM
lifesourcerec's Avatar
lifesourcerec lifesourcerec is offline
 
Join Date: Jan 2002
Posts: 429
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Removed this hack as it does a number on server load.
Reply With Quote
  #7  
Old 06-13-2004, 05:31 PM
HakkieDEV HakkieDEV is offline
 
Join Date: Jun 2004
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by lifesourcerec
Removed this hack as it does a number on server load.
I agree, also installed this hack, but even with the database fix it created too much server load.
Reply With Quote
  #8  
Old 06-19-2004, 11:03 AM
Photon Photon is offline
 
Join Date: Dec 2001
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed it but I removed it because it doesn't look nice for my style..
Reply With Quote
  #9  
Old 07-18-2004, 01:53 AM
dubumb dubumb is offline
 
Join Date: Jul 2004
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wow thanks... This is such a great hack... Thank you so much!!!!
Reply With Quote
  #10  
Old 08-01-2004, 06:00 PM
SmartGnome's Avatar
SmartGnome SmartGnome is offline
 
Join Date: Mar 2003
Location: Amsterdam
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the hack, install clicked........ and now is the time to play with some cosmetics here :laugh:
Reply With Quote
Reply

Thread Tools

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 09:32 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.05570 seconds
  • Memory Usage 2,300KB
  • Queries Executed 23 (?)
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
  • (3)bbcode_html
  • (2)bbcode_php
  • (1)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
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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