[ 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

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 (dirname(dirname(__FILE__)).'/functions.php') [line 21]
[ Top ]

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

require_once (substr(basename(__FILE__),0,-4).'/functions-rating.php') [line 78]
[ Top ]


Functions
getRating  [line 296]

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 312]

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 334]

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 145]

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 ]
ratingJS  [line 61]

void ratingJS( )

[ Top ]
rating_purgebutton  [line 341]
Parameters:
   $buttons: 


void rating_purgebutton( $buttons  )

[ Top ]


Documentation generated on Tue, 20 Dec 2011 16:07:59 +0100 by phpDocumentor 1.4.3