dot-totally.co.uk > Software > WatchRate > Template Tags

WatchRate: Template Tags

WatchRate version 0.11 and upwards support the use of template tags to easily change the design and how WatchRate outputs the information. In WatchRate version 0.2 and above, the system was moved to a PHP4 OOP approach, and as such now the template tags begin with $wr->. A template for WatchRate must follow this order:

The two default templates provided with the WatchRate installation, view.php and rss.php follow this template guideline.

In-Loop template tags

These tags are ones that should be used within the WatchRate loop:

$wr->gettitle
Prints out the title of the current rating row.
Parameters:

$wr->gettype
Prints out either "film" or "episode" depending on type of current rating.
Parameters:

$wr->gettags
Gets the list of tags for the current rating.
Parameters:

$wr->getmorelink

For episode ratings, will give a link to see "more from this show", for films, will link to the IMDB link provided.
Parameters:

$wr->getrating
Gets the rating of the current film/episode.
Paramaters:

$wr->getdateadded
Returns the date a rating was added, formatted like the PHP date function (See reference)
Parameters:

$wr->getadminlinks
Gets the links for editing and deleting the current rating link. Will only display if the admin is logged in.
Parameters:

Out-of-loop template tags

These template tags can be used anywhere in the page, as long as they are after $wr->start();

$wr->getpoweredmsg
Returns the default 'Powered by WatchRate' message, and if the admin is logged in, a link to the adding page.
Paramaters:

$wr->getrsslink
Gets the link to the current view's RSS feed (i.e. it changes depending on whether you're viewing by a tag, or viewing all)
Paramaters:

$wr->getpreviouslink
Prints out the link to the previous page of results.
Paramaters:

$wr->getnextlink
Prints out the link to the previous page of results.
Paramaters:

$wr->getnavlinks
Gets the links for navigation (selecting films, shows, all, etc)
Paramaters: