Home « Server software «
Documentation: overlays/polls/vote.php
overlays/polls/vote.php - Contribute to a poll
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 votes are prevented though cookies. While this method is not bullet-proof, it is an adequate security scheme for most surfers. Each vote has its own cookie, with a reference to the poll id in its name. The cookie path is limited to the YACS instance. Voting cookies have a limited life cycle of one day.
On first vote a cookie is sent to the browser with following parameters:
- name: 'poll_<id>', where '<id>' designates the target poll
- value: the vote 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 voting data if a cookie is presented by the browser, proving a vote has already taken place.
The script accepts polling data based of the following permission assessment:
- associates and editors are allowed to move forward
- creator is allowed to view the page
- permission is denied if the anchor is not viewable
- access is restricted ('active' field == 'R'), but the surfer is an authenticated member
- public access is allowed ('active' field == 'Y')
- permission denied is the default
Accept following invocations:
- vote.php/12/1
- vote.php?id=12&vote=1
If the anchor for this item 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