\Agora

The Agora:: class provides basic Agora functionality.

Copyright 2003-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.

Summary

Methods
Properties
Constants
getAgoraId()
setAgoraId()
getCAPTCHA()
formatCategoryTree()
getSortBy()
getSortDir()
formatColumnHeaders()
getVFS()
validateAvatar()
getAvatarUrl()
distribute()
No public properties found
VFS_PATH
AVATAR_PATH
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

VFS_PATH

VFS_PATH

The virtual path to use for VFS data.

AVATAR_PATH

AVATAR_PATH

Methods

getAgoraId()

getAgoraId() : array

Determines the requested forum_id, message_id and application by checking first if they are passed as the single encoded var or individual vars.

Returns

array —

Forum, message id and application.

setAgoraId()

setAgoraId(  $forum_id,   $message_id,   $url = '',   $scope = null,   $encode = false) : string

Creates the Agora id.

Parameters

$forum_id
$message_id
$url
$scope
$encode

Returns

string —

If passed with the $url parameter, returns a completed url with the agora_id tacked on at the end, otherwise returns the simple agora_id.

getCAPTCHA()

getCAPTCHA(boolean  $new = false) : string

Returns a new or the current CAPTCHA string.

Parameters

boolean $new

If true, a new CAPTCHA is created and returned. The current, to-be-confirmed string otherwise.

Returns

string —

A CAPTCHA string.

formatCategoryTree()

formatCategoryTree(array  $forums) : array

Formats a list of forums, showing each child of a parent with appropriate indent using '.

. ' as a leader.

Parameters

array $forums

The list of forums to format.

Returns

array —

Formatted forum list.

getSortBy()

getSortBy(string  $view) : string

Returns the column to sort by, checking first if it is specified in the URL, then returning the value stored in prefs.

Parameters

string $view

The view name, used to identify preference settings for sorting.

Returns

string —

The column to sort by.

getSortDir()

getSortDir(string  $view) : integer

Returns the sort direction, checking first if it is specified in the URL, then returning the value stored in prefs.

Parameters

string $view

The view name, used to identify preference settings for sorting.

Returns

integer —

The sort direction, 0 = ascending, 1 = descending.

formatColumnHeaders()

formatColumnHeaders(array  $columns, string  $sort_by, string  $sort_dir, string  $view) : array

Formats column headers have sort links and sort arrows.

Parameters

array $columns

The columns to format.

string $sort_by

The current 'sort-by' column.

string $sort_dir

The current sort direction.

string $view

The view name, used to identify preference settings for sorting.

Returns

array —

The formated column headers to be displayed.

getVFS()

getVFS() : \VFS

Returns a {@link VFS} instance.

Returns

\VFS —

A VFS instance.

validateAvatar()

validateAvatar(  $avatar_path) 

Parameters

$avatar_path

getAvatarUrl()

getAvatarUrl(  $avatar_path,   $scopeend_sid = true) 

Parameters

$avatar_path
$scopeend_sid

distribute()

distribute(integer  $message_id) 

Send new posts to a distribution email address for a wider audience

Parameters

integer $message_id

Identifier of message to be distributed

Throws

\Horde_Mime_Exception