init__ocf_posts_action (line 24)
Standard code module initialisation function.
void
init__ocf_posts_action
()
ocf_check_post (line 38)
Check a post would be valid.
?array
ocf_check_post
(LONG_TEXT $post, [?AUTO_LINK $topic_id = NULL], [?MEMBER $poster = NULL])
-
LONG_TEXT
$post: The post.
-
?AUTO_LINK
$topic_id: The ID of the topic the post would be in (NULL: don't check with regard to any particular topic).
-
?MEMBER
$poster: The poster (NULL: current member).
ocf_decache_ocp_blocks (line 379)
Decache cached OCF elements depending on a certain forum, and optionally a certain member.
void
ocf_decache_ocp_blocks
(AUTO_LINK $updated_forum_id, [?string $forum_name = NULL], [?MEMBER $member = NULL])
-
AUTO_LINK
$updated_forum_id: The ID of the forum.
-
?string
$forum_name: The name of the forum (NULL: find it from the DB).
-
?MEMBER
$member: The member (NULL: do no member decacheing).
ocf_force_update_member_post_count (line 342)
Force a members post count to be recalculated.
void
ocf_force_update_member_post_count
(MEMBER $member_id, [?integer $member_post_count_dif = NULL])
-
MEMBER
$member_id: The member.
-
?integer
$member_post_count_dif: The amount to add to the post count (NULL: fully recalculate the post count).
ocf_make_post (line 100)
Add a post.
AUTO_LINK
ocf_make_post
(AUTO_LINK $topic_id, SHORT_TEXT $title, LONG_TEXT $post, [BINARY $skip_sig = 0], [boolean $is_starter = false], [?BINARY $validated = NULL], [BINARY $is_emphasised = 0], [?string $poster_name_if_guest = NULL], [?IP $ip_address = NULL], [?TIME $time = NULL], [?MEMBER $poster = NULL], [?MEMBER $intended_solely_for = NULL], [?TIME $last_edit_time = NULL], [?MEMBER $last_edit_by = NULL], [boolean $check_permissions = true], [boolean $update_cacheing = true], [?AUTO_LINK $forum_id = NULL], [boolean $support_attachments = true], [?string $topic_title = ''], [BINARY $sunk = 0], [?AUTO_LINK $id = NULL], [boolean $anonymous = false], [boolean $skip_post_checks = false], [boolean $is_pt = false])
-
AUTO_LINK
$topic_id: The ID of the topic to add the post to.
-
SHORT_TEXT
$title: The title of the post (may be blank).
-
LONG_TEXT
$post: The post.
-
BINARY
$skip_sig: Whether to skip showing the posters signature in the post.
-
boolean
$is_starter: Whether the post is the first in the topic.
-
?BINARY
$validated: Whether the post is validated (NULL: unknown, find whether it needs to be marked unvalidated initially).
-
BINARY
$is_emphasised: Whether the post is marked emphasised.
-
?string
$poster_name_if_guest: The name of the person making the post (NULL: username of current member).
-
?IP
$ip_address: The IP address the post is to be made under (NULL: IP of current user).
-
?TIME
$time: The time of the post (NULL: now).
-
?MEMBER
$poster: The poster (NULL: current member).
-
?MEMBER
$intended_solely_for: The member that this post is intended solely for (NULL: public).
-
?TIME
$last_edit_time: The last edit time of the post (NULL: never edited).
-
?MEMBER
$last_edit_by: The member that was last to edit the post (NULL: never edited).
-
boolean
$check_permissions: Whether to check permissions for whether the post may be made as it is given.
-
boolean
$update_cacheing: Whether to update the caches after making the post.
-
?AUTO_LINK
$forum_id: The forum the post will be in (NULL: find out from the DB).
-
boolean
$support_attachments: Whether to allow attachments in this post.
-
?string
$topic_title: The title of the topic (NULL: find from the DB).
-
BINARY
$sunk: Whether the topic is a sunk topic.
-
?AUTO_LINK
$id: Force an ID (NULL: don't force an ID)
-
boolean
$anonymous: Whether to make the post anonymous
-
boolean
$skip_post_checks: Whether to skip post checks
-
boolean
$is_pt: Whether this is for a new personal topic