XOOPS  2.6.0
CommentsPluginInterface Interface Reference

Public Member Functions

 approve (CommentsComment $comment)
 
 extraParams ()
 
 itemInfo ($item_id)
 
 itemName ()
 
 pageName ()
 
 update ($item_id, $total_num)
 

Detailed Description

Author
trabis lusop.nosp@m.oema.nosp@m.s@gma.nosp@m.il.c.nosp@m.om
Version
$Id$

Definition at line 19 of file interface.php.

Member Function Documentation

CommentsPluginInterface::approve ( CommentsComment  $comment)

This method will be executed upon successful post of an approved comment. This includes comment posts by administrators, and change of comment status from 'pending' to 'active' state. An CommentsComment object that has been approved will be passed as the first and only parameter. This should be useful for example notifying the item submitter of a comment post.

Parameters
CommentsComment$comment
Returns
void
CommentsPluginInterface::extraParams ( )
Returns
array
CommentsPluginInterface::itemInfo (   $item_id)

This method will be executed whenever a new comment form is displayed. You can set a default title for the comment and a header to be displayed on top of the form ex: return array( 'title' => 'My Article Title', 'text' => 'Content of the article'); 'timestamp' => time(); //Date of the article in unix format 'uid' => Id of the article author

Parameters
int$item_idThe unique ID of an item
Returns
array
CommentsPluginInterface::itemName ( )

You must return the unique identifier for the item ex: return 'itemid';

Returns
string
CommentsPluginInterface::pageName ( )

You must return the page where the comment form is displayed ex: return 'item.php';

Returns
string
CommentsPluginInterface::update (   $item_id,
  $total_num 
)

This method will be executed whenever the total number of 'active' comments for an item is changed.

Parameters
int$item_idThe unique ID of an item
int$total_numThe total number of active comments
Returns
void

The documentation for this interface was generated from the following file: