Forum driver class.

package core

 Methods

If we can't get a list of admins via a usergroup query, we have to disable the staff filter - else the staff filtering can cause disaster at the point of being turned on (because it can't automatically sync).

disable_staff_filter() : boolean

Returns

booleanWhether the staff filter is disabled

Get a URL to a forum.

forum_url(integer $id, boolean $tempcode_okay = false) : mixed

Parameters

$id

integer

The ID of the forum

$tempcode_okay

boolean

Whether it is okay to return the result using Tempcode (more efficient)

Returns

mixedThe URL

Find the usergroup ID of the forum guest member.

get_guest_group() : \GROUP

Returns

\GROUPThe usergroup ID of the forum guest member

Get a member's e-mail address.

get_member_email_address(\MEMBER $id) : \SHORT_TEXT

Parameters

$id

\MEMBER

The member

Returns

\SHORT_TEXTThe e-mail address (blank: not known)

Get a list of usergroups a member is in.

get_members_groups(\MEMBER $id, boolean $skip_secret = false, boolean $handle_probation = true) : array

Parameters

$id

\MEMBER

The member

$skip_secret

boolean

Whether to skip looking at secret usergroups.

$handle_probation

boolean

Whether to take probation into account

Returns

arrayThe list of usergroups

Get a list of the moderator usergroups.

get_moderator_groups() : array

Returns

arrayThe list of usergroups

Get the number of new forum posts on the system in the last 24 hours.

get_num_new_forum_posts() : integer

Returns

integerNumber of forum posts

Load extra details for a list of posts. Does not need to return anything if forum driver doesn't support partial post loading (which is only useful for threaded topic partial-display).

get_post_remaining_details(\AUTO_LINK $topic_id, array $post_ids) : array

Parameters

$topic_id

\AUTO_LINK

Topic the posts come from

$post_ids

array

List of post IDs

Returns

arrayExtra details

Get a list of the super admin usergroups.

get_super_admin_groups() : array

Returns

arrayThe list of usergroups

Get the current member's theme identifier.

get_theme(\?ID_TEXT $zone_for = null) : \ID_TEXT

Parameters

$zone_for

\?ID_TEXT

The zone we are getting the theme for (null: current zone)

Returns

\ID_TEXTThe theme identifier

Get a map of forum usergroups (id=>name).

get_usergroup_list(boolean $hide_hidden = false, boolean $only_permissive = false, boolean $force_show_all = false, \?array $force_find = null, \?MEMBER $for_member = null, boolean $skip_hidden = false) : array

Parameters

$hide_hidden

boolean

Whether to obscure the name of hidden usergroups

$only_permissive

boolean

Whether to only grab permissive usergroups

$force_show_all

boolean

Do not limit things even if there are huge numbers of usergroups

$force_find

\?array

Usergroups that must be included in the results (null: no extras must be)

$for_member

\?MEMBER

Always return usergroups of this member (null: current member)

$skip_hidden

boolean

Whether to completely skip hidden usergroups

Returns

arrayThe map

Get a member's username.

get_username(\MEMBER $id, boolean $use_displayname = false) : \?SHORT_TEXT

Parameters

$id

\MEMBER

The member

$use_displayname

boolean

Whether to use the displayname rather than the username (if we have them)

Returns

\?SHORT_TEXTThe username (null: deleted member)

Add the specified custom field to the forum (some forums implemented this using proper custom profile fields, others through adding a new field).

install_delete_custom_field(string $name) 

Parameters

$name

string

The name of the new custom field

Find whether a member is staff.

is_staff(\MEMBER $id, boolean $skip_staff_filter = false) : boolean

Parameters

$id

\MEMBER

The member

$skip_staff_filter

boolean

Whether to avoid checking the staff filter (i.e. ignore M.S.N.'s)

Returns

booleanThe answer

Find whether a member is a super administrator.

is_super_admin(\MEMBER $id) : boolean

Parameters

$id

\MEMBER

The member

Returns

booleanThe answer

Get a URL to a forum join page.

join_url() : mixed

Returns

mixedThe URL

Get a URL to send a forum member a PM.

member_pm_url(\MEMBER $id, boolean $tempcode_okay = false) : mixed

Parameters

$id

\MEMBER

The forum member

$tempcode_okay

boolean

Whether it is okay to return the result using Tempcode (more efficient)

Returns

mixedThe URL

Get a URL to a forum member's member profile.

member_profile_url(\MEMBER $id, boolean $definitely_profile = false, boolean $tempcode_okay = false) : mixed

Parameters

$id

\MEMBER

The forum member

$definitely_profile

boolean

Whether to be insistent that we go to the profile, rather than possibly starting an IM which can link to the profile

$tempcode_okay

boolean

Whether it is okay to return the result using Tempcode (more efficient, and allows keep_* parameters to propagate which you almost certainly want!)

Returns

mixedThe URL

Find whether a forum is threaded.

topic_is_threaded(integer $topic_id) : boolean

Parameters

$topic_id

integer

The topic ID

Returns

booleanWhether it is

Get a URL to a forum 'user online' list.

users_online_url(boolean $tempcode_okay = false) : mixed

Parameters

$tempcode_okay

boolean

Whether it is okay to return the result using Tempcode (more efficient)

Returns

mixedThe URL

 Properties

 

$EMOTICON_CACHE

$EMOTICON_CACHE 

Default

null
 

$MEMBER_ROWS_CACHED

$MEMBER_ROWS_CACHED 

Default

array()
 

$connection

$connection 

Default