Skip to main content Help Control Panel

Aubagne HipHop

Tout le Hip Hop d'Aubagne et des alentours

Home «   Server software «  

Documentation: articles/article.php

Class Article extends Anchor - The article anchor

This class implements the Anchor interface for published articles.

This script is a reference file of this system.

Voir aussi:

Licence: GNU Lesser General Public License

Auteurs:

Testeurs:

allows() - Allow or block operations

function allows($type, $action)

get_focus() - Get the focus for this anchor

function get_focus()

This function lists containers of the content tree, from top level down to this item.

get_icon_url() - Get the url to display the icon for this anchor

function get_icon_url()



Voir aussi:

get_neighbours() - Get next and previous items, if any

function get_neighbours($type, $item)



Voir aussi:

get_path_bar() - Get the path bar for this anchor

function get_path_bar()

For articles, the path bar is made of one stem for the section, then one stem for the article itself.

Voir aussi:

get_reference() - Get the reference for this anchor

function get_reference()

This function is used to retrieve a reference to be placed into the database. For example:
$anchor get_anchor($article['anchor']);
$context['text'] .= '<input type="hidden" name="anchor" value="'.$anchor->get_reference().'" />';


Voir aussi:

get_teaser() - Get some introductory text from an article

function &get_teaser($variant = 'basic')

This function is used to introduce comments, or any sub-item related to an anchor. Compared to the standard anchor implementation, this one adds the ability to handle overlay data.

If there is some introductory text, it is used. Else the description text is used instead. The number of words is capped in both cases.

Also, the number of remaining words is provided.

Following variants may be selected to adapt to various situations:

Voir aussi:

get_thumbnail_url() - Get the url to display the thumbnail for this anchor

function get_thumbnail_url()



Voir aussi:

get_url() - Get the url to display the main page for this anchor

function get_url($action='view')



Voir aussi:

load_by_id() - Load the related item

function load_by_id($id)

Voir aussi:

parse() - Parse one article from a piece of text

function parse($text, $item = NULL)

This script extracts following tags from the submitted piece of text:

Sample usage:
// parse article content
include_once $context['path_to_root'].'articles/article.php';
$article =& new Article();
$fields $article->parse($content['description'], $item);


Voir aussi:

parse_match() - Called from within a preg_replace_callback() in Article::parse()

function parse_match($matches)

restore() - Restore a previous version of this article

function restore($item)



Voir aussi:

touch() - Remember the last action for this article

function touch($action, $origin, $silently = FALSE)

This function is called by related items. What does it do?

Moreover, on any change that impact the edition date (i.e., not in silent mode), a message is sent to the article creator, if different from the current surfer and a message is sent to watchers as well.

Voir aussi:

Tools
Browse the source of this script
Server software