Overview Package | PHPDoctor |
FRAMES NO FRAMES | |
SUMMARY: FIELD METHOD | DETAIL: FIELD METHOD |
client.client_entity
|
+--client.client_articles
class client_articles
extends client_entity
Client part support for Article System.
Functions to handle articles on the client side.
Field Summary |
---|
public var | $a_articles |
public var | $a_images |
public var | $article |
public var | $error |
Fields inherited from client.client_entity | |
---|---|
$a_entity $a_images $recent |
Method Summary |
---|
public void | client_articles |
public associative | get Return detailed article data of given article. |
public string | get_adata Return specified part of last loaded (with get_article) article. |
public array | get_related Return list of related articles. |
public array | get_next Return next article in an issue from given article, if any. |
public array | get_previous Return previous article in an issue from given article, if any. |
public string | is_current Test if given article id is from current issue. |
public associative | get_special Return detailed article data of given article. |
public void | get_by_rating Return articles according to rating (with non-zero rating), sorted from best to worst. |
public void | get_by_counter Return articles according to counter, sorted from most visited to least. |
public number | increase_counter Article display counter advancing. |
public void | update_rating Update article rating. |
public void | get_num_comments Get number of comments for given article. |
public boolean, | insert_comment Insert article comment. |
public void | get_comments Get comments for given article. |
public void | get_comment Get specific comment data for given article. |
public void | delete_comment Delete specific comment. |
public void | get_all_groups Returns all groups of given article. |
Methods inherited from client.client_entity | |
---|---|
client_entity, get_by, get_image, get_image_assignment, get_image_tag, get_image_link, select_box |
Field Detail |
---|
public var $a_articles
public var $a_images
public var $article
public var $error
Method Detail |
---|
public void client_articles(var $art, var $ima)
$art
$ima
public associative get(var $id, var $flags = VISIBLE, var $what = 'A.id, A.title, A.subtitle, A.menu_title, A.preview, A.content, A.sources, A.signature, A.counter, A.rating, A.num_rated, A.display_extras')
Return detailed article data of given article.
Depending on the flags, it returns articles from ISSUE_CURRENT issue only, ISSUE_ARCHIVED issues, or both .. ISSUE_VISIBLE.
To request even the articles published in groups, GROUP_VISIBLE should be used.
TO get any published article, either from issues or from groups, use VISIBLE. Following are valid:
ISSUE_ARCHIVED | ISSUE_CURRENT == ISSUE_VISIBLE
ISSUE_VISIBLE | GROUP_VISIBLE == VISIBLE
Usage of INVISIBLE parameter should require active session, it does not check article state.
$id
$flags
$what
public string get_adata(var $what)
Return specified part of last loaded (with get_article) article.
$what
public array get_related(var $id = '')
Return list of related articles.
The list is for article returned by the last get_article() call.
$id
public array get_next(var $id = '', var $what = 'id, title')
Return next article in an issue from given article, if any.
$id
$what
public array get_previous(var $id = '', var $what = 'id, title')
Return previous article in an issue from given article, if any.
$id
$what
public string is_current(var $id)
Test if given article id is from current issue.
Use to prevent displaying of non-public articles.
$id
public associative get_special(var $id, var $restrict, var $what = 'A.id, A.title, A.subtitle, A.preview, A.content, A.sources, A.signature')
Return detailed article data of given article.
Restriction to articles is specified as parameter.
$id
$restrict
$what
public void get_by_rating(var $limit, var $what = "A.id, A.title, A.rating, A.num_rated", var $where = "")
Return articles according to rating (with non-zero rating), sorted from best to worst.
$limit
$what
$where
public void get_by_counter(var $limit, var $what = "A.id, A.title, A.counter", var $where = "")
Return articles according to counter, sorted from most visited to least.
$limit
$what
$where
public number increase_counter(var $id)
Article display counter advancing.
$id
public void update_rating(var $id, var $rating)
Update article rating.
Returns number of affected rows (should be 1), or false in case of db error or disabled rating (display_extras == 0).
$id
$rating
public void get_num_comments(var $id)
Get number of comments for given article.
$id
public boolean, insert_comment(var $comment)
Insert article comment.
$comment
public void get_comments(var $id)
Get comments for given article.
$id
public void get_comment(var $article, var $comment, var $data = "*")
Get specific comment data for given article.
$article
$comment
$data
public void delete_comment(var $id)
Delete specific comment.
$id
public void get_all_groups(var $aid, var $what = 'G.id, G.name', var $where = '')
Returns all groups of given article.
$aid
$what
$where
Overview Package | PHPDoctor |
FRAMES NO FRAMES | |
SUMMARY: FIELD METHOD | DETAIL: FIELD METHOD |