vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   how to create a rating column with rating values displayed (https://vborg.vbsupport.ru/showthread.php?t=266751)

radiofranky 07-13-2011 04:32 PM

how to create a rating column with rating values displayed
 
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 05:15 PM

Open ForumDisplay Template

Find:

Code:

<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:

Code:

<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&nbsp;</a><vb:else /><a href="forumdisplay.php?f={vb:raw foruminfo.forumid}&daysprune=-1&order=desc&sort=voteavg">Rating&nbsp;</a>
</vb:if></span>


brandondrury 12-19-2012 07:34 PM

Alright! This is exactly what I was looking for! Thanks!

Brandon

furnival 04-14-2014 09:25 PM

This is great, thank you Badshah93, but is there any way of having an up/down arrow beside the word "Rating", please?

Quote:

Originally Posted by Badshah93 (Post 2220135)
Add After That:

Code:

<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&nbsp;</a><vb:else /><a href="forumdisplay.php?f={vb:raw foruminfo.forumid}&daysprune=-1&order=desc&sort=voteavg">Rating&nbsp;</a>
</vb:if></span>



Kirauni 08-05-2014 12: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.


All times are GMT. The time now is 10:40 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.03438 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete