Thread: Show Thread Enhancements - [AJAX] Your One Click Thread Ratings
View Single Post
  #6  
Old 01-11-2007, 12:08 PM
DPSR DPSR is offline
 
Join Date: Aug 2006
Posts: 154
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

One i modified for my site (attached preview)

If anyone want to use it, here it is--

Add this your style CSS (you can change the colors matching with your forum):
PHP Code:
.news{
padding5px;
background#EDF4FA;
border1px solid #D7DEE4;
color#4E4E4C;

Add the code below $poll (not tested anywhere else)

Quote:
<if condition="$show['threadrating']">
<if condition="$show['ratethread']">
<div style="text-align:left; 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"><!--
document.write('<div class="news" style="line-height:12px;vertical-align:middle;"><div align="center" class="smallfont">');
document.write(' <strong>Quick Rate:</strong>');
document.write(' Lousy <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(' Stunning <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">
<!--
vB_AJAX_OneClick_ThreadRate_Init('oneclick_vote_on e');
vB_AJAX_OneClick_ThreadRate_Init('oneclick_vote_tw o');
vB_AJAX_OneClick_ThreadRate_Init('oneclick_vote_th ree');
vB_AJAX_OneClick_ThreadRate_Init('oneclick_vote_fo ur');
vB_AJAX_OneClick_ThreadRate_Init('oneclick_vote_fi ve');
-->
</script>
</span>
<span id="oneclick_threadrating_current"></span>
<span id="oneclick_threadrating_response"></span>
</div>
</if>
</if>
Change the options (marked with RED color) in above code the way you want.

Click save and rest followed all instructions provided by fci

BIG thanks to fci for the hack
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01158 seconds
  • Memory Usage 1,804KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete