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

MissKalunji 10-03-2007 04:24 PM

that would be good for vbgallery

jGas 03-03-2008 09:29 PM

is it possible to make it work inside the first post of a thread?

thanks

MissKalunji 05-10-2008 01:18 PM

Quote:

Originally Posted by Mr Chad (Post 1156821)
hmm is there a way to hide it, if you already voted.

Quote:

Originally Posted by ubblite (Post 1157841)
Same problem here. The prompt still comes up and when you try to vote again it says:

"According to our records you have already voted on this thread. Changing votes is not allowed."

The ideal way to have it is not show the vote prompt at all once you've voted.

edit: or have it show something like "You've already voted" instead of the vote bar.

Quote:

Originally Posted by ragtek (Post 1347703)
it would be nice if you make images(stars) instead of the numbers
with an nice onmouse event

To answer all of ya'll question

Here's the code i used when someone voted it doesn't show the bar anymore
and i've also added the image (instead) of the words. I've put in bold what i changed and what you can change to put your own image. Pretty basic :)

anyone figure out how to put it somewhere else the under poll? i haven't figured it out yet
I rather this one then magnus simple when you click it rates instead of having to click on submit

Code:

<!-- Thread Rating -->
<if condition="!$show['rating'] AND $show['threadrating'] AND $show['ratethread']">
    <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 Video:&nbsp;&nbsp;&nbsp;&nbsp;</strong>');
        document.write(' You can add your own words here if you want <input type=image src="url to image" name="rating" id="oneclick_vote_one_submit" value="1" onclick="javascript:void(0);" />&nbsp;&nbsp;');
        document.write('you can add your own words here if you want <input type=image src="url to image" name="rating" id="oneclick_vote_two_submit" value="2" onclick="javascript:void(0);" />&nbsp;&nbsp;');
        document.write(' you can add your own words here if you want <input type=image src="url to image" name="rating" id="oneclick_vote_three_submit" value="3" onclick="javascript:void(0);" />&nbsp;&nbsp;');
        document.write(' you can add your own words here if you want<input type=image src="url to image" name="rating" id="oneclick_vote_four_submit" value="4" onclick="javascript:void(0);" />&nbsp;&nbsp;');
        document.write('you can add your own words here if you want<input type=image src="url to image" 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>
<!--Thread Rating-->


ZomgStuff 01-13-2009 04:57 PM

I wouldn't assume there would be any issue with VB 3.8?


All times are GMT. The time now is 01:33 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.01207 seconds
  • Memory Usage 1,823KB
  • 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
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (14)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