MyBB Community Forums

Full Version: Ratings Plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi, I recently changed my board to MyBB and it's SO much better! But there's one plugin that I can't seem to find anything similar to. Pretty much what I'm asking for is a plugin where you can rate people's posts. Not like rating 1-5 but like you can rate agree, rate disagree, rate funny, etc. A good example of this is the post rating system at http://www.facepunch.com.
This or anything similar would be GREATLY appreciated! Thanks!
If you're running MySQL (Haven't ironed out some kinks yet), here's something I've whipped up. It's not ready to be released formally yet, but I think it gets fairly close to your example and it has run on my test board without any errors.

Screenshot: http://i30.tinypic.com/25h397o.png

I narrowed the categories down a bit, and there aren't any icons at this time. (I actually think using text is clearer, but maybe that's just me.)

As always, upload the attached file to inc/plugins/.

As far as configuration goes, if you want to alter how many votes each user is allowed to make per post, just change the number in this line:

$max_votes_per_user = 4;

from 4 to whatever you like. Make sure to keep the rest of the line intact.

Let me know if that's what you had in mind or if you have any issues or anything. Smile
thanks Imagine
I'd like to try Smile
Wow, that was fast! Yes this is what I was talking about. A couple of questions though (I don't mean to get annoying), is there a way I can make it images instead of words?(works better for my theme). I tried doing this but it kept giving me syntax error. And is there a way to have it not refresh the page when you rate someone? Thanks again.
Well for images instead of words, that's basic HTML. I don't know where the required piece of code is, but perhaps in templates or probably in the core file. You can very easily find it in the file. As for the refresh thing, you have to ask Imagine or wait for someone else's response.

EDIT: for the images, open inc/plugins/postrate.php, starting on line 75 is what you want to edit. I think you can sort it out if you know basic HTML, and even if you don't I can give you a hand.

Regards.
(2009-07-08, 08:24 PM)DiscoBiscuit Wrote: [ -> ]Wow, that was fast! Yes this is what I was talking about. A couple of questions though (I don't mean to get annoying), is there a way I can make it images instead of words?(works better for my theme). I tried doing this but it kept giving me syntax error. And is there a way to have it not refresh the page when you rate someone? Thanks again.

If you give me the images (or just their filenames on your server) I can add them in for you.

And I'll look into the redirection thing. I am admittedly not very experienced with the things I'm going to have to use (like javascript) to remove the redirect screen, so it's gonna take a little playing around. Blush
Oh that's fine. And the filenames are just what the ratings are called (agree.gif, disagree.gif, etc)
Like images/agree.gif
Thanks again for your help!
Here ya go. This should work. Smile
Alright! This is exactly what I was asking for. The ONLY thing wrong with it is that even though i edited the config it kind of still lets people rate more than once, like infinitely D:
Okay...try this one. Toungue I had forgotten that I had put something in there to test it earlier. This should fix it.

If the one with the regular "postrate.php" filename doesn't work, use the other one, but rename it to "postrate.php" when you upload it. The second one guarantees each voter can vote once and only once.
Pages: 1 2