Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[AJAX] Threads rating Details »»
[AJAX] Threads rating
Version: 1.5.2, by mad@Max mad@Max is offline
Developer Last Online: Jun 2013 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.7.x Rating:
Released: 07-11-2008 Last Update: 01-14-2009 Installs: 145
Uses Plugins Auto-Templates
Code Changes Additional Files  
No support by the author.

This mod merge of three old mods:
vB.org Rating System Replica
[AJAX] Your One Click Thread Ratings
Who Rated This Thread / Delete Who Rated

Futures:
- Now it is not necessary to delete elements from a template
- You can choose id forums, where a rating threads to display it is necessary or not necessary
- On click rating icon in the threads you get info about voting
- You can delete vote from thread rating
- Realisation with AJAX

Install:

Extract all files from folder "Upload" in forum root directory

Find in file threadrate.php on youre server:

PHP Code:
        $xml->add_tag('voteavg'process_replacement_vars("$vbphrase[rating]: <img class=\"inlineimg\" src=\"$stylevar[imgdir_rating]/rating_$thread[rating].gif\" alt=\"" construct_phrase($vbphrase['thread_rating_x_votes_y_average'], $thread['votenum'], $thread['voteavg']) . "\" border=\"0\" />")); 
Replace with:

PHP Code:
        $currate = ($thread['voteavg']*25 px);
        
$xml->add_tag('voteavg'process_replacement_vars("<table cellpadding=\"$stylevar[cellpadding]\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td align=\"right\" width=\"45%\" nowrap=\"nowrap\"><div><strong>$vbphrase[trate_currate]</strong></div></td><td align=\"left\" width=\"55%\" nowrap=\"nowrap\"><ul class=\"star-rating\" title=\"" construct_phrase($vbphrase['thread_rating_x_votes_y_average'], $thread['votenum'], $thread['voteavg']) . "\"><li class=\"current-rating\" style=\"width:$currate;\"></li></td></tr></table>")); 
Using the Product Manager, upload the Product that came with this modification.

Admincp > Plugins and Products > Manage Products > [Add/Import Product] >

product-trate.xml

Update:

Uninstall old mod and import product (v1.3)

Upload stars.png in folder your style, by default /images/rating/

Enjoy!

DEMO
www.mixplay.ru/forum.php // choose any thread
user: Test
pass: 123456

Thread Rating T?rk?e 1.4.1.zip

Click Install, if you like this mod

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #192  
Old 01-17-2009, 10:51 AM
mad@Max's Avatar
mad@Max mad@Max is offline
 
Join Date: Jul 2007
Location: Russia
Posts: 536
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you want move box with rating, open Threads rating Maintains and look on string
PHP Code:
eval('$navbar .= "' fetch_template('trate_main') . '";'); 
Replace $navbar with what you need variable (like $footer), or create your own.
Reply With Quote
  #193  
Old 01-27-2009, 07:28 AM
phoxitin phoxitin is offline
 
Join Date: Dec 2008
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this work 3.8.x ??
Reply With Quote
  #194  
Old 01-27-2009, 08:50 PM
Taragon's Avatar
Taragon Taragon is offline
 
Join Date: Sep 2007
Location: The Netherlands
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by phoxitin View Post
Does this work 3.8.x ??
Yes, it does
Reply With Quote
  #195  
Old 02-07-2009, 12:03 AM
Battle_Ring Battle_Ring is offline
 
Join Date: Apr 2004
Posts: 584
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not working for me. It shows whilie i vote then it disappears
Reply With Quote
  #196  
Old 03-09-2009, 09:43 PM
kersti kersti is offline
 
Join Date: Dec 2005
Posts: 137
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm getting 404 errors - /threadratinginfo.php?threadid=36

How do I fix that?
Reply With Quote
  #197  
Old 03-10-2009, 08:09 PM
mad@Max's Avatar
mad@Max mad@Max is offline
 
Join Date: Jul 2007
Location: Russia
Posts: 536
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

All files is uploaded?
Reply With Quote
  #198  
Old 03-13-2009, 06:13 PM
f4vn f4vn is offline
 
Join Date: Apr 2007
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

Can you help me chang code to vote from this
to this .

Thanks ,
Reply With Quote
  #199  
Old 03-17-2009, 09:08 AM
pawelx1988 pawelx1988 is offline
 
Join Date: Dec 2008
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The mod is great - thanks! But I have a problem and my friends too.
My forum is on dedicated server, but the ratings is very slow.

When I'm clicking on one of stars to rate - I must wait 3-4 seconds to see the rate, but I see that in your forum I have waited 1 second! Can you help me with it?
Reply With Quote
  #200  
Old 04-02-2009, 03:08 PM
paul41598's Avatar
paul41598 paul41598 is offline
 
Join Date: Jun 2004
Location: MI
Posts: 732
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

F4VN,

I've changed the template to meet your needs. I wanted it as well.

Replace the trate_main template with this:

Code:
		<if condition="$show['threadrating']">
    <if condition="$show['ratethread']">
        <div class="quickajaxrating" style="text-align:center; padding-bottom: 5px; background: #FFDC84; color:#000;"">
            <span id="oneclick_container">
                <if condition="!$rated">
                    <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('<table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="5" width="100%"><tr><td align="right" width="45%" nowrap="nowrap"><div><strong>$vbphrase[trate_rateit]</strong></div></td><td align="left" width="$widthcolumn%" nowrap="nowrap"><div class="current-rating" style="width:$current_rating;"><label for="vote5"><input type="radio" name="vote" id="oneclick_vote_five_submit" value="5" $votechecked[5] />$vbphrase[excellent]</label><label for="vote4"><input type="radio" name="vote" id="oneclick_vote_four_submit" value="4" $votechecked[4] />$vbphrase[good]</label><label for="vote3"><input type="radio" name="vote" id="oneclick_vote_three_submit" value="3" $votechecked[3] />$vbphrase[average]</label><label for="vote2"><input type="radio" name="vote" id="oneclick_vote_two_submit" value="2" $votechecked[2] />$vbphrase[bad]</label><label for="vote1"><input type="radio" name="vote" id="oneclick_vote_one_submit" value="1" $votechecked[1] />$vbphrase[terrible]</label></div></div></td>$evr</tr></table>');
                        -->
                    </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>
                    <else />
                    <div align="center" style="font-size: 15px; font-family: verdana; font-weight: bold;">You have already rated this thread!</div> </if>
                    <table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%">
                        <tr>
                            <td align="right" width="45%" nowrap="nowrap">
                                <div>
                                    <strong>$vbphrase[trate_currate]</strong>
                                </div>
                            </td>
                            <td align="left" width="$widthcolumn%" nowrap="nowrap">
 														
                                <ul class="star-rating" title="<phrase 1="$thread[votenum]" 2="$thread[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>">
                                    <li class="current-rating" style="width:$current_rating;">
                                    </li>
                                </ul>
                            </td>$evr
                        </tr>
                    </table>
                </if>
            </span>
            <span id="oneclick_threadrating_current"></span>
            <span id="oneclick_threadrating_response"></span>
        </div>   
</if>
<br/>
Reply With Quote
  #201  
Old 04-08-2009, 04:24 PM
jGas jGas is offline
 
Join Date: May 2007
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi, i'm using this mod and i really love it!
is there a way to have the thread rating with 10 stars instead of 5?

thanks
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:40 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05322 seconds
  • Memory Usage 2,349KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete