[ Index ]
 

Code source de Plume CMS 1.2.2

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/manager/inc/ -> class.comment.php (sommaire)

(pas de description)

Poids: 384 lignes (14 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

Comment:: (11 méthodes):
  Comment()
  load()
  set()
  check()
  getContent()
  action()
  hookOnInitTemplate()
  parseQueryString()
  commit()
  remove()
  getConnection()


Classe: Comment  - X-Ref

Constants used for the status of the comments:

define('PX_RESOURCE_STATUS_VALIDE',         1);
define('PX_RESOURCE_STATUS_OFFLINE',        2);
define('PX_RESOURCE_STATUS_TOBEVALIDATED',  5);

Defined in class.resource.php
Comment($data='')   X-Ref
Constructor.


load($id='')   X-Ref
Load the Comment

param: int Comment id ('')
return: bool Success

set($author, $email, $website, $content, $resource_id, $ip,$status=PX_RESOURCE_STATUS_VALIDE,$type=PX_COMMENT_TYPE_NORMAL, $user_id='')   X-Ref
Set the data of a comment.

param: string Author name
param: string Author email
param: string Author website
param: string Content
param: int Resource id
param: string IP address
param: int Status (PX_RESOURCE_STATUS_VALIDE)
param: int Type of comment (PX_COMMENT_TYPE_NORMAL)
param: int User id ('')
return: bool Success

check()   X-Ref
Check the integrity of the comment.

The error is set if error found.

return: bool Success

getContent($format='safe')   X-Ref
Method to get the content of a comment.

For the moment, replace line breaks with <br />

param: string Format of the output 'textarea' or ('safe')
return: string Safe content of the comment.

action($query)   X-Ref
Action to display/update a comment.

param: string Server query string
return: int Success code

hookOnInitTemplate($hook, $param)   X-Ref
Hook on the initialization of the templates.

param: string Name of the calling hook
param: array Default parameters (not used)
return: bool Success

parseQueryString($query)   X-Ref
Parse query string.

param: string Query string
return: int Resource id

commit()   X-Ref
Save the data into the database.

return: bool Success

remove()   X-Ref
Remove a comment from the database.

This a hard remove.

return: bool Success.

getConnection()   X-Ref
Get a Connection object for the comment.
It reuses the main connexion object. After calling this method
a Connection object is available as $this->con
It is safe to call it many times.




Généré le : Mon Nov 26 11:57:01 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics