View Full Version : how to create a rating column with rating values displayed
radiofranky
07-13-2011, 05:32 PM
Hi,
I was wondering how to create an extra column to display sortable thread rating, just like in vb.org.
thanks
Badshah93
07-13-2011, 06:15 PM
Open ForumDisplay Template
Find:
<a href="{vb:link forum, {vb:raw foruminfo}, {vb:raw pageinfo_postusername}}" rel="nofollow">{vb:rawphrase thread_starter}{vb:raw sortarrow.postusername}</a>
Add After That:
<span style="float:right;">
<vb:if condition="$order['desc'] AND $sort['voteavg']"><a href="forumdisplay.php?f={vb:raw foruminfo.forumid}&daysprune=-1&order=asc&sort=voteavg">Rating </a><vb:else /><a href="forumdisplay.php?f={vb:raw foruminfo.forumid}&daysprune=-1&order=desc&sort=voteavg">Rating </a>
</vb:if></span>
brandondrury
12-19-2012, 08:34 PM
Alright! This is exactly what I was looking for! Thanks!
Brandon
furnival
04-14-2014, 10:25 PM
This is great, thank you Badshah93, but is there any way of having an up/down arrow beside the word "Rating", please?
Add After That:
<span style="float:right;">
<vb:if condition="$order['desc'] AND $sort['voteavg']"><a href="forumdisplay.php?f={vb:raw foruminfo.forumid}&daysprune=-1&order=asc&sort=voteavg">Rating </a><vb:else /><a href="forumdisplay.php?f={vb:raw foruminfo.forumid}&daysprune=-1&order=desc&sort=voteavg">Rating </a>
</vb:if></span>
Kirauni
08-05-2014, 01:29 PM
Thank you! That's also what I have been looking for.
Just one additional question:
Is there a way to add the number of voters to the forumdisplay like here on vb.org as well? I mean the summary you get when hover over the rating icons in forumdisplay (Thread rating: XX votes, YY average)?
I'd be glad for a helpful answer.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.