Class forum_driver_ipb1

Description
  • copyright: ocProducts Ltd

Located in /sources/forum/ipb1.php (line 32)

forum_driver_base
   |
   --forum_driver_ipb_shared
      |
      --forum_driver_ipb1
Method Summary
array find_emoticons ()
array forum_authorise_login (?SHORT_TEXT $username, MEMBER $userid, MD5 $password_hashed, string $password_raw, [boolean $cookie_login = false])
?array get_custom_fields (MEMBER $member)
URLPATH get_emo_dir ()
mixed get_forum_topic_posts (SHORT_TEXT $forum_name, SHORT_TEXT $topic_name, SHORT_TEXT $topic_description, integer &$count, [integer $max = 100], [integer $start = 0])
?array get_matching_members (string $pattern, [?integer $limit = NULL])
integer get_members ()
URLPATH get_member_avatar_url (MEMBER $member)
MEMBER get_member_from_username (SHORT_TEXT $name)
?array get_member_row (MEMBER $member)
integer get_num_forum_posts ()
array get_skin_list ()
integer get_topics ()
boolean install_create_custom_field (string $name, integer $length)
boolean install_test_load_from (PATH $path)
void make_post_forum_topic (SHORT_TEXT $forum_name, SHORT_TEXT $topic_name, MEMBER $member, LONG_TEXT $_postdetails, LONG_TEXT $title, tempcode $_topic_for, [?TIME $time = NULL], [?IP $ip = NULL])
?array pget_row (SHORT_TEXT $name)
string pname_name (array $r)
void set_custom_field (MEMBER $member, string $field, string $amount)
?array show_forum_topics (mixed $name, integer $limit, integer $start, integer &$max_rows, [SHORT_TEXT $filter_topic_name = ''], [boolean $show_first_posts = false], [string $date_key = 'lasttime'], [boolean $hot = false], [SHORT_TEXT $filter_topic_description = ''])
array _get_members_groups (MEMBER $member)
mixed _get_stat (string $stat)
ID_TEXT _get_theme ([boolean $skip_member_specific = false])
?SHORT_TEXT _get_username (MEMBER $member)
Variables
Methods
find_emoticons (line 394)

Get a map between smiley codes and templates representing the HTML-image-code for this smiley. The smilies present of course depend on the forum involved.

  • return: The map
array find_emoticons ()
forum_authorise_login (line 544)

Find if the given member id and password is valid. If username is NULL, then the member id is used instead.

All authorisation, cookies, and form-logins, are passed through this function. Some forums do cookie logins differently, so a Boolean is passed in to indicate whether it is a cookie login.

  • return: A map of 'id' and 'error'. If 'id' is NULL, an error occured and 'error' is set
