ZenphotoCMS 1.6.5

rating.php

Supports a rating system for images, albums, pages, and news articles using the <i>Star Rating</i> Plugin by {@link http://www.fyneworks.com/jquery/star-rating/ 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.

Tags
author

Stephen Billard (sbillard), Malte Müller (acrylian)

Table of Contents

Classes

jquery_rating
Option handler class

Constants

OFFSET_PATH  = 3

Functions

printRating()  : mixed
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.
getRating()  : float
Returns the current rating of an object

Constants

OFFSET_PATH

public mixed OFFSET_PATH = 3

Functions

printRating()

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.

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

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
$vote : bool = 3

set to false to disable voting

$object : object = NULL

optional object for the ratings target. If not set, the current page object is used

$text : bool = true

if false, no annotation text is displayed

getRating()

Returns the current rating of an object

getRating([object $object = NULL ]) : float
Parameters
$object : object = NULL

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

Return values
float

        
On this page

Search results