Méthode | Description | |
---|---|---|
addMessage ( string $scope, string $forum_name, string $callback, array $params = [] ) : mixed | Allows other Horde apps to add/edit messages. | |
deleteForum ( string $scope, string $forum_name ) : boolean | Allow other applications to delete forums. Used when an object that has been commented on has been deleted. | |
doComments ( string $scope, string $key, string $callback, $bodies = true, string $base_url = null, string $url = null, array $variables = null, string $template_file = false ) : mixed | Allows other Horde apps to post messages. | |
getForumName ( string $scope, integer $forum_id ) : mixed | Retrieve the name of a forum | |
getThreads ( string $forum_name, string $sort_by = 'message_timestamp', integer $sort_dir, boolean $bodies = false, string $scope = 'agora', string $base_url = null, string $from, string $count ) : array | Returns all messages of a forum, in a threaded order. | |
getThreadsBatch ( array $forum_names, string $sort_by = 'message_timestamp', integer $sort_dir, boolean $bodies = false, string $scope = 'agora', string $base_url = null, string $from, string $count ) : array | Returns all messages for the forums requested, in a threaded order. | |
getThreadsByForumOwner ( $owner, string $sort_by = 'message_timestamp', integer $sort_dir, boolean $bodies = false, string $scope = 'agora', string $from, string $count ) : array | Returns all messages of a forum, in a threaded order. | |
listForums ( integer $forum_id, string $scope = null ) : array | Get back a list of available forums. | |
moderateForm ( string $scope ) | Prepare the moderate form | |
numMessages ( string $forum_name, string $scope = 'agora', integer $thread_id = null ) : integer | Returns the number of messages in a forum. | |
numMessagesBatch ( array $forum_name, string $scope = 'agora', integer $thread_id = null ) : mixed | Returns the number of messages for the requested forums. | |
postMessage ( string $scope, string $forum_name, string $callback, array $params = [], string $url = null, array $variables = null ) : mixed | Allows other Horde apps to post messages. | |
prepareFormData ( string $scope, string $parent = false, array $info = [], string $callback = null ) | Fill up a form data array. | |
removeMessage ( string $scope, string $forum_name, string $callback, array $params = [], array $variables = null ) : mixed | Allows other Horde apps to remove messages. | |
renderThreads ( string $forum_name, boolean $bodies = false, string $scope = 'agora', string $base_url = null, string $template_file = false ) : string | Returns all threads of a forum in a threaded view. | |
saveForum ( string $scope, string $parent, array $info ) | Create or modify an agora forum. |
public addMessage ( string $scope, string $forum_name, string $callback, array $params = [] ) : mixed | ||
$scope | string | The application which is posting this message. |
$forum_name | string | The unique name for the forum. |
$callback | string | A callback method of the specified application that gets called to make sure that posting to this forum is allowed. |
$params | array | Any parameters for the forum message posting.
message_id - An existing message to edit message_parent_id - The ID of the parent message message_body - Message body |
Résultat | mixed | Returns message id if the message was posted or PEAR_Error object on error |
public doComments ( string $scope, string $key, string $callback, $bodies = true, string $base_url = null, string $url = null, array $variables = null, string $template_file = false ) : mixed | ||
$scope | string | The application which is posting this message. |
$key | string | Unique key from the object (picture etc we're viewing. It will be used as the forum name. |
$callback | string | A callback method of the specified application that gets called to make sure that posting to this forum is allowed. |
$base_url | string | Base URL the edit/delete/reply links should point to. |
$url | string | If specified, the form gets submitted to this URL instead of the current page. |
$variables | array | A hash with all variables of a submitted form generated by this method. |
$template_file | string | Template file to use. |
Résultat | mixed | array Returns either the rendered Horde_Form for comments and threads for posting/viewing a message or PEAR objects on error. |
public getThreads ( string $forum_name, string $sort_by = 'message_timestamp', integer $sort_dir, boolean $bodies = false, string $scope = 'agora', string $base_url = null, string $from, string $count ) : array | ||
$forum_name | string | The unique name for the forum. |
$sort_by | string | Return messages sorted by this property. |
$sort_dir | integer | The direction by which to sort: 0 - ascending 1 - descending |
$bodies | boolean | Whether to include message bodies in the view. |
$scope | string | The application that the specified forum belongs to. |
$base_url | string | An alternate link where edit/delete/reply links point to. |
$from | string | The thread to begin listing at. |
$count | string | The number of threads to return. |
Résultat | array | All messages of the specified forum. |
public getThreadsBatch ( array $forum_names, string $sort_by = 'message_timestamp', integer $sort_dir, boolean $bodies = false, string $scope = 'agora', string $base_url = null, string $from, string $count ) : array | ||
$forum_names | array | An array of unique forum names. |
$sort_by | string | Return messages sorted by this property. |
$sort_dir | integer | The direction by which to sort: 0 - ascending 1 - descending |
$bodies | boolean | Whether to include message bodies in the view. |
$scope | string | The application that the specified forum belongs to. |
$base_url | string | An alternate link where edit/delete/reply links point to. |
$from | string | The thread to begin listing at. |
$count | string | The number of threads to return. |
Résultat | array | An array of message arrays of the specified forum. |
public getThreadsByForumOwner ( $owner, string $sort_by = 'message_timestamp', integer $sort_dir, boolean $bodies = false, string $scope = 'agora', string $from, string $count ) : array | ||
$sort_by | string | Return messages sorted by this property. |
$sort_dir | integer | The direction by which to sort: 0 - ascending 1 - descending |
$bodies | boolean | Whether to include message bodies in the view. |
$scope | string | The application that the specified forum belongs to. |
$from | string | The thread to begin listing at. |
$count | string | The number of threads to return. |
Résultat | array | All messages of the specified forum. |
public moderateForm ( string $scope ) | ||
$scope | string | The Horde application that is saving this forum. |
public numMessages ( string $forum_name, string $scope = 'agora', integer $thread_id = null ) : integer | ||
$forum_name | string | The unique name for the forum. |
$scope | string | The application that the specified forum belongs to. |
$thread_id | integer | The thread to count, if not supplied it will count all messages |
Résultat | integer | The number of messages in the specified forum. |
public numMessagesBatch ( array $forum_name, string $scope = 'agora', integer $thread_id = null ) : mixed | ||
$forum_name | array | An array of unique forum names. |
$scope | string | The application that the specified forum belongs to. |
$thread_id | integer | The thread to count, if not supplied it will count all messages |
Résultat | mixed | An array containing the message counts with the forum name as the key | PEAR_Error |
public postMessage ( string $scope, string $forum_name, string $callback, array $params = [], string $url = null, array $variables = null ) : mixed | ||
$scope | string | The application which is posting this message. |
$forum_name | string | The unique name for the forum. |
$callback | string | A callback method of the specified application that gets called to make sure that posting to this forum is allowed. |
$params | array | Any parameters for the forum message posting.
message_id - An existing message to edit message_parent_id - The ID of the parent message title - Posting title |
$url | string | If specified, the form gets submitted to this URL instead of the current page. |
$variables | array | A hash with all variables of a submitted form generated by this method. |
Résultat | mixed | Returns either the rendered Horde_Form for posting a message or PEAR_Error object on error, or true in case of a successful post. |
public prepareFormData ( string $scope, string $parent = false, array $info = [], string $callback = null ) | ||
$scope | string | The Horde application that is saving this forum. |
$parent | string | The parent forum. |
$info | array | The forum information to consisting of: forum_parent_id forum_name forum_description forum_moderated forum_attachments |
$callback | string | A callback method of the specified application that gets called to make sure that posting to this forum is allowed. |
public removeMessage ( string $scope, string $forum_name, string $callback, array $params = [], array $variables = null ) : mixed | ||
$scope | string | The application which is posting this message. |
$forum_name | string | The unique name for the forum. |
$callback | string | A callback method of the specified application that gets called to make sure that posting to this forum is allowed. |
$params | array | Any parameters for the forum message posting.
message_id - An existing message to delete |
$variables | array | A hash with all variables of a submitted form generated by this method. |
Résultat | mixed | Returns either the rendered Horde_Form for posting a message or PEAR_Error object on error, or true in case of a successful post. |
public renderThreads ( string $forum_name, boolean $bodies = false, string $scope = 'agora', string $base_url = null, string $template_file = false ) : string | ||
$forum_name | string | The unique name for the forum. |
$bodies | boolean | Whether to include message bodies in the view. |
$scope | string | The application that the specified forum belongs to. |
$base_url | string | An alternate link where edit/delete/reply links point to. |
$template_file | string | Template file to use. |
Résultat | string | The HTML code of the thread view. |