Forum driver class.
| package | core_forum_drivers |
|---|---|
| inherited_from | \Forum_driver_base |
_get_theme(boolean $skip_member_specific = false) : \ID_TEXT
The themes/map.ini file functions to provide this mapping between forum themes, and Composr themes, and has a slightly different meaning for different forum drivers. For example, some drivers map the forum themes theme directory to the Composr theme name, whilst others made the humanly readeable name.
booleanWhether to avoid member-specific lookup
\ID_TEXTThe themecns_flood_control(\MEMBER $id)
\MEMBERThe member ID that just got detected
disable_staff_filter() : boolean
booleanWhether the staff filter is disabledfind_emoticons(\?MEMBER $member = null) : array
\?MEMBEROnly emoticons the given member can see (null: don't care)
arrayThe mapfind_topic_id_for_topic_identifier(string $forum, \SHORT_TEXT $topic_identifier) : \?integer
stringThe forum name / ID
\SHORT_TEXTThe topic identifier
\?integerThe topic ID (null: not found)forum_get_lang(\MEMBER $member) : \?LANGUAGE_NAME
\MEMBERThe member who's language needs to be fetched
\?LANGUAGE_NAMEThe member's language (null: unknown)forum_id_from_name(\SHORT_TEXT $forum_name) : integer
\SHORT_TEXTThe forum name
integerThe forum IDforum_layer_initialise()
forum_md5(string $password, \SHORT_TEXT $username) : string
stringThe data to hash (the password in actuality)
\SHORT_TEXTThe username
stringThe hashed dataforum_url(integer $id, boolean $tempcode_okay = false) : mixed
integerThe ID of the forum
booleanWhether it is okay to return the result using Tempcode (more efficient)
mixedThe URLget_custom_fields(\MEMBER $member) : \?array
\MEMBERThe member ID
\?arrayA map of the custom profile fields, key_suffix=>value (null: no fields)get_displayname(\ID_TEXT $username) : \SHORT_TEXT
If no display name generator is configured, this will be the same as the username.
\ID_TEXTThe username
\SHORT_TEXTThe display nameget_drivered_table_prefix() : string
stringThe forum database table prefixget_emo_dir() : \URLPATH
\URLPATHThe base URLget_emoticon_chooser(string $field_name = 'post') : \Tempcode
stringThe ID of the form field the emoticon chooser adds to
\TempcodeThe emoticon chooser templateget_forum_topic_posts(integer $topic_id, integer $count, integer $max= 100, integer $start= 0, boolean $mark_read= true, boolean $reverse= false, boolean $light_if_threaded= false, \?array $posts= null, boolean $load_spacer_posts_too= false, \ID_TEXT $sort= 'date') : mixed
| set | date rating |
|---|
integerThe topic ID
integerThe comment count will be returned here by reference
integerMaximum comments to returned
integerComment to start at
booleanWhether to mark the topic read
booleanWhether to show in reverse
booleanWhether to only load minimal details if it is a threaded topic
\?arrayList of post IDs to load (null: no filter)
booleanWhether to load spacer posts
\ID_TEXTPreferred sort order (appropriate will use rating if threaded, other
mixedThe array of maps (Each map is: title, message, member, date) (-1 for no such forum, -2 for no such topic)get_guest_group() : \GROUP
\GROUPThe usergroup ID of the forum guest memberget_guest_id() : \MEMBER
\MEMBERThe member ID of the forum guest memberget_matching_members(string $pattern, \?integer $limit= null, boolean $friends= false) : \?array
stringThe pattern
\?integerMaximum number to return (limits to the most recent active) (null: no limit)
booleanWhether to limit to friends of the current member, if possible
\?arrayThe array of matched members (null: none found)get_member_avatar_url(\MEMBER $member) : \URLPATH
\MEMBERThe member ID
\URLPATHThe URL (blank: none)get_member_email_address(\MEMBER $id) : \SHORT_TEXT
\MEMBERThe member
\SHORT_TEXTThe e-mail address (blank: not known)get_member_email_allowed(\MEMBER $member) : boolean
\MEMBERThe member ID
booleanWhether the member may have e-mails sent to themget_member_from_email_address(\SHORT_TEXT $email_address) : \?MEMBER
\SHORT_TEXTThe member email address
\?MEMBERThe member ID (null: not found)get_member_from_username(\SHORT_TEXT $name) : \?MEMBER
\SHORT_TEXTThe member name
\?MEMBERThe member ID (null: not found)get_member_ip(\MEMBER $id) : \IP
\MEMBERThe member ID
\IPThe IP addressget_member_photo_url(\MEMBER $member) : \URLPATH
\MEMBERThe member ID
\URLPATHThe URL (blank: none)get_member_row(\MEMBER $member) : \?array
\MEMBERThe member ID
\?arrayThe member row (null: no such member)get_member_row_field(\MEMBER $member, string $field) : mixed
\MEMBERThe member ID
stringThe field identifier
mixedThe fieldget_members() : integer
integerThe number of membersget_members_groups(\MEMBER $id, boolean $skip_secret= false, boolean $handle_probation= true) : array
\MEMBERThe member
booleanWhether to skip looking at secret usergroups.
booleanWhether to take probation into account
arrayThe list of usergroupsget_moderator_groups() : array
arrayThe list of usergroupsget_mrow(\SHORT_TEXT $name) : \?array
\SHORT_TEXTThe member name
\?arrayThe 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.
\MEMBERThe member ID to increment
\?MEMBERThe next member ID (null: no next member)get_num_forum_posts() : integer
integerThe number of postsget_num_new_forum_posts() : integer
integerNumber of forum postsget_num_users_forums() : \?integer
\?integerThe number of members (null: the same as the site number)get_post_count(\MEMBER $member) : integer
\MEMBERThe member ID
integerThe post countget_post_remaining_details(\AUTO_LINK $topic_id, array $post_ids) : array
| inherited_from | \Forum_driver_base::get_post_remaining_details() |
|---|
\AUTO_LINKTopic the posts come from
arrayList of post IDs
arrayExtra detailsget_post_remaining_details(\AUTO_LINK $topic_id, array $post_ids) : array
\AUTO_LINKTopic the posts come from
arrayList of post IDs
arrayExtra detailsget_previous_member(\MEMBER $member) : \?MEMBER
\MEMBERThe member ID to decrement
\?MEMBERThe previous member ID (null: no previous member)get_super_admin_groups() : array
arrayThe list of usergroupsget_theme(\?ID_TEXT $zone_for = null) : \ID_TEXT
\?ID_TEXTThe zone we are getting the theme for (null: current zone)
\ID_TEXTThe theme identifierget_top_posters(integer $limit) : array
integerThe limit to the number of top posters to fetch
arrayThe rows for the given number of top posters in the forumget_topic_count(\MEMBER $member) : integer
\MEMBERThe member ID
integerThe topic countget_topics() : integer
integerThe 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
booleanWhether to obscure the name of hidden usergroups
booleanWhether to only grab permissive usergroups
booleanDo not limit things even if there are huge numbers of usergroups
\?arrayUsergroups that must be included in the results (null: no extras must be)
\?MEMBERAlways return usergroups of this member (null: current member)
booleanWhether to completely skip hidden usergroups
arrayThe mapget_username(\MEMBER $id, boolean $use_displayname = false) : \?SHORT_TEXT
\MEMBERThe member
booleanWhether to use the displayname rather than the username (if we have them)
\?SHORT_TEXTThe username (null: deleted member)install_create_custom_field(string $name, integer $length, \BINARY $locked= 1, \BINARY $viewable= 0, \BINARY $settable= 0, \BINARY $required= 0, string $description= '', string $type= 'long_text', \BINARY $encrypted= 0, \?string $default= null) : boolean
stringThe name of the new custom field
integerThe length of the new custom field
\BINARYWhether the field is locked
\BINARYWhether the field is for viewing
\BINARYWhether the field is for setting
\BINARYWhether the field is required
stringDescription
stringThe field type
\BINARYWhether the field is encrypted
\?stringDefault field value (null: standard for field type)
booleanWhether the custom field was created successfullyinstall_delete_custom_field(string $name)
stringThe name of the new custom field
install_get_path_search_list() : array
arrayThe paths in which to search for the forum configinstall_specifics() : array
The attributes have 4 values in an array
arrayThe attributes for the foruminstall_test_load_from(\PATH $path) : boolean
\PATHThe path in which to search
booleanWhether the forum auto-config could be foundis_banned(\MEMBER $member) : boolean
\MEMBERThe member ID
booleanWhether the member is bannedis_hashed() : boolean
booleanWhether the login cookie is md5-hashedis_staff(\MEMBER $id, boolean $skip_staff_filter = false) : boolean
\MEMBERThe member
booleanWhether to avoid checking the staff filter (i.e. ignore M.S.N.'s)
booleanThe answeris_super_admin(\MEMBER $id) : boolean
\MEMBERThe member
booleanThe answerjoin_url() : mixed
mixedThe URLmake_post_forum_topic(\SHORT_TEXT $forum_name, \SHORT_TEXT $topic_identifier, \MEMBER $member_id, \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, \?ID_TEXT $no_notify_for__notification_code= null, \?SHORT_TEXT $no_notify_for__code_category= null, \?TIME $time_post= null, \?MEMBER $spacer_post_member_id= null) : 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_TEXTThe forum name
\SHORT_TEXTThe topic identifier (usually
\MEMBERThe member ID
\LONG_TEXTThe post title
\LONG_TEXTThe post content in Comcode format
stringThe topic title; must be same as content title if this is for a comment topic
stringThis 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)
\?URLPATHURL to the content (null: do not make spacer post)
\?TIMEThe post time (null: use current time)
\?IPThe post IP address (null: use current members IP address)
\?BINARYWhether the post is validated (null: unknown, find whether it needs to be marked unvalidated initially). This only works with the Conversr driver.
\?BINARYWhether the topic is validated (null: unknown, find whether it needs to be marked unvalidated initially). This only works with the Conversr driver.
booleanWhether to skip post checks
\SHORT_TEXTThe name of the poster
\?AUTO_LINKID of post being replied to (null: N/A)
booleanWhether the reply is only visible to staff
\?ID_TEXTDO NOT send notifications to: The notification code (null: no restriction)
\?SHORT_TEXTDO NOT send notifications to: The category within the notification code (null: none / no restriction)
\?TIMEThe post time (null: use current time)
\?MEMBEROwner of comment topic (null: Guest)
arrayTopic ID (may be NULL), and whether a hidden post has been mademember_group_query(array $groups, \?integer $max= null, integer $start= 0) : \?array
arrayThe array of usergroups
\?integerReturn up to this many entries for primary members and this many entries for secondary members (null: no limit, only use no limit if querying very restricted usergroups!)
integerReturn primary members after this offset and secondary members after this offset
\?arrayThe map of members, member ID to details (null: no members)member_home_url(\MEMBER $id, boolean $tempcode_okay = false) : mixed
\MEMBERThe member ID
booleanWhether it is okay to return the result using Tempcode (more efficient, and allows keep_* parameters to propagate which you almost certainly want!)
mixedThe URL to the members homemember_pm_url(\MEMBER $id, boolean $tempcode_okay = false) : mixed
\MEMBERThe forum member
booleanWhether it is okay to return the result using Tempcode (more efficient)
mixedThe URLmember_profile_hyperlink(\MEMBER $id, boolean $definitely_profile= false, string $_username= '', boolean $use_displayname= true) : \Tempcode
\MEMBERThe forum member
booleanWhether to be insistent that we go to the profile, rather than possibly starting an IM which can link to the profile
stringThe username (blank: look it up)
booleanWhether to use the displayname rather than the username (if we have them)
\TempcodeThe hyperlinkmember_profile_url(\MEMBER $id, boolean $definitely_profile= false, boolean $tempcode_okay= false) : mixed
\MEMBERThe forum member
booleanWhether to be insistent that we go to the profile, rather than possibly starting an IM which can link to the profile
booleanWhether it is okay to return the result using Tempcode (more efficient, and allows keep_* parameters to propagate which you almost certainly want!)
mixedThe URLmrow_email(array $r) : \SHORT_TEXT
arrayThe profile-row
\SHORT_TEXTThe member e-mail addressmrow_group(array $r) : \GROUP
arrayThe profile-row
\GROUPThe member's primary usergroupmrow_id(array $r) : \MEMBER
arrayThe profile-row
\MEMBERThe member IDmrow_lastvisit(array $r) : \TIME
arrayThe profile-row
\TIMEThe last visit datemrow_username(array $r) : string
arrayThe profile-row
stringThe member namepin_topic(\AUTO_LINK $id, boolean $pin = true)
\AUTO_LINKThe topic ID
booleanTrue: pin it, False: unpin it
post_url(integer $id, string $forum, boolean $tempcode_okay = false) : mixed
integerThe post ID
stringThe forum ID
booleanWhether it is okay to return the result using Tempcode (more efficient)
mixedThe URL to the postprobe_ip(\IP $ip) : array
\IPThe IP address
arrayThe distinct rows foundset_custom_field(\MEMBER $member, string $field, string $value)
\MEMBERThe member ID
stringThe field name
stringThe 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= '', boolean $open_only= false) : \?array
| set | lasttime firsttime |
|---|
mixedThe forum name or an array of forum IDs (in such an array the KEYS are forum IDs, and the values ignored)
integerThe limit
integerThe start position
integerThe total rows (not a parameter: returns by reference)
\SHORT_TEXTThe topic title filter
booleanWhether to show the first posts
stringThe date key to sort by
booleanWhether to limit to hot topics
\SHORT_TEXTThe topic description filter
booleanOpen tickets only
\?arrayThe array of topics (null: error/none)topic_is_threaded(integer $topic_id) : boolean
| inherited_from | \Forum_driver_base::topic_is_threaded() |
|---|
integerThe topic ID
booleanWhether it istopic_is_threaded(integer $topic_id) : boolean
integerThe topic ID
booleanWhether it istopic_url(integer $id, string $forum= '', boolean $tempcode_okay= false) : mixed
integerThe topic ID
stringThe forum ID
booleanWhether it is okay to return the result using Tempcode (more efficient)
mixedThe URL to the topicusers_online_url(boolean $tempcode_okay = false) : mixed
booleanWhether it is okay to return the result using Tempcode (more efficient)
mixedThe URL_forum_url(integer $id, boolean $tempcode_okay = false) : mixed
integerThe forum ID
booleanWhether it is okay to return the result using Tempcode (more efficient)
mixedThe URL to the specified forum_get_member_email_address(\MEMBER $member) : \SHORT_TEXT
\MEMBERThe member ID
\SHORT_TEXTThe e-mail address_get_members_groups(\MEMBER $member, boolean $skip_secret= false, boolean $handle_probation= true) : array
\MEMBERThe member ID
booleanWhether to skip looking at secret usergroups.
booleanWhether to take probation into account
arrayThe array of forum usergroups_get_moderator_groups() : array
It should not be assumed that a member only has one usergroup - this depends upon the forum the driver works for. It also does not take the staff site filter into account.
arrayThe moderator usergroup IDs_get_num_new_forum_posts() : integer
integerThe number of posts_get_super_admin_groups() : array
arrayThe admin usergroup IDs_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
booleanWhether to obscure the name of hidden usergroups
booleanWhether to only grab permissive usergroups
booleanDo not limit things even if there are huge numbers of usergroups
\?arrayUsergroups that must be included in the results (null: no extras must be)
\?MEMBERAlways return usergroups of this member (null: current member)
booleanWhether to completely skip hidden usergroups
arrayThe usergroup list, a map of usergroup ID to usergroup name_get_username(\MEMBER $member) : \?SHORT_TEXT
If this returns NULL, then the member has been deleted. Always take potential NULL output into account.
\MEMBERThe member ID
\?SHORT_TEXTThe member name (null: member deleted)_install_delete_custom_field(string $name)
stringThe name of the new custom field
_is_staff(\MEMBER $member) : boolean
\MEMBERThe member ID
booleanWhether the member is staff_is_super_admin(\MEMBER $member) : boolean
\MEMBERThe member ID
booleanWhether the member is a super admin_join_url() : \URLPATH
\URLPATHThe URL to the registration page_member_pm_url(\MEMBER $id, boolean $tempcode_okay = false) : mixed
\MEMBERThe member ID
booleanWhether it is okay to return the result using Tempcode (more efficient)
mixedThe URL to the private/personal message page_member_profile_url(\MEMBER $id, boolean $tempcode_okay = false) : mixed
\MEMBERThe member ID
booleanWhether it is okay to return the result using Tempcode (more efficient, and allows keep_* parameters to propagate which you almost certainly want!)
mixedThe URL to the member profile_users_online_url(boolean $tempcode_okay = false) : mixed
booleanWhether it is okay to return the result using Tempcode (more efficient)
mixedThe URL to the members-online page$EMOTICON_CACHE
null$MEMBER_ROWS_CACHED
array()$connection