![]() |
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?
|
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 |
Quote:
|
I am currently making one myself. It may take a little while but I'll keep you updated on it :)
|
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. |
I'm fine now, I just need to learn some more Javascript/AJAX
|
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