![]() |
Top Posters per Forum (shown in forumdisplay)
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:
PHP Code:
HTML Code:
$navbar HTML Code:
<td><span class="smallfont">This forum's top $topposterno2 posters are: $topposters</span></td> HTML Code:
$and<b><a href="member.php?$session[sessionurl]u=$top[userid]">$top[username]</a></b> with <b>$top[posts]</b> posts$final 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] |
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.
|
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 :p
|
Installed it without problems :)
|
Nice one Gary ;) Thanks for releasing
|
Removed this hack as it does a number on server load.
|
Quote:
|
I installed it but I removed it because it doesn't look nice for my style..
|
wow thanks... This is such a great hack... Thank you so much!!!!
|
Thanks for the hack, install clicked........ and now is the time to play with some cosmetics here :laugh:
|
How many queries does this add?
|
Is there any way someone can mod this hack into the vb2 style of showing a forums top posters? I want this hack but it doesn't really fit the way it is, I would prefer that it would make the forums 'replies' on the forumhome a link, so when you click it a vb3 style dropdown box opens with the top however many posters.
I could possibly mod this hack myself to do what I want, but I'm fairly new to this and I'm not sure if A: It'll work o.o, or B: the loading times that it will add to the forumhome. |
I think you could make this code more efficient by grabbing a template once, instead of grabbing it for each user in the list...
But I'm not sure if that would reduce the amount of queries though, just seems logical. Nice hack, I'll play with it! :D |
Gary, you are wonderful !! :)
|
would it be possible to see the top posters per forum all on one page?
|
good hack, i just install
|
Gary, would you port this to 3.5 please?
Thanks. |
All times are GMT. The time now is 08:20 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|