Skip to main content Help Control Panel

Aubagne HipHop

Tout le Hip Hop d'Aubagne et des alentours

Home «   Server software «  

Documentation: actions/actions.php

Class Actions - The database abstraction layer for actions

Actions are like post-it notes, or reminders. They are a very straightforward way of managing short-lived and task-oriented items of information.

The life cycle of an action is quite simple. An action is created, then closed. An action record is created when some community member is tasked to do something. Like for paper reminders, you can create actions for yourself or for others. Then actions can be either rejected or completed by the person to which they have been assigned.

While being really simplistic, this implementation of actions is quite enough to support following patterns of workflow:

sticky notes - Any member may create, edit, and accept action records for his own eyes. On-going actions are listed at login time, and this proves to be an efficient way to remind things to do. New actions can be created from the user profile. Click on 'My Page' once authenticated.

team working - Since YACS is intended to support communities, it is likely that several associates will have to collaborate. By posting actions to a peer, any associate may ask another person to contribute explicitly. The tasked person will be warned of the new action by e-mail, and also on the next authentication to the web site.

automatic triggers - Ultimately, actions can be triggered by another YACS module on specific events. For example, you may have created a PHP script that tracks important information. You can use actions to submit the outcome of this script to some human being for further processing.

Every action record has following attributes:

This script is a reference file of this system.

Licence: GNU Lesser General Public License

Auteurs:

accept() - Accept an action

function accept($id, $status = 'on-going')

The new status can be either:

The name of the surfer and the modification date is recorded as well.

Voir aussi:

delete() - Delete one action in the database and in the file system

function delete($id)

delete_for_anchor() - Delete all actions for a given anchor

function delete_for_anchor($anchor)

get() - Get one action by id

function &get($id)

get_next_url() - Get id of next action

function get_next_url($item, $anchor, $order='date', $capability='?')

This function is used to build navigation bars.

Voir aussi:

get_previous_url() - Get id of previous action

function get_previous_url($item, $anchor, $order='date', $capability='?')

This function is used to build navigation bars.

Voir aussi:

get_url() - Get the url to view an action

function get_url($id, $action='view')

By default, a relative URL will be provided (e.g. 'actions/view.php?id=512'), which may be not processed correctly by search engines. If the parameter 'with_friendly_urls' has been set to 'Y' in the configuration panel, this function will return an URL parsable by search engines (e.g. 'actions/view.php/512').

Voir aussi:

list_by_date() - List newest actions

function &list_by_date($offset=0, $count=10, $variant='full')

list_by_date_for_anchor() - List newest on-going actions for one anchor

function &list_by_date_for_anchor($anchor, $offset=0, $count=20, $variant=NULL)

list_by_date_for_author() - List newest actions for one author

function &list_by_date_for_author($author_id, $offset=0, $count=20, $variant='date')

Example:
include_once 'actions/actions.php';
$items actions::list_by_date_for_author(0COMPACT_LIST_SIZE''12);
$context['text'] .= Skin::build_list($items'compact');


list_completed_for_anchor() - List newest completed actions for one anchor

function &list_completed_for_anchor($anchor, $offset=0, $count=20, $variant=NULL)

list_rejected_for_anchor() - List newest rejected actions for one anchor

function &list_rejected_for_anchor($anchor, $offset=0, $count=20, $variant=NULL)

list_selected() - List selected actions

function &list_selected(&$result, $layout='compact', $capability='?')

Accept following variants:

post() - Post a new action or an updated action

function post($fields)

setup() - Create or alter tables for actions

function setup()

stat() - Get some statistics

function &stat()

stat_for_anchor() - Get some statistics for one anchor

function &stat_for_anchor($anchor)

We are computing this only for completed actions, since on-going and rejected actions should be kept to a minimum.

Voir aussi:

Tools
Browse the source of this script
Server software