LinkShare  Referral  Program

New

Advertise ad Here
learn more
            New 5star rating User guide
Useful

Links

Free technical Tutorials At techtutorials.net



Link Exchange at iWEBTOOL.com

 



The PHP Resource Index

iBuyOfficesupply.com Inc. There are N. 1 Comments for this Article
Ask any relevant question in the Comments or leave your valuable feed-back

printer  Print version of this article

star  Add it to your favourite!

mail email this page to a frend
LinkShare  Referral  Program
  

New 5 Star Rating System User Guide

New5starRating Version 1.0
Developed by Joe Pieruccini
under Creative Commons Attribution-Noncommercial 2.5 Australia License at www.maniacomputer.com
email : jp50@maniacomputer.com

Price :  Free

Updated :  10-04-2009

Download and Installation

  1. To download NewRatingSystem go to download page
  2. Save it on your computer and then extract it with winrar or any compatible software.
  3. Upload the folder with the name of 5star_rating in the root folder of your website.Pay attention to upload only one folder,because sometimes, when extracting,winrar creates a second folder and therefore it will be one 5star_rating folder inside another one with the same name.
  4. Grant write and read permissions to conf/config.php and you must have username,password to access MySql and database name
  5. You must enable gd library  on your PHP configuration file or it won't work.
  6. Open install_rating1 in your browser by typing http://www.yourwebsitename/5star_rating/install/install_rating1.php
    and this page opens     install_rating.php Thumbnail
  7. Enter all the details you asked for, like username, password  and follow the instructions on the form, because you will be asked to enter a username and password for accessing the admin control panel, don't forget these credentials because you wont be able to retrieve  them later.
  8. Press enter and the installer will do the job like creating the configuration file and the SQL tables.
  9. Now to test it,type in your browser http://www.yourwebsitename/5star_rating/rating.php and http://www.yourwebsitename/5star_rating/test_listing.php .If all works fine, delete the install_rating1.php file for security and also deny the write permission for config.php.
  10. To add the rating system to your webpages,copy and paste the following line of code at the very top of the page:
    <?php ob_start();?>
    and in where you want the rating system in your page:
    <?php include 'rating.php'; ?>
    Obviously you have to pay attention at the relative path using the function include ,make sure it is pointing at the right path.
     
  11. This is for the usage on a single webpage,to use the rating system on a database driven site like a web directory or a Tutorials site Have a look at the example test_listing.php

Administration and Configuration

  1. You've done the installation and tested it ? Well,now you can access the Admin Control Panel by entering in the browser address bar http://www.yourwebsitename/5star_rating/admin/control_panel.php and now login with the username and password you provided during the installation.
  2. When logged in you'll have the following page:
    ControlPanel

    where you can choose for a list of all rated items see screenshot
    List of Items
  3. To change any of the configuration you've done at the installation you can open the config.php file or you can use the visual interface,see screenshot
    Configuration Panel
  4. Change settings carefully reading the instructions and click change

Templates

This Rating System is based on templates, therefore is very easy to customize the look of it by editing the HTML part. For the existing templates,just open in your editor,display.tpl.php for the banner 400x140,display_vert.tpl.php for the vertical banner 120x240 and display_id.tpl.php for the example of usage with items from Database.The css file conf/style.css apply to all templates.
To create a new template just follow few easy steps:
  1. Create a new file and save it like newfilename.tpl.php
  2. Do all the HTML coding and then put the PHP variables that hold the result of the PHP code where you like them to be.Like in the figure below
    Variables
  3. Here the list of PHP variables used in the Templates
    • $date_added  - for the date the article was created.
    • $clic_count    - The number of hits
    • $rating           - The current rating
    • $count_raters - Total votes or raters
    • $stars            - The number of stars
    • $msg             - The message to the visitors
    • $rating_img_path-The path to the chart image
  4. After that,you can either go to the Admin Control Panel/Setting Manager and change the name of the template with the file you have just created. Other way, open up conf/config.php and change manually the variable $file with the name of your template.

If you like this script, please take a second, Rate it

Rate this Script @ The PHP Resource Index!
Script Rating:


Comments

Post your comment here or ask any question that is rilevant on what is shown in this page.
Thank you for visiting this website

N. 1 Comments for this page!   add a comment


From:  pat   Comment Nr 1    
 Posted on  17/02/10
  
 On the details...It would look nicer if you just had the number above the columns. And add the word votes above in the text area.
Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial 2.5 Australia License.