/sources/ocf_forum_driver_helper.php

Description
Functions
not_like_spacer_posts (line 280)

Get a bit of SQL to make sure that a DB field is not like a spacer post in any of the languages.

  • return: The SQL
string not_like_spacer_posts (ID_TEXT $field)
  • ID_TEXT $field: The field name
_helper_apply_emoticons (line 30)

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 _helper_apply_emoticons (object Link $this_ref, [?MEMBER $member = NULL])
  • object Link $this_ref: to the real forum driver
  • ?MEMBER $member: Only emoticons the given member can see (NULL: don't care)
_helper_get_emoticon_chooser (line 361)

Get an emoticon chooser template.

  • return: The emoticon chooser template
tempcode _helper_get_emoticon_chooser (object Link $this_ref, string $field_name)
  • object Link $this_ref: to the real forum driver
  • string $field_name: The ID of the form field the emoticon chooser adds to
_helper_get_forum_topic_posts (line 304)

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 _helper_get_forum_topic_posts (object Link $this_ref, SHORT_TEXT $forum_name, SHORT_TEXT $topic_name, SHORT_TEXT $topic_description, integer &$count, ?integer $max, integer $start)
  • object Link $this_ref: to the real forum driver
  • 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 (NULL: no limit)
  • integer $start: Comment to start at
_helper_make_post_forum_topic (line 85)

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.

  • return: Whether a hidden post has been made
boolean _helper_make_post_forum_topic (object Link $this_ref, SHORT_TEXT $forum_name, SHORT_TEXT $topic_name, MEMBER $member, LONG_TEXT $post, LONG_TEXT $title, tempcode $topic_for, ?TIME $time, ?IP $ip, ?BINARY $validated, ?BINARY $topic_validated, boolean $skip_post_checks, array $extra_info, SHORT_TEXT $poster_name_if_guest)
  • object Link $this_ref: to the real forum driver
  • SHORT_TEXT $forum_name: The forum name
  • SHORT_TEXT $topic_name: The topic name
  • MEMBER $member: The member id
  • LONG_TEXT $post: 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)
  • ?BINARY $validated: Whether the post is validated (NULL: unknown, find whether it needs to be marked unvalidated initially). This only works with the OCF driver.
  • ?BINARY $topic_validated: Whether the topic is validated (NULL: unknown, find whether it needs to be marked unvalidated initially). This only works with the OCF driver.
  • boolean $skip_post_checks: Whether to skip post checks
  • array $extra_info: Array of extra information for the topic ($topic_title,$topic_description,$description_link,$staff_only) (NULL: no extra information)
  • SHORT_TEXT $poster_name_if_guest: The name of the poster
_helper_show_forum_topics (line 205)

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/none)
?array _helper_show_forum_topics (object Link $this_ref, mixed $name, integer $limit, integer $start, integer &$max_rows, SHORT_TEXT $filter_topic_name, SHORT_TEXT $filter_topic_description, boolean $show_first_posts, string $date_key, boolean $hot)
  • object Link $this_ref: to the real forum driver
  • 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
  • SHORT_TEXT $filter_topic_description: The topic description 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

Documentation generated on Sun, 02 Jan 2011 23:19:42 +0000 by phpDocumentor 1.4.3