Home « Server software «
Documentation: overlays/petition.php
class Petition extends Overlay - Achieve large support
This overlay allows surfers to attach at most one decision to one page.To create a petition, create a new page with this overlay. Then define the scope of your petition through following attributes:
- voters - members, editors, or associates
- end date and hour - signatures won't be accepted afterwards
This script is a reference file of this system.
Licence: GNU Lesser General Public License
Auteurs:
- Bernard Paques bernard.paques@bigfoot.com
allows() - Allow or block operations
function allows($type, $action)
- $type - string the kind of item to handle
- $action - string the foreseen operation ('edit', 'new', ...)
- returns TRUE if the operation is accepted, FALSE otherwise
get_fields() - Build the list of fields for one overlay
function get_fields($host, $capability='?')
- $host - the hosting attributes
- $capability='?' - string surfer capability ('?', 'M', or 'A')
- returns a list of ($label, $input, $hint)
Voir aussi:
get_label() - Get an overlaid label
function get_label($name, $action='view')
- $name - string the target label
- $action='view' - string the on-going action
- returns the label to use
- 'edit' the modification of an existing object
- 'delete' the deleting form
- 'new' the creation of a new object
- 'view' a displayed object
Voir aussi:
get_text() - Display the content of one classic car
function get_text($variant='view', $host=NULL)
- $variant='view' - string the on-going action
- $host=NULL - array the hosting record
- returns some HTML to be inserted into the resulting page
- 'box' - displayed in a box
- 'list' - part of a list
- 'view' - in the main viewing panel
Voir aussi:
parse_fields() - Retrieve the content of one modified overlay
function parse_fields($fields)
- $fields - the fields as filled by the end user
- returns the updated fields
Voir aussi:
remember() - Remember an action once it's done
function remember($variant, $host, $capability='?')
- $variant - string the action 'insert', 'update' or 'delete'
- $host - array the hosting record
- $capability='?' - string surfer capability ('?', 'M', or 'A')
- returns FALSE on error, TRUE otherwise