array forum_authorise_login (?SHORT_TEXT $username, MEMBER $userid, MD5 $password_hashed, string $password_raw, [boolean $cookie_login = false])
  • ?SHORT_TEXT $username: The member username (NULL: don't use this in the authentication - but look it up using the ID if needed)
  • MEMBER $userid: The member id
  • MD5 $password_hashed: The md5-hashed password
  • string $password_raw: The raw password
  • boolean $cookie_login: Whether this is a cookie login
get_custom_fields (line 141)

Get custom profile fields values for all 'ocp_' prefixed keys.

  • return: A map of the custom profile fields, key_suffix=>value (NULL: no fields)
?array get_custom_fields (MEMBER $member)
  • MEMBER $member: The member id
get_emo_dir (line 384)

Find the base URL to the emoticons.

  • return: The base URL
URLPATH get_emo_dir ()
get_forum_topic_posts (line 276)

Get an array of maps for the topic in the given forum.

  • return: The array of maps (Each map is: title, message, member, date) (-1 for no such forum, -2 for no such topic)
mixed get_forum_topic_posts (SHORT_TEXT $forum_name, SHORT_TEXT $topic_name, SHORT_TEXT $topic_description, integer &$count, [integer $max = 100], [integer $start = 0])
  • SHORT_TEXT $forum_name: The forum name
  • SHORT_TEXT $topic_name: The topic name
  • SHORT_TEXT $topic_description: The topic description. If this is non-blank, this is used for the search rather than the title
  • integer &$count: The comment count will be returned here by reference
  • integer $max: Maximum comments to returned
  • integer $start: Comment to start at
get_matching_members (line 79)

Find all members with a name matching the given SQL LIKE string.

  • return: The array of matched members (NULL: none found)
?array get_matching_members (string $pattern, [?integer $limit = NULL])
  • string $pattern: The pattern
  • ?integer $limit: Maximum number to return (limits to the most recent active) (NULL: no limit)
get_members (line 495)

Get the number of members registered on the forum.

  • return: The number of members
integer get_members ()
get_member_avatar_url (line 212)

Get the avatar URL for the specified member id.

  • return: The URL (blank: none)
URLPATH get_member_avatar_url (MEMBER $member)
  • MEMBER $member: The member id
get_member_from_username (line 95)

Get a member id from the given member's username.

  • return: The member id
MEMBER get_member_from_username (SHORT_TEXT $name)
  • SHORT_TEXT $name: The member name
get_member_row (line 593)

Gets a whole member row from the database.

  • return: The member row (NULL: no such member)
?array get_member_row (MEMBER $member)
  • MEMBER $member: The member id
get_num_forum_posts (line 515)

Get the total posts ever made on the forum.

  • return: The number of posts
integer get_num_forum_posts ()
get_skin_list (line 416)

Find a list of all forum skins (aka themes).

  • return: The list of skins
array get_skin_list ()
get_topics (line 505)

Get the total topics ever made on the forum.

  • return: The number of topics
integer get_topics ()
install_create_custom_field (line 107)

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

  • return: Whether the custom field was created successfully
boolean install_create_custom_field (string $name, integer $length)
  • string $name: The name of the new custom field
  • integer $length: The length of the new custom field
install_get_path_search_list (line 183)

Get an array of paths to search for config at.

  • return: The paths in which to search for the forum config
array install_get_path_search_list ()
install_test_load_from (line 162)

Searches for forum auto-config at this path.

  • return: Whether the forum auto-config could be found
boolean install_test_load_from (PATH $path)
  • PATH $path: The path in which to search
make_post_forum_topic (line 237)

Makes a post in the specified forum, in the specified topic according to the given specifications. If the topic doesn't exist, it is created along with a spacer-post.

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). Note that $post should be in HTML, and some forums do not store posts as HTML. This is unfortunate, but there are some limits to just how far you can reasonably integrate with all these different forum systems without making a programatic mess.

void make_post_forum_topic (SHORT_TEXT $forum_name, SHORT_TEXT $topic_name, MEMBER $member, LONG_TEXT $_postdetails, LONG_TEXT $title, tempcode $_topic_for, [?TIME $time = NULL], [?IP $ip = NULL])
  • SHORT_TEXT $forum_name: The forum name
  • SHORT_TEXT $topic_name: The topic name
  • MEMBER $member: The member id
  • LONG_TEXT $_postdetails: The post content in Comcode format
  • LONG_TEXT $title: The post title
  • tempcode $_topic_for: The content title the topic is related to
  • ?TIME $time: The post time (NULL: use current time)
  • ?IP $ip: The post IP address (NULL: use current members IP address)
pget_row (line 52)

Get a member profile-row for the member of the given name.

  • return: The profile-row (NULL: could not find)
?array pget_row (SHORT_TEXT $name)
  • SHORT_TEXT $name: The member name
pname_name (line 41)

From a member profile-row, get the member's name.

  • return: The member name
string pname_name (array $r)
  • array $r: The profile-row
set_custom_field (line 126)

Set a custom profile fields value. It should not be called directly.

void set_custom_field (MEMBER $member, string $field, string $amount)
  • MEMBER $member: The member id
  • string $field: The field name
  • string $amount: The value
show_forum_topics (line 326)

Get an array of topics in the given forum. Each topic is an array with the following attributes:

  • id, the topic id
  • title, the topic title
  • lastusername, the username of the last poster
  • lasttime, the timestamp of the last reply
  • closed, a Boolean for whether the topic is currently closed or not
  • firsttitle, the title of the first post
  • firstpost, the first post (only set if $show_first_posts was true)

  • return: The array of topics (NULL: error)
?array show_forum_topics (mixed $name, integer $limit, integer $start, integer &$max_rows, [SHORT_TEXT $filter_topic_name = ''], [boolean $show_first_posts = false], [string $date_key = 'lasttime'], [boolean $hot = false], [SHORT_TEXT $filter_topic_description = ''])
  • mixed $name: The forum name or an array of forum IDs
  • integer $limit: The limit
  • integer $start: The start position
  • integer &$max_rows: The total rows (not a parameter: returns by reference)
  • SHORT_TEXT $filter_topic_name: The topic name filter
  • boolean $show_first_posts: Whether to show the first posts
  • string $date_key: The date key to sort by
  • boolean $hot: Whether to limit to hot topics
  • SHORT_TEXT $filter_topic_description: The topic description filter
_get_members_groups (line 526)

Get the forum usergroup relating to the specified member id.

  • return: The array of forum usergroups
