[pmwiki-users] Announcing New Recipe: 5 star rating system

Hans design5 at softflow.co.uk
Tue Jul 8 16:06:16 CDT 2008

Tuesday, July 8, 2008, 5:45:55 PM, Hans wrote:

> such $:Rating.. PTVs can be used in pagelists etc. to generate rating
> lists.
> For instance if there is a rater markup on pages in  a group a
> pagelist could show the pages in order of ratings.

to achieve this it needed a numerical compare function comparing
Rating PTVs and ordering the pagelist accordingly.

I added this now to rater.php in the latest version.
You can use order=Rating in a pagelist markup which will sort the
pagelist by numerical value of the $:Rating1 PTV. Higest rating will
go topmost.
For instance:

  (:pagelist group={$Group} $:Rating1=- order=Rating fmt=#title:)

The $:Rating1=- parameter will pull out only the pages with a
$:Rating1 PTV, i.e. pages rated with a (:rater:) markup without a
specific id set (or a id=1)


More information about the pmwiki-users mailing list