Forum driver class.
package | core_forum_drivers |
---|---|
inherited_from | \Forum_driver_base |
check_db() : boolean
boolean
Whether it is validdisable_staff_filter() : boolean
boolean
Whether the staff filter is disabledfind_emoticons() : array
array
The mapfind_topic_id_for_topic_identifier(string $forum, \SHORT_TEXT $topic_identifier) : \?integer
string
The forum name / ID
\SHORT_TEXT
The topic identifier
\?integer
The topic ID (null: not found)forum_get_lang(\MEMBER $member) : \?LANGUAGE_NAME
\MEMBER
The member who's language needs to be fetched
\?LANGUAGE_NAME
The member's language (null: unknown)forum_id_from_name(\SHORT_TEXT $forum_name) : integer
\SHORT_TEXT
The forum name
integer
The forum IDforum_url(integer $id, boolean $tempcode_okay = false
) : mixed
integer
The ID of the forum
boolean
Whether it is okay to return the result using Tempcode (more efficient)
mixed
The URLget_custom_fields(\MEMBER $member) : \?array
\MEMBER
The member ID
\?array
A map of the custom profile fields, key_suffix=>value (null: no fields)get_drivered_table_prefix() : string
string
The forum database table prefixget_emo_dir() : \URLPATH
\URLPATH
The base URLget_emoticon_chooser(string $field_name = 'post'
) : \Tempcode
string
The ID of the form field the emoticon chooser adds to
\Tempcode
The emoticon chooser templateget_forum_topic_posts(integer $topic_id, integer $count, integer $max= 100
, integer $start= 0
, boolean $mark_read= true
, boolean $reverse= false
) : mixed
integer
The topic ID
integer
The comment count will be returned here by reference
integer
Maximum comments to returned
integer
Comment to start at
boolean
Whether to mark the topic read (ignored for this forum driver)
boolean
Whether to show in reverse
mixed
The array of maps (Each map is: title, message, member, date) (-1 for no such forum, -2 for no such topic)get_guest_group() : \GROUP
\GROUP
The usergroup ID of the forum guest memberget_guest_id() : \MEMBER
\MEMBER
The member ID of the forum guest memberget_matching_members(string $pattern, \?integer $limit = null
) : \?array
string
The pattern
\?integer
Maximum number to return (limits to the most recent active) (null: no limit)
\?array
The array of matched members (null: none found)get_member_avatar_url(\MEMBER $member) : \URLPATH
\MEMBER
The member ID
\URLPATH
The URL (blank: none)get_member_email_address(\MEMBER $id) : \SHORT_TEXT
\MEMBER
The member
\SHORT_TEXT
The e-mail address (blank: not known)get_member_email_allowed(\MEMBER $member) : boolean
\MEMBER
The member ID
boolean
Whether the member may have e-mails sent to themget_member_from_username(\SHORT_TEXT $name) : \MEMBER
\SHORT_TEXT
The member name
\MEMBER
The member IDget_member_ip(\MEMBER $member) : \IP
\MEMBER
The member ID
\IP
The IP addressget_member_photo_url(\MEMBER $member) : \URLPATH
\MEMBER
The member ID
\URLPATH
The URL (blank: none)get_member_row(\MEMBER $member) : \?array
\MEMBER
The member ID
\?array
The member row (null: no such member)get_member_row_field(\MEMBER $member, string $field) : mixed
\MEMBER
The member ID
string
The field identifier
mixed
The fieldget_members() : integer
integer
The number of membersget_members_groups(\MEMBER $id, boolean $skip_secret= false
, boolean $handle_probation= true
) : array
\MEMBER
The member
boolean
Whether to skip looking at secret usergroups.
boolean
Whether to take probation into account
array
The list of usergroupsget_moderator_groups() : array
array
The list of usergroupsget_mrow(\SHORT_TEXT $name) : \?array
\SHORT_TEXT
The member name
\?array
The profile-row (null: could not find)get_next_member(\MEMBER $member) : \?MEMBER
It cannot be assumed there are no gaps in member IDs, as members may be deleted.
\MEMBER
The member ID to increment
\?MEMBER
The next member ID (null: no next member)get_num_forum_posts() : integer
integer
The number of postsget_num_new_forum_posts() : integer
integer
Number of forum postsget_num_users_forums() : integer
integer
The number of membersget_post_count(\MEMBER $member) : integer
\MEMBER
The member ID
integer
The post countget_post_remaining_details(\AUTO_LINK $topic_id, array $post_ids) : array
\AUTO_LINK
Topic the posts come from
array
List of post IDs
array
Extra detailsget_previous_member(\MEMBER $member) : \?MEMBER
\MEMBER
The member ID to decrement
\?MEMBER
The previous member ID (null: no previous member)get_super_admin_groups() : array
array
The list of usergroupsget_theme(\?ID_TEXT $zone_for = null
) : \ID_TEXT
\?ID_TEXT
The zone we are getting the theme for (null: current zone)
\ID_TEXT
The theme identifierget_top_posters(integer $limit) : array
integer
The limit to the number of top posters to fetch
array
The rows for the given number of top posters in the forumget_topic_count(\MEMBER $member) : integer
\MEMBER
The member ID
integer
The topic countget_topics() : integer
integer
The number of topicsget_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
boolean
Whether to obscure the name of hidden usergroups
boolean
Whether to only grab permissive usergroups
boolean
Do not limit things even if there are huge numbers of usergroups
\?array
Usergroups that must be included in the results (null: no extras must be)
\?MEMBER
Always return usergroups of this member (null: current member)
boolean
Whether to completely skip hidden usergroups
array
The mapget_username(\MEMBER $id, boolean $use_displayname = false
) : \?SHORT_TEXT
\MEMBER
The member
boolean
Whether to use the displayname rather than the username (if we have them)
\?SHORT_TEXT
The username (null: deleted member)install_create_custom_field(string $name, integer $length, \BINARY $locked= 1
, \BINARY $viewable= 0
, \BINARY $settable= 0
, \BINARY $required= 0
) : boolean
string
The name of the new custom field
integer
The length of the new custom field
\BINARY
Whether the field is locked
\BINARY
Whether the field is for viewing
\BINARY
Whether the field is for setting
\BINARY
Whether the field is required
boolean
Whether the custom field was created successfullyinstall_delete_custom_field(string $name)
string
The name of the new custom field
install_get_path_search_list() : array
array
The paths in which to search for the forum configinstall_specifics() : array
The attributes have 4 values in an array
array
The attributes for the foruminstall_test_load_from(\PATH $path) : boolean
\PATH
The path in which to search
boolean
Whether the forum auto-config could be foundis_hashed() : boolean
boolean
Whether the login cookie is md5-hashedis_staff(\MEMBER $id, boolean $skip_staff_filter = false
) : boolean
\MEMBER
The member
boolean
Whether to avoid checking the staff filter (i.e. ignore M.S.N.'s)
boolean
The answeris_super_admin(\MEMBER $id) : boolean
\MEMBER
The member
boolean
The answerjoin_url() : mixed
mixed
The URLmake_post_forum_topic(\SHORT_TEXT $forum_name, \SHORT_TEXT $topic_identifier, \MEMBER $member, \LONG_TEXT $post_title, \LONG_TEXT $post, string $content_title, string $topic_identifier_encapsulation_prefix, \?URLPATH $content_url= null
, \?TIME $time= null
, \?IP $ip= null
, \?BINARY $validated= null
, \?BINARY $topic_validated= 1
, boolean $skip_post_checks= false
, \SHORT_TEXT $poster_name_if_guest= ''
, \?AUTO_LINK $parent_id= null
, boolean $staff_only= false
) : array
Spacer posts exist in order to allow staff to delete the first true post in a topic. Without spacers, this would not be possible with most forum systems. They also serve to provide meta information on the topic that cannot be encoded in the title (such as a link to the content being commented upon).
\SHORT_TEXT
The forum name
\SHORT_TEXT
The topic identifier (usually
\MEMBER
The member ID
\LONG_TEXT
The post title
\LONG_TEXT
The post content in Comcode format
string
The topic title; must be same as content title if this is for a comment topic
string
This is put together with the topic identifier to make a more-human-readable topic title or topic description (hopefully the latter and a $content_title title, but only if the forum supports descriptions)
\?URLPATH
URL to the content (null: do not make spacer post)
\?TIME
The post time (null: use current time)
\?IP
The post IP address (null: use current members IP address)
\?BINARY
Whether the post is validated (null: unknown, find whether it needs to be marked unvalidated initially). This only works with the Conversr driver.
\?BINARY
Whether the topic is validated (null: unknown, find whether it needs to be marked unvalidated initially). This only works with the Conversr driver.
boolean
Whether to skip post checks
\SHORT_TEXT
The name of the poster
\?AUTO_LINK
ID of post being replied to (null: N/A)
boolean
Whether the reply is only visible to staff
array
Topic ID (may be NULL), and whether a hidden post has been mademember_home_url(\MEMBER $id) : \URLPATH
\MEMBER
The member ID
\URLPATH
The URL to the members homemember_pm_url(\MEMBER $id, boolean $tempcode_okay = false
) : mixed
\MEMBER
The forum member
boolean
Whether it is okay to return the result using Tempcode (more efficient)
mixed
The URLmember_profile_hyperlink(\MEMBER $id, boolean $definitely_profile= false
, string $_username= ''
, boolean $use_displayname= true
) : \Tempcode
\MEMBER
The forum member
boolean
Whether to be insistent that we go to the profile, rather than possibly starting an IM which can link to the profile
string
The username (blank: look it up)
boolean
Whether to use the displayname rather than the username (if we have them)
\Tempcode
The hyperlinkmember_profile_url(\MEMBER $id, boolean $definitely_profile= false
, boolean $tempcode_okay= false
) : mixed
\MEMBER
The forum member
boolean
Whether to be insistent that we go to the profile, rather than possibly starting an IM which can link to the profile
boolean
Whether it is okay to return the result using Tempcode (more efficient, and allows keep_* parameters to propagate which you almost certainly want!)
mixed
The URLmrow_email(array $r) : \SHORT_TEXT
array
The profile-row
\SHORT_TEXT
The member e-mail addressmrow_id(array $r) : \MEMBER
array
The profile-row
\MEMBER
The member IDmrow_lastvisit(array $r) : \TIME
array
The profile-row
\TIME
The last visit datemrow_username(array $r) : string
array
The profile-row
string
The member namepin_topic(\AUTO_LINK $id, boolean $pin = true
)
\AUTO_LINK
The topic ID
boolean
True: pin it, False: unpin it
post_url(integer $id, string $forum) : \URLPATH
integer
The post ID
string
The forum ID
\URLPATH
The URL to the postprobe_ip(\IP $ip) : array
\IP
The IP address
array
The distinct rows foundset_custom_field(\MEMBER $member, string $field, string $value)
\MEMBER
The member ID
string
The field name
string
The value
show_forum_topics(mixed $name, integer $limit, integer $start, integer $max_rows, \SHORT_TEXT $filter_topic_title= ''
, boolean $show_first_posts= false
, string $date_key= 'lasttime'
, boolean $hot= false
, \SHORT_TEXT $filter_topic_description= ''
) : \?array
set | lasttime firsttime |
---|
mixed
The forum name or an array of forum IDs
integer
The limit
integer
The start position
integer
The total rows (not a parameter: returns by reference)
\SHORT_TEXT
The topic title filter
boolean
Whether to show the first posts
string
The date key to sort by
boolean
Whether to limit to hot topics
\SHORT_TEXT
The topic description filter
\?array
The array of topics (null: error)topic_is_threaded(integer $topic_id) : boolean
integer
The topic ID
boolean
Whether it istopic_url(integer $id, string $forum) : \URLPATH
integer
The topic ID
string
The forum ID
\URLPATH
The URL to the topicusers_online_url(boolean $tempcode_okay = false
) : mixed
boolean
Whether it is okay to return the result using Tempcode (more efficient)
mixed
The URL_forum_url(integer $id) : \URLPATH
integer
The forum ID
\URLPATH
The URL to the specified forum_get_member_email_address(\MEMBER $member) : \SHORT_TEXT
\MEMBER
The member ID
\SHORT_TEXT
The e-mail address_get_num_new_forum_posts() : integer
integer
The number of posts_get_username(\MEMBER $member) : \?SHORT_TEXT
If this returns NULL, then the member has been deleted. Always take potential NULL output into account.
\MEMBER
The member ID
\?SHORT_TEXT
The member name (null: member deleted)_join_url() : \URLPATH
\URLPATH
The URL to the registration page_member_pm_url(\MEMBER $id) : \URLPATH
\MEMBER
The member ID
\URLPATH
The URL to the private/personal message page_member_profile_url(\MEMBER $id) : \URLPATH
\MEMBER
The member ID
\URLPATH
The URL to the member profile_users_online_url() : \URLPATH
\URLPATH
The URL to the members-online page$EMOTICON_CACHE
null
$MEMBER_ROWS_CACHED
array()
$connection