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

Procedural File: rating.php

Source Location: /zp-extensions/rating.php

Page Details

rating -- Supports an rating system for images, albums, pages, and news articles

uses 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 not change his mind.

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

Author:  Stephen Billard (sbillard)and Malte Müller (acrylian)
Classes
Class Description
jquery_rating Option handler class
Includes
require_once ($ME.'/functions-rating.php') [line 69]
[ Top ]

require_once (dirname(dirname(__FILE__)).'/functions.php') [line 22]
[ Top ]


Functions
getRating  [line 274]

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 ]
optionVoteStatus  [line 289]

Option filter handler for images and albums

Parameters:
string   $before:  HTML from prior filters
object   $object:  object being rated
string   $prefix:  indicator if admin is processing multiple objects

API Tags:
Return:  Combined HTML


string optionVoteStatus( string $before, object $object, string $prefix  )

[ Top ]
optionVoteStatusSave  [line 311]

Option save handler for the filter

Parameters:
object   $object:  object being rated
string   $prefix:  indicator if admin is processing multiple objects


void optionVoteStatusSave( object $object, string $prefix  )

[ Top ]
printRating  [line 130]

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 ]
rating_purgebutton  [line 317]
Parameters:
   $buttons: 


void rating_purgebutton( $buttons  )

[ Top ]


Documentation generated on Mon, 09 Aug 2010 17:24:10 +0200 by phpDocumentor 1.4.1