PHP Classes
elePHPant
Icontem

Star rating: Update votes and display rated content with stars

Recommend this page to a friend!
  Info   View files View files (8)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2009-07-11 (7 years ago) RSS 2.0 feedStarStarStarStar 63%Total: 4,061 All time: 733 This week: 1,090Down
Version License PHP version Categories
ajax_star_rating 1.1The PHP License5.1.4PHP 5, Content management, AJAX
Description Author

This class can be used to update user votes and display rated content with star images.

It can store in a MySQL database the ratings given by each user that votes on content keeping track of the IP addresses of the computers from which each user votes.

The class shows a row of stars to let the user vote on the content. Votes are submitted to the server via AJAX.

It can also display the stars that correspond to the current average of votes from all users of different IP addresses.

Picture of Sudhir Chauhan
Name: Sudhir Chauhan <contact>
Classes: 5 packages by
Country: India India

Details
1)update database schema
2)add database creadentions in the RatingManager.inc.php
3)Since this is user id based create $_SESSION['USERID'] = 'sudhir'; session variable and remove the hardcoded variable form ratingmanager.inc.php
  Files folder image Files  
File Role Description
Accessible without login Plain text file readme.txt Doc. steps to use this example
Accessible without login Plain text file stars.css Data stylesheet used to create stars
Accessible without login Image file star_rating.gif Icon gif image used to create stars using css
Accessible without login Plain text file rpc.php Example the file used by ajax to send request to rating manage
Accessible without login Plain text file db.sql Data database schema contains table structure and example id
Accessible without login Plain text file js.js Data the file contains ajax code and other java script code that is responsible for changing start status
Plain text file RatingManager.inc.php Class file contains database class and rating class handles all functionality of star rating
Accessible without login Plain text file index.php Example the file used to run example

 Version Control Unique User Downloads Download Rankings  
 0%
Total:4,061
This week:0
All time:733
This week:1,090Down
User Ratings User Comments (2)
 All time
Utility:85%StarStarStarStarStar
Consistency:75%StarStarStarStar
Documentation:62%StarStarStarStar
Examples:75%StarStarStarStar
Tests:-
Videos:-
Overall:63%StarStarStarStar
Rank:803