PHP Classes

Star rating: Update votes and display rated content with stars

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 61%Total: 4,114 All time: 747 This week: 45Up
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
Age: 45
All time rank: 17610 in India India
Week rank: 227 Down15 in India India Down

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 (8)  
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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:4,114
This week:0
All time:747
This week:45Up
User Ratings User Comments (2)
 All time
Utility:81%StarStarStarStarStar
Consistency:72%StarStarStarStar
Documentation:61%StarStarStarStar
Examples:72%StarStarStarStar
Tests:-
Videos:-
Overall:61%StarStarStarStar
Rank:1025