vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Rating (https://vborg.vbsupport.ru/showthread.php?t=256162)

AlexisMedia 12-30-2010 12:15 AM

Rating
 
I need a positive only rating system. I've searched the heck out of the forums and can't seem to find something that would work aside from vB3.

I've been to a site before that seems to use vB's rating system but it forces every vote to be all stars making it positive only.

Any ideas on how to get some sort of positive only system going? I don't want people to be able to rate other peoples work 1 or 2 stars as it's more of an encouragement system and people aren't purchasing products or anything.

Ideas?

Thanks!

--------------- Added [DATE]1293733698[/DATE] at [TIME]1293733698[/TIME] ---------------

2 ideas.

1. Change all the images to be 5 stars.

or

2. Is it ok to just remove 4 of the li's out of the showthread template that contains the options? Then they would only have a 5 star rating option... just not sure if that's ok to do?

Thanks!

AlexisMedia 12-31-2010 05:22 PM

Can anybody help me out with this. Any idea if these options are ok to do?

2 ideas.

1. Change all the images to be 5 stars.

or

2. Is it ok to just remove 4 of the li's out of the showthread template that contains the options? Then they would only have a 5 star rating option... just not sure if that's ok to do?

Thanks!

metalguy639 12-31-2010 05:38 PM

If you change all the images to be 5 stars then it may get crowded if they use the other ratings. your better bet would be to try and remove the <li> tags as you were thinking, Keep a backup of your template though before doing that if you have changes already in it.

AlexisMedia 12-31-2010 05:41 PM

ok, I'll try it. Thanks for the response. I just wanted to be sure I won't damage the whole forum or something crazy by removing those li's. Thanks...

metalguy639 12-31-2010 05:44 PM

Yeah I hear ya. :) If you copy and paste the entire template that you are working on into a notepad text file and save it, you can always restore it if something should go wrong.

AlexisMedia 12-31-2010 10:37 PM

Ok, cool. that seems to have worked. Only problem is that the number of times a thread has been rated doesn't seem to appear? I've voted on it with 3 different accounts and it doesn't show "3" times or anything? I've checked my admin settings and it's set to display at 1. Any ideas?

Thanks!

metalguy639 01-01-2011 03:34 AM

You must have deleted the code that did that function. What was the code you deleted do you still have it?

AlexisMedia 01-01-2011 05:12 PM

Before:
Code:

                        <vb:if condition="$show['threadrating']">
                                <li class="popupmenu" id="threadrating">
                                        <h6><a class="popupctrl" href="javascript://">{vb:rawphrase rate_this_thread}</a></h6>
                                        <div class="popupbody popuphover">
                                                <form action="threadrate.php" method="post" id='showthread_threadrate_form'>
                                                        <ul>
                                                                <li id="threadrating_current"<vb:if condition="!$show['rating']"> class="hidden"</vb:if>><label>
                                                                        <span class="rating r{vb:raw thread.rating}">{vb:rawphrase current_rating}</span>
                                                                </label></li>
                                                                <vb:if condition="$show['ratethread']">
                                                                        <li><label for="r5"><span class="rating r5">
                                                                                {vb:stylevar dirmark}<input type="radio" name="vote" value="5" id="r5" {vb:raw votechecked.5} tabindex="20" /> {vb:rawphrase excellent}
                                                                        </span></label></li>
                                                                        <li><label for="r4"><span class="rating r4_{vb:stylevar right}">
                                                                                {vb:stylevar dirmark}<input type="radio" name="vote" value="4" id="r4" {vb:raw votechecked.4} tabindex="21" /> {vb:rawphrase good}
                                                                        </span></label></li>
                                                                        <li><label for="r3"><span class="rating r3_{vb:stylevar right}">
                                                                                {vb:stylevar dirmark}<input type="radio" name="vote" value="3" id="r3" {vb:raw votechecked.3} tabindex="22" /> {vb:rawphrase average}
                                                                        </span></label></li>
                                                                        <li><label for="r2"><span class="rating r2_{vb:stylevar right}">
                                                                                {vb:stylevar dirmark}<input type="radio" name="vote" value="2" id="r2" {vb:raw votechecked.2} tabindex="23" /> {vb:rawphrase bad}
                                                                        </span></label></li>
                                                                        <li><label for="r1"><span class="rating r1_{vb:stylevar right}">
                                                                                {vb:stylevar dirmark}<input type="radio" name="vote" value="1" id="r1" {vb:raw votechecked.1} tabindex="24" /> {vb:rawphrase terrible}
                                                                        </span></label></li>
                                                                        <li class="formsubmit"><input type="submit" class="button" value="{vb:rawphrase vote_now}" tabindex="25" /></li>
                                                                <vb:else />
                                                                        <li><label>{vb:rawphrase already_rated_this_thread}</label></li>
                                                                </vb:if>
                                                        </ul>
                                                        <input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
                                                        <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
                                                        <input type="hidden" name="t" value="{vb:raw threadid}" />
                                                        <input type="hidden" name="pp" value="{vb:raw perpage}" />
                                                        <input type="hidden" name="page" value="{vb:raw pagenumber}" />
                                                </form>
                                        </div>
                                        <script type="text/javascript">
                                        <!--
                                                vB_AJAX_ThreadRate_Init('showthread_threadrate_form', {vb:raw threadinfo.threadid});
                                        //-->
                                        </script>
                                </li>
                        </vb:if>

After:
Code:

<vb:if condition="$show['threadrating']">
                                <li class="popupmenu" id="threadrating">
                                        <h6><a class="popupctrl" href="javascript://">{vb:rawphrase rate_this_thread}</a></h6>
                                        <div class="popupbody popuphover">
                                                <form action="threadrate.php" method="post" id='showthread_threadrate_form'>
                                                        <ul>
                                                                <li id="threadrating_current"<vb:if condition="!$show['rating']"> class="hidden"</vb:if>><label>
                                                                        <span class="rating r{vb:raw thread.rating}">{vb:rawphrase current_rating}</span>
                                                                </label></li>
                                                                <vb:if condition="$show['ratethread']">
                                                                        <li><label for="r5"><span class="rating r5">
                                                                                {vb:stylevar dirmark}<input type="radio" name="vote" value="5" id="r5" {vb:raw votechecked.5} tabindex="20" /> {vb:rawphrase excellent}
                                                                        </span></label></li>
                                                                        <li class="formsubmit"><input type="submit" class="button" value="{vb:rawphrase vote_now}" tabindex="25" /></li>
                                                                <vb:else />
                                                                        <li><label>{vb:rawphrase already_rated_this_thread}</label></li>
                                                                </vb:if>
                                                        </ul>
                                                        <input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
                                                        <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
                                                        <input type="hidden" name="t" value="{vb:raw threadid}" />
                                                        <input type="hidden" name="pp" value="{vb:raw perpage}" />
                                                        <input type="hidden" name="page" value="{vb:raw pagenumber}" />
                                                </form>
                                        </div>
                                        <script type="text/javascript">
                                        <!--
                                                vB_AJAX_ThreadRate_Init('showthread_threadrate_form', {vb:raw threadinfo.threadid});
                                        //-->
                                        </script>
                                </li>
                        </vb:if>

Looks right to me? Is this even the template that part is in? To be fair, I never checked to see if this worked before I made these changes. Not sure... Ideas?

metalguy639 01-01-2011 06:27 PM

Hmmm what you did looks like what I would of done. I'm not sure where else you might have to edit. It could be that you need to edit another template as well or elsewhere in the template. You can try to use a FireFox add-on called Firebug to see the code tags and find them. Also I believe that somewhere in the admincp you can make it where the tags show in a page source view of your forum. You might want to enable that feature if you have not already. I don't remember exactly where it is though so you may have to do a search for it. What version of vb 4 are you using?


All times are GMT. The time now is 03:51 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.01327 seconds
  • Memory Usage 1,775KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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