vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Show Thread Enhancements - [AJAX] Threads rating (https://vborg.vbsupport.ru/showthread.php?t=185117)

mad@Max 07-11-2008 10:00 PM

[AJAX] Threads rating
 
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:)

PoetJA-1975 07-12-2008 07:21 PM

Nice!
Thanx for sharing.

Jacquii.

Internetcafe 07-12-2008 09:31 PM

Great addition .. I changed the background colour to match my skin.

Clicked install

fukdawrld 07-12-2008 10:03 PM

excellent post here

Mark.B 07-12-2008 10:21 PM

Only thing I'm finding is that when you vote, if the thread has not been voted on already the data is missing from the box until you refresh the page.

It will say:
"Thread Rating: 0 votes, average."

When it should say something like:
Thread Rating: 1 votes, 5.00 average."

Hornstar 07-12-2008 10:21 PM

Yeah I think my members will really love this. I can see a few people going around and abusing it tho, so it would be nice to know who is voting and to be able to ban people from voting any more if they are just going around and clicking on terrible on every thread.

Could you add this feature?

mad@Max 07-12-2008 10:35 PM

hornstar1337
Yes, i'm integrate this mod with my. Tomorrow i release him.

vietdjclub 07-13-2008 04:18 AM

would be better if you could disable poster rate your own thread

luffy 07-13-2008 05:44 AM

excellent Thank you

shadowevil 07-13-2008 05:54 AM

no compatible with GARS, You can do with next version for well compatible with Gars ? thanks

TheProphet 07-13-2008 08:46 AM

thx m8, will give this a try..

Q-v-n-s-Q 07-13-2008 08:56 AM

nice mod, thanks

marc2005 07-13-2008 02:33 PM

very useful, thanks!

mad@Max 07-13-2008 07:46 PM

ADDED
Thread Rating + Rating Info Eng

Mark.B 07-13-2008 10:43 PM

This seems to be giving me a Javascript error which is only fixed by removing the first instance of this line (and it's closing </if> tag):
Code:

<if condition="$vboptions['trateglobal']==0 OR (in_array($threadinfo['forumid'], array($vboptions['trateforum'])))">
But this then results in a security token error when trying to rate a thread.

The error is "object expected".

mad@Max 07-13-2008 11:04 PM

I tested, all tags is fine, mb are you delete other part of code?

Mark.B 07-13-2008 11:50 PM

Quote:

Originally Posted by mad@Max (Post 1574599)
I tested, all tags is fine, mb are you delete other part of code?

Well at first I didn't notice it, because I use Firefox which doesn't routinely point out JS errors in the way IE does.

Then I tried using the moderation tools, and when you click the check box in a post, nothing happens.

Suspecting a JS error, I tried it in IE, and sure enough, it's giving "object expected".

From my debugging attempts, it seems to be to do with the inline moderation form being surrounded by that conditional...presumably if the conditional returns false, the form doesn't execute which stops the inline moderation tools working.

You will only notice this issue if you're logged in as a moderator or admin with mod rights for the forum you are viewing.

Hope this is some use, as it's otherwise an excellent mod.

abrecher 07-14-2008 04:54 AM

Used on GARS too and it does not work.

mad@Max 07-14-2008 01:16 PM

I will try add: ajax, future delete given rating from anyone and compatible with GARS.
Mark.B
Replace "</if>" after
PHP Code:

    <if condition="$show['threadrating']">
        <
td class="vbmenu_control" id="threadrating" nowrap="nowrap">
            <
a href="$show[nojs_link]#goto_threadrating"><span id="threadrating_current"><if condition="$show['rating']">$vbphrase[rating]: <img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$thread[rating].gif" alt="<phrase 1="$thread[votenum]" 2="$thread[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>" border="0" /><else />$vbphrase[rate_thread]</if></span></a>
            <if 
condition="$show['popups']"><script type="text/javascript"vbmenu_register("threadrating"); </script></if>
        </
td>
    </if> 

Must be work.

mad@Max 07-14-2008 05:41 PM

Mod is updated.

MissKalunji 07-16-2008 06:00 PM

could you add WHICH thread to ENABLE it? i only want it one thread i have many subforums it would take me a while.

Thanks

snowlion 07-20-2008 03:30 PM

when i add this line
HTML Code:

<!-- thread rating info -->
<script type="text/javascript">
<!--
 function openDreamTRI(threadid) {
  dreamTRIWindow = window.open('threadratinginfo.php?threadid=' + threadid, 'dreamTRI', 'directories=no, height=150, width=300, location=no, menubar=no, resizable=yes, status=no, scrollbars=yes, toolbar=no');
 }
//-->

</script>
<!-- / thread rating info -->

i can't find threadratinginfo.php. Sorry, did you miss this file?

Mark.B 07-25-2008 03:58 PM

The new version till messes up the mod tools. it's fine as an ordinary user, but as an admin or mod the the tick boxes in posts no longer work, and for admins and mods in Firefox it won't submit the rating at all. I've had to uninstall for now until this can be fixed.

mad@Max 07-25-2008 07:09 PM

MissKalunji, maybe.
snowlion, you are right, i have miss it, sorry:).
Mark.B, try now, i update mod.
In updated mod added forgotten file and fix one bug.