array _get_members_groups (MEMBER $member)
  • MEMBER $member: The member id
_get_stat (line 479)

Get an IPB statistic.

  • return: The value of the statistic
mixed _get_stat (string $stat)
  • string $stat: The name of the statistic
_get_theme (line 432)

Try to find the theme that the logged-in/guest member is using, and map it to an ocPortal theme.

The themes/map.ini file functions to provide this mapping between forum themes, and ocPortal themes, and has a slightly different meaning for different forum drivers. For example, some drivers map the forum themes theme directory to the ocPortal theme name, whilst others made the humanly readeable name.

  • return: The theme
ID_TEXT _get_theme ([boolean $skip_member_specific = false])
  • boolean $skip_member_specific: Whether to avoid member-specific lookup
_get_username (line 66)

Get the name relating to the specified member id.

If this returns NULL, then the member has been deleted. Always take potential NULL output into account.

  • return: The member name (NULL: member deleted)
?SHORT_TEXT _get_username (MEMBER $member)
  • MEMBER $member: The member id

Inherited Methods

Inherited From forum_driver_ipb_shared

forum_driver_ipb_shared::check_db()
forum_driver_ipb_shared::forum_get_lang()
forum_driver_ipb_shared::forum_id_from_name()
forum_driver_ipb_shared::get_drivered_table_prefix()
forum_driver_ipb_shared::get_emoticon_chooser()
forum_driver_ipb_shared::get_guest_id()
forum_driver_ipb_shared::get_member_email_allowed()
forum_driver_ipb_shared::get_member_ip()
forum_driver_ipb_shared::get_member_join_timestamp()
forum_driver_ipb_shared::get_member_photo_url()
forum_driver_ipb_shared::get_member_row_field()
forum_driver_ipb_shared::get_next_member()
forum_driver_ipb_shared::get_num_users_forums()
forum_driver_ipb_shared::get_post_count()
forum_driver_ipb_shared::get_previous_member()
forum_driver_ipb_shared::get_tid_from_topic()
forum_driver_ipb_shared::get_topic_count()
forum_driver_ipb_shared::get_top_posters()
forum_driver_ipb_shared::install_specifics()
forum_driver_ipb_shared::ipb_escape()
forum_driver_ipb_shared::ipb_unescape()
forum_driver_ipb_shared::is_banned()
forum_driver_ipb_shared::is_cookie_login_name()
forum_driver_ipb_shared::is_hashed()
forum_driver_ipb_shared::member_group_query()
forum_driver_ipb_shared::member_home_link()
forum_driver_ipb_shared::pin_topic()
forum_driver_ipb_shared::pnamelast_visit()
forum_driver_ipb_shared::pname_email()
forum_driver_ipb_shared::pname_group()
forum_driver_ipb_shared::pname_id()
forum_driver_ipb_shared::post_link()
forum_driver_ipb_shared::probe_ip()
forum_driver_ipb_shared::topic_link()
forum_driver_ipb_shared::unentity_1()
forum_driver_ipb_shared::unentity_2()
forum_driver_ipb_shared::_forum_link()
forum_driver_ipb_shared::_get_member_email_address()
forum_driver_ipb_shared::_get_moderator_groups()
forum_driver_ipb_shared::_get_num_new_forum_posts()
forum_driver_ipb_shared::_get_super_admin_groups()
forum_driver_ipb_shared::_get_usergroup_list()
forum_driver_ipb_shared::_is_staff()
forum_driver_ipb_shared::_is_super_admin()
forum_driver_ipb_shared::_join_link()
forum_driver_ipb_shared::_member_pm_link()
forum_driver_ipb_shared::_member_profile_link()
forum_driver_ipb_shared::_online_link()

Inherited From forum_driver_base

forum_driver_base::disable_staff_filter()
forum_driver_base::forum_link()
forum_driver_base::get_guest_group()
forum_driver_base::get_members_groups()
forum_driver_base::get_member_email_address()
forum_driver_base::get_moderator_groups()
forum_driver_base::get_num_new_forum_posts()
forum_driver_base::get_super_admin_groups()
forum_driver_base::get_theme()
forum_driver_base::get_usergroup_list()
forum_driver_base::get_username()
forum_driver_base::is_staff()
forum_driver_base::is_super_admin()
forum_driver_base::join_link()
forum_driver_base::member_pm_link()
forum_driver_base::member_profile_hyperlink()
forum_driver_base::member_profile_link()
forum_driver_base::online_link()

Documentation generated on Sun, 02 Jan 2011 23:16:27 +0000 by phpDocumentor 1.4.3