Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

PHP Ratings Plugin

This plugin allows visitors to rate things on your site.

A demo is available at

See also:


You need a server that has php, mysql and git.

Using submodules

  1. $ git submodule add lib/ratings
  2. $ git submodule update --init --recursive

Without submodules

  1. $ git clone --recursive lib/ratings

More steps

  1. Create a ratings table in MySQL based on lib/ratings/ratings.sql

  2. Create a ratings user in MySQL with database-specific SELECT,INSERT,UPDATE,DELETE privileges on the ratings table.

  3. Copy authinfo.php.example to authinfo.php and change the info to fit your system.

  4. Add the following to your php file:

    <iframe width="170" height="65" style="border: 0; display: block;"
    src="lib/ratings/?id=<?php echo rawurlencode($id) ?>"></iframe>
  5. Change $id from the previous step to whatever variable holds the id for the current ratings object. (Note that id can have letters and special characters as well)

  6. Run your php file.


This program is dedicated to the public domain using the Creative Commons CC0. See LICENSE.txt for details.