[ class tree: plugins ] [ index: plugins ] [ all elements ]

Procedural File: rating.php

Source Location: /zp-extensions/rating.php

Page Details

Supports an rating system for images, albums, pages, and news articles using the Star Rating Plugin by Fyneworks.com

An option exists to allow viewers to recast their votes. If not set, a viewer may vote only one time and may not change his mind.

Customize the stars by placing a modified copy of jquery.rating.css in your theme folder.

Legal note: Use the Disguise IP option if your country considers IP tracking a privacy violation.

Author:  Stephen Billard (sbillard)and Malte Müller (acrylian)
Classes
Class Description
jquery_rating Option handler class
Includes
require_once (dirname(dirname(__FILE__)).'/functions.php') [line 19]
[ Top ]

require_once (dirname(dirname(__FILE__)).'/admin-functions.php') [line 28]
[ Top ]


Functions
getRating  [line 407]

Returns the current rating of an object

Parameters:
object   $object:  optional ratings target. If not supplied, the current script object is used


float getRating( [object $object = NULL]  )

[ Top ]
printRating  [line 259]

Prints the rating star form and the current rating Insert this function call in the page script where you want the star ratings to appear.

NOTE: If $vote is false or the rating_recast option is false then the stars shown will be the rating. Otherwise the stars will show the value of the viewer's last vote.

Parameters:
bool   $vote:  set to false to disable voting
object   $object:  optional object for the ratings target. If not set, the current page object is used
bool   $text:  if false, no annotation text is displayed


void printRating( [bool $vote = 3], [object $object = NULL], [bool $text = true]  )

[ Top ]


Documentation generated on Sat, 05 Jan 2013 15:51:23 +0100 by phpDocumentor 1.4.3