TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   General (http://www.talkphp.com/general/)
-   -   Rating System: AJAX, MYSQL, PHP (http://www.talkphp.com/general/2334-rating-system-ajax-mysql-php.html)

Orc 02-25-2008 10:31 PM

Rating System: AJAX, MYSQL, PHP
 
How would I go about making an ajax, mysql, and php rating system, that goes by stars? Or just simple icons?

TlcAndres 02-25-2008 10:34 PM

You probably want to make you own but I find this particular package to be AMAZING it's drag and drop and if you do a little configuration it fits in flawlessly with anything

Masuga Design Unobtrusive AJAX Star Rating Bar

Orc 02-25-2008 10:35 PM

Quote:

Originally Posted by TlcAndres (Post 11417)
You probably want to make you own but I find this particular package to be AMAZING it's drag and drop and if you do a little configuration it fits in flawlessly with anything

Masuga Design Unobtrusive AJAX Star Rating Bar

I do want to make my own, sometimes I don't want to take others peoples stuff and just modify it. Besides, this is a rating system, like you rate users at YouTube with the negative and positive ratings.

Gareth 02-25-2008 10:39 PM

I am currently making one myself. It may take a little while but I'll keep you updated on it :)

dschreck 02-26-2008 04:57 PM

When I created mine, I compared how long it would take me to write all of the cross browser javascript, and how much less time it'd take me just to take a premade 'star rating' widget and mod it out. I went with one form jQuery, as it offered the easiest to modify code.

The PHP is obviously very straight forward, it's just handling POST data.

But what I recommend to you and to anyone else who wishes to create their own versions of things like this, take a look at what's out there.

Just because you want to make your own, doesn't mean you shouldn't take a peak and see how everyone else did it.

It's great to learn from trying it yourself, but if you haven't the slightest idea on where to start, that should give you a good footing.

The basics of how this works:
You can split them up into single stars, or half stars. Or you can use bars or whatever.
Basically, you have an array of all stars, wherever the user puts their mouseover, you count how many are below it, and switch them 'on'. And just undo that action for turning them off. You will need to save the original state for easy resets. onclick for any of them will kick off the Ajax wrapper, which sends post, comes back, and lets you know it was saved. and then lock the stars.

Hope that helps.

Orc 02-26-2008 04:58 PM

I'm fine now, I just need to learn some more Javascript/AJAX

Nor 02-26-2008 05:09 PM

If you want to be quick and lazy use jquery ;).


All times are GMT. The time now is 06:58 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0