Thread Rating:
  • 14 Vote(s) - 3.86 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.6] Thumbs Post Rating 1.3
(2011-02-17, 11:59 AM)dawkcodave Wrote:
(2011-02-17, 11:33 AM)tyyew Wrote: One reason that this might happened is probably your internet connection was not active the time when u rate. This is because it doesn't have a feedback. It does not feedback telling u if u had rated unsuccessfully.

I will fix this problem in the coming version.

From what I coded, the reasons that it display a non rate-able thumbs/ rate not being saved are follows:
- Your usergroups are not in the permission to rate.
- You cannot rate your own post (you may disable this in the settings)
- You have already rated the post.
Hope it helps.

Thanks, but none of the above seem to apply. My Internet connection is fine, and besides I'm connecting via LAN and there's no problem there. I'm in the Administrators group and have permission. I was not rating my own post. If I had already rated the post, it should show 1, not 0.

Sorry, I gave up on this and switched to the Thank You/Like System plugin which is working fine.

You have done some fine work here, but there's just a bug in there somewhere...

Sorry it doesn't work for u. I will try my best to find the problem ASAP.
I see not thumb images...all I see is a 0 where each options should be...and can do nothing with it. And what do I do with the .css file?
(2011-02-20, 01:07 AM)mrfield16 Wrote: I see not thumb images...all I see is a 0 where each options should be...and can do nothing with it. And what do I do with the .css file?

BUMP.....can anyone please help with this?

Attached Files Thumbnail(s)
How to make it work as a reputation , i mean count thumbs as a + or - reputation.

Thank you
can you please make it compatible for right to left languages ?
i mean can you place a setting that moves the thumbs from right to left and vice versa?
and before that , how can i myself move the thumbs to the left side of the posts ?
thanks alot Smile
I found the reason why some people can't use the thumbs functions despite being in the usergroup thats allowed to rate.
When putting people in groups, you can add them to additional groups. Although it works when users are in one or the other group thats allowed to rate, it doesn't work for the combination of the 2.

Just make sure that everyone that's allowed to rate is in a single group and they should be able to rate

Another minor bugfix I did. Maybe something you might want to look at and improve my code a little bit in your next release.

in thumbspostrating.php
Go to line 270

The way you get your $tu_no and $td_no make it so that it'll always only show 1 thumbs up and/or 1 thumbs down.

I changed it to the following, and it works for me now.

// Display the rating box
        /*$tu_no = $post['thumbsup'];
        $td_no = $post['thumbsdown'];*/
		$query = $db->query("SELECT SUM(thumbsup) as thumbsup FROM `mybb_thumbspostrating` WHERE `pid` = ".$pid);
		$result = $db->fetch_array($query);
		if(is_null($result['thumbsup'])) {
			$tu_no = 0;
		} else {
			$tu_no = $result['thumbsup'];
		$query = $db->query("SELECT SUM(thumbsdown) as thumbsdown FROM `mybb_thumbspostrating` WHERE `pid` = ".$pid);
		$result = $db->fetch_array($query);
		if(is_null($result['thumbsdown'])) {
			$td_no = 0;
		} else {
			$td_no = $result['thumbsdown'];

This way you'll get the SUM of ALL thumbs on a specific post. Instead of just the most recent one.

I hope this helped Smile
Thank you.
MyBB Support - MyBB Themes - MyBB Plugins
≧◔◡◔≦ I Love You MyBB (>‿♥)
Good job. Thank you for sharing this plugin.

I've some suggestions for you:

1. You can use "$mybb->input" instead of "$_GET" and for security reasons it's very important to escape all user inputs when you are going to put them in a database query. It can be done easily using "$db->escape_string" function (or "intval" if it's an integer, and so on).

2. Remove all "'gid' => 'NULL'" and "'sid' => 'NULL'" lines because they can cause some database errors depending of server configurations.

3. I think the name of a plugin (and not its description) should be unique. You've made it translatable. It potentially can make some problems in future. For instance we have "Thank you" and "Thanks" plugins but there is only one word in Persian language for them and it's "تشکر".

This user has been denied support. This user has been denied support.
(2011-03-09, 08:58 AM)IranDeliver Wrote: How to make it work as a reputation , i mean count thumbs as a + or - reputation.

Thank you

I agree, if it did this i would use it myself. I never did like having to just use the rep button or click on the rep number.

Thanks anyways Smile

Nice job!

i think its great plugin, but... can u make exacly the same but for thread? To make a user possibility to vote from thread list for thread?
i would be great! Big Grin
Would be great if you could somehow treat it like the thank you like you system, where you could see most liked, see how many liked posts a user has!

[Image: mybbsig.php]

Forum Jump:

Users browsing this thread: 1 Guest(s)