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
  #202  
Old 04-09-2009, 08:29 AM
mad@Max's Avatar
mad@Max mad@Max is offline
 
Join Date: Jul 2007
Location: Russia
Posts: 536
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Now i'm working on a new version, and in it i will add a feature with 10 points. So, wait for version 2.0....
Reply With Quote
  #203  
Old 04-13-2009, 04:32 PM
Arkham's Avatar
Arkham Arkham is offline
 
Join Date: Nov 2001
Location: Toronto, Ontario
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it possible to use the info from the "show user's rating" in the post itself?

E.g. in the header of each post, show what that particular user rated that thread? This feature is something I desperately need.

Looking forward to the new version!
Reply With Quote
  #204  
Old 04-21-2009, 02:38 PM
Acido Acido is offline
 
Join Date: Apr 2003
Location: Argentina
Posts: 187
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is not working in 3.8.2
Reply With Quote
  #205  
Old 04-21-2009, 02:49 PM
Arkham's Avatar
Arkham Arkham is offline
 
Join Date: Nov 2001
Location: Toronto, Ontario
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Acido View Post
This is not working in 3.8.2
Crap. I was just going to install it, too.

Anyone know if it at least works w/3.8.1?
Reply With Quote
  #206  
Old 04-21-2009, 09:46 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 Arkham View Post
Crap. I was just going to install it, too.

Anyone know if it at least works w/3.8.1?
I guess it will work from 3.6.4 until at least 3.8.2
Reply With Quote
  #207  
Old 04-30-2009, 08:57 PM
mindhunter77 mindhunter77 is offline
 
Join Date: Jan 2006
Posts: 194
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where would I go to edit the white space between this MOD, and my banner? Any ideas, I have looked for an hour lol..
Reply With Quote
  #208  
Old 05-03-2009, 05:19 AM
chjp's Avatar
chjp chjp is offline
 
Join Date: Nov 2007
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I like it. Thank you.
Reply With Quote
  #209  
Old 06-14-2009, 06:22 PM
EagleNick's Avatar
EagleNick EagleNick is offline
 
Join Date: Dec 2007
Location: Florida
Posts: 517
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

Can you add an option to manually include the variable to show the ratings? I'd like to move the rating area to a customized area within the thread, and not right after $navbar.

How can I do this?

Thanks.
Reply With Quote
  #210  
Old 06-19-2009, 06:41 PM
Dennis Kaczor Dennis Kaczor is offline
 
Join Date: Oct 2005
Location: Toronto
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by paul41598 View Post
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/>
Very nice work here Paul, and I have added this to my system. I have one question if this is possible as I'm not a coder. Rather than the user trying to move the mouse over the little radio button, have it so that it highlights the button when you move over the text area for that selection? Just a thought...

Dennis
Reply With Quote
  #211  
Old 07-17-2009, 11:11 AM
xyzmary2001 xyzmary2001 is offline
 
Join Date: May 2008
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will it be an update for vB 3.8.2? My users love it, it will be a shame to give up on it after I will make the update to vb 3.8.

@edit: Just checked and works perfectly with 3.8.2.
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 10:26 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.09228 seconds
  • Memory Usage 2,353KB
  • 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
  • (2)bbcode_php
  • (3)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
  • (3)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