vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Show Thread Enhancements - [AJAX] Your One Click Thread Ratings (https://vborg.vbsupport.ru/showthread.php?t=136162)

magnus 03-21-2007 12:32 PM

For those looking for a clone of the vB.org thread ratings, replace your SHOWTHREAD template with the contents of the attached file.

The modification in the original post is not necessary for the vB.org thead rating style, so you may uninstall it and delete clientscript/vbulletin_ajax_oneclick_threadrate.js if using the attached template.

Jay... 03-21-2007 03:57 PM

Quote:

Originally Posted by magnus (Post 1208759)
For those looking for a clone of the vB.org thread ratings, replace your SHOWTHREAD template with the contents of the attached file.

The modification in the original post is not necessary for the vB.org thead rating style, so you may uninstall it and delete clientscript/vbulletin_ajax_oneclick_threadrate.js if using the attached template.

cheers mate! you are a legend! :D :up:

DPSR 03-26-2007 06:10 AM

If you are using this mod like me, try this one:
(rating result aligned to center and in the style)

Code:

<if condition="$show['threadrating']">
    <if condition="$show['ratethread'] && $threadinfo['vote']==NULL">
        <div class="quickajaxrating" style="text-align:center; padding-bottom: 5px;">
        <span id="oneclick_container">
        <noscript>$vbphrase[rating]:</noscript>
        <form action="threadrate.php?t=$threadid" method="post" id="oneclick_vote_one">
        <input type="hidden" name="s" value="$session[dbsessionhash]" />
        <input type="hidden" name="t" value="$threadid" />
        <input type="hidden" name="pp" value="$perpage" />
        <input type="hidden" name="page" value="$pagenumber" />
        <input type="hidden" name="vote" value="1" />
        <input type="submit" value="1" style="display:none;" />
        <noscript><input type="submit" value="1" /></noscript>
        </form>
        <form action="threadrate.php?t=$threadid" method="post" id="oneclick_vote_two">
        <input type="hidden" name="s" value="$session[dbsessionhash]" />
        <input type="hidden" name="t" value="$threadid" />
        <input type="hidden" name="pp" value="$perpage" />
        <input type="hidden" name="page" value="$pagenumber" />
        <input type="hidden" name="vote" value="2" />
        <input type="submit" value="1" style="display:none;" />
        <noscript><input type="submit" value="2" /></noscript>
        </form>
        <form action="threadrate.php?t=$threadid" method="post" id="oneclick_vote_three">
        <input type="hidden" name="s" value="$session[dbsessionhash]" />
        <input type="hidden" name="t" value="$threadid" />
        <input type="hidden" name="pp" value="$perpage" />
        <input type="hidden" name="page" value="$pagenumber" />
        <input type="hidden" name="vote" value="3" />
        <input type="submit" value="1" style="display:none;" />
        <noscript><input type="submit" value="3" /></noscript>
        </form>
        <form action="threadrate.php?t=$threadid" method="post" id="oneclick_vote_four">
        <input type="hidden" name="s" value="$session[dbsessionhash]" />
        <input type="hidden" name="t" value="$threadid" />
        <input type="hidden" name="pp" value="$perpage" />
        <input type="hidden" name="page" value="$pagenumber" />
        <input type="hidden" name="vote" value="4" />
        <input type="submit" value="1" style="display:none;" />
        <noscript><input type="submit" value="4" /></noscript>
        </form>
        <form action="threadrate.php?t=$threadid" method="post" id="oneclick_vote_five">
        <input type="hidden" name="s" value="$session[dbsessionhash]" />
        <input type="hidden" name="t" value="$threadid" />
        <input type="hidden" name="pp" value="$perpage" />
        <input type="hidden" name="page" value="$pagenumber" />
        <input type="hidden" name="vote" value="5" />
        <input type="submit" value="1" style="display:none;" />
        <noscript><input type="submit" value="5" /></noscript>
        </form>
        <script type="text/javascript"><!--
        var threadid = $threadinfo[threadid];
        document.write('<div class="quickajaxrating2" style="line-height:12px;vertical-align:middle;"><div align="center" class="smallfont">');
        document.write('<strong>Rate this thread:&nbsp;&nbsp;&nbsp;&nbsp;</strong>');
        document.write('    It sucks! <input type="radio" name="rating" id="oneclick_vote_one_submit" value="1" onclick="javascript:void(0);" />&nbsp;&nbsp;');
        document.write('    Below average <input type="radio" name="rating" id="oneclick_vote_two_submit" value="2" onclick="javascript:void(0);" />&nbsp;&nbsp;');
        document.write('    Average <input type="radio" name="rating" id="oneclick_vote_three_submit" value="3" onclick="javascript:void(0);" />&nbsp;&nbsp;');
        document.write('    Above average <input type="radio" name="rating" id="oneclick_vote_four_submit" value="4" onclick="javascript:void(0);" />&nbsp;&nbsp;');
        document.write('    It rocks! <input type="radio" name="rating" id="oneclick_vote_five_submit" value="5" onclick="javascript:void(0);" />&nbsp;&nbsp;');
        document.write('</div></div>');
        -->
        </script>
        <script type="text/javascript" src="clientscript/vbulletin_ajax_oneclick_threadrate.js?v=$vboptions[simpleversion]"></script>
        <script type="text/javascript">
        <!--
            var threadid = $threadinfo[threadid];
            vB_AJAX_OneClick_ThreadRate_Init('oneclick_vote_one');
            vB_AJAX_OneClick_ThreadRate_Init('oneclick_vote_two');
            vB_AJAX_OneClick_ThreadRate_Init('oneclick_vote_three');
            vB_AJAX_OneClick_ThreadRate_Init('oneclick_vote_four');
            vB_AJAX_OneClick_ThreadRate_Init('oneclick_vote_five');
        -->
        </script>
        </span>
        <span id="oneclick_threadrating_current"></span>
        <span id="oneclick_threadrating_response"></span>
        </div>
    </if>
</if>

Add this to CSS style:

Change it the way you want
Code:

.quickajaxrating{
padding: 5px;
background: #EAEAEA;
border: 1px dashed #B53A25;
color: #000000;
}

.quickajaxrating2{
padding: 5px;
background: #EAEAEA;
color: #000000;
}


KEKforce 03-26-2007 12:45 PM

Works very good DPSR! THANKS!!

DPSR 03-27-2007 01:52 AM

Quote:

Originally Posted by KEKforce (Post 1212692)
Works very good DPSR! THANKS!!

No problem, glad you like it :up:

rokked 05-27-2007 11:24 PM

installed, you can see it at http://forums.rokked.com, i moved the hidden form elements above the inlinemod.php form and removed the noscript tags. so im screwing people that dont have js enabled. oh well.

seems to be working fine on 3.6.7

mgurain 09-26-2007 06:13 PM

Hi,,
Can you make it as the one in this mod forum above each mod:
Quote:

Help others by rating [AJAX] Your One Click Thread Ratings.
Excellent Good Average Bad Terrible
We need it as a one xml product not template changes, since we have more than one style installed.

Thanks for your great job.

ragtek 09-26-2007 06:42 PM

it would be nice if you make images(stars) instead of the numbers
with an nice onmouse event

satforce 09-27-2007 12:44 PM

Very good job ..
I install it and it works fine ..
Just one question please !! How can I change stars to number of votes like vb.org ...

Please answer me !!

satforce 09-28-2007 11:14 PM

Please answer !!!


All times are GMT. The time now is 09:16 AM.

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.01299 seconds
  • Memory Usage 1,762KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete