TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 02-25-2008, 09:31 PM   #1 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,042
Thanks: 193
Orc is on a distinguished road
Default 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?
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote
Old 02-25-2008, 09:34 PM   #2 (permalink)
The Addict
 
Join Date: Nov 2007
Posts: 265
Thanks: 2
TlcAndres is on a distinguished road
Default

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
TlcAndres is offline  
Reply With Quote
Old 02-25-2008, 09:35 PM   #3 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,042
Thanks: 193
Orc is on a distinguished road
Default

Quote:
Originally Posted by TlcAndres View Post
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.
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote
Old 02-25-2008, 09:39 PM   #4 (permalink)
The Acquainted
 
Gareth's Avatar
 
Join Date: Jan 2008
Posts: 136
Thanks: 3
Gareth is on a distinguished road
Default

I am currently making one myself. It may take a little while but I'll keep you updated on it :)
Gareth is offline  
Reply With Quote
The Following User Says Thank You to Gareth For This Useful Post:
Orc (02-25-2008)
Old 02-26-2008, 03:57 PM   #5 (permalink)
The Contributor
 
dschreck's Avatar
 
Join Date: Nov 2007
Location: California
Posts: 80
Thanks: 0
dschreck is on a distinguished road
Default

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.
dschreck is offline  
Reply With Quote
Old 02-26-2008, 03:58 PM   #6 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,042
Thanks: 193
Orc is on a distinguished road
Default

I'm fine now, I just need to learn some more Javascript/AJAX
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote
Old 02-26-2008, 04:09 PM   #7 (permalink)
Nor
The Addict
 
Join Date: Nov 2007
Posts: 282
Thanks: 61
Nor is on a distinguished road
Default

If you want to be quick and lazy use jquery ;).
__________________
PHP/XHTML Freelancer:
Cleanscript.com v3 - Programming starting at just $5 act now!
Nor is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 11:31 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design