MissKalunji 07-25-2008 08:25 PM

Thanks mad@max :)

MissKalunji 07-25-2008 08:43 PM

uhm when i select a rating nothing happens?

mad@Max 07-25-2008 09:48 PM

MissKalunji what do you mean?

MissKalunji 07-25-2008 10:38 PM

when i click on example :excellent ajax should kick in and register the vote but it doesn't nothing happens it doesn't register the vote nothing.

mad@Max 07-25-2008 11:56 PM

MissKalunji, after click on vote nothing happens? Hm, this mod work on many forums, and work fine. Check instructions to installation.

MissKalunji 07-26-2008 12:03 AM

i did i double checked :-/ when i did the manual ones (from another author) worked fine but this one isn't

When i click in "excelent" and press on enter on my keyboard i get an error on wrong thread or something like that...

vietdjclub 07-26-2008 12:43 AM

working fine on IE but not working in FF. how to fixed it please?????

MissKalunji 07-26-2008 02:12 AM

oh that could be it...i was on FF let me check on IE

MissKalunji 07-26-2008 02:22 AM

yeah i confirm it doesn't work IN firefox but does work in Internet explorer

ogameclub 07-26-2008 10:28 AM

Quote:

yeah i confirm it doesn't work IN firefox
and uninstalled.

mad@Max 07-26-2008 12:58 PM

MissKalunji, registering your vote happens by one step, just choose a rate. I dont understand for what you click "enter"?
I'm test this mod on FF, IE, Opera, Safari. On all browsers work very good!
PS you may test mod on our board, after register.

vietdjclub 07-26-2008 01:31 PM

Quote:

Originally Posted by mad@Max (Post 1584613)
MissKalunji, registering your vote happens by one step, just choose a rate. I dont understand for what you click "enter"?
I'm test this mod on FF, IE, Opera, Safari. On all browsers work very good!
PS you may test mod on our board, after register.

i'm test with admin group and user group but ff doesnt work. i confirm it. you mayby check it via the account i sent. check your PM

EagleNick 07-26-2008 02:33 PM

Nothing happens when a user clicks a rating... and there is no submit button.

So I don't know what to do. Please help ;)

EagleNick 07-26-2008 02:36 PM

Quote:

Originally Posted by EagleNick (Post 1584662)
Nothing happens when a user clicks a rating... and there is no submit button.

So I don't know what to do. Please help ;)

Okay now that I've read other replies... I tested in IE and it works - not in Firefox.
Therefore, I am UNINSTALLING it.

If you fix it to support FF, I will be glad to use it ;)

mad@Max 07-26-2008 05:46 PM

I found 1 bug with ajax and FF, after voting not showing alt text (phrase) statistic on image (stars). But mod work.
You may test on fresh forum:
www.mixplay.ru/forum.php // choose any thread
user: Test
pass: 123456

EagleNick 07-26-2008 07:05 PM

Quote:

Originally Posted by mad@Max (Post 1584756)
I found 1 bug with ajax and FF, after voting not showing alt text (phrase) statistic on image (stars). But mod work.
You may test on fresh forum:
www.mixplay.ru/forum.php // choose any thread
user: Test
pass: 123456

I tried it out and it worked.

But It doesn't work on my site. How do I fix it?


All times are GMT. The time now is 04:59 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.01415 seconds
  • Memory Usage 1,836KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (3)bbcode_php_printable
  • (5)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
  • (40)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