Home « Server software «
Documentation: articles/rate.php
articles/rate.php - Rate a page
If the additional parameter 'next' is provided, this script will silently redirect to it, except on error. Else links are provided either to go to the permalink page, or to the front page.Multiple tentatives to rate a page are prevented though cookies. On first rating a cookie is sent to the browser with following parameters:
- name: 'rating_<id>', where '<id>' designates the target article
- value: the rating itself
- path: the network path to this instance of YACS (to avoid side-effects on shared servers)
- lifetime: 24 hours (to avoid storing too many cookies on the browser workstation)
Of course, the script rejects rating data if a cookie is presented by the browser, proving a similar opeation has already taken place.
The script accepts rating data based of the following permission assessment:
- permission is denied if the anchor hasn't the option 'with_rating'
- permission is denied if the surfer is not a logged surfer
- else rating data is accepted
Accept following invocations:
- rate.php/12/1
- rate.php?id=12&rating=1
If this article, or one of its anchor, specifies a specific skin (option keyword '
skin_xyz
'),
or a specific variant (option keyword 'variant_xyz
'), they are used instead default values.This script is a reference file of this system.
Voir aussi:
Licence: GNU Lesser General Public License
Auteurs:
- Bernard Paques bernard.paques@bigfoot.com
Testeurs:
- Timster