already_rated (line 112)
Find whether you have rated the specified resource before.
boolean
already_rated
(ID_TEXT $rating_for_type, ID_TEXT $id)
-
ID_TEXT
$rating_for_type: The type (download, etc) that this rating is for
-
ID_TEXT
$id: The ID of the type that this rating is for
display_rating (line 573)
Display rating using images
tempcode
display_rating
(ID_TEXT $rating_for_type, ID_TEXT $id, [ID_TEXT $tpl = 'RATING_INLINE'])
-
ID_TEXT
$rating_for_type: The type (download, etc) that this rating is for
-
ID_TEXT
$id: The ID of the type that this rating is for
-
ID_TEXT
$tpl: The template to use to display the rating box
do_comments (line 206)
Add comments to the specified resource.
boolean
do_comments
(boolean $allow_comments, ID_TEXT $module, ID_TEXT $id, mixed $self_url, ?string $self_title, [?string $forum = NULL], [boolean $avoid_captcha = false], [?BINARY $validated = NULL], [boolean $explicit_allow = false], [boolean $no_success_message = false])
-
boolean
$allow_comments: Whether this resource allows comments (if not, this function does nothing - but it's nice to move out this common logic into the shared function)
-
ID_TEXT
$module: The type (download, etc) that this commenting is for
-
ID_TEXT
$id: The ID of the type that this commenting is for
-
mixed
$self_url: The URL to where the commenting will pass back to (to put into the comment topic header) (URLPATH or Tempcode)
-
?string
$self_title: The title to where the commenting will pass back to (to put into the comment topic header) (NULL: don't know, but not first post so not important)
-
?string
$forum: The name of the forum to use (NULL: default comment forum)
-
boolean
$avoid_captcha: Whether to not require a captcha
-
?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 (hence is the last parameter).
-
boolean
$explicit_allow: Whether to force allowance
-
boolean
$no_success_message: Whether to skip a success message
do_rating (line 128)
Actually adds a rating to the specified resource.
It performs full checking of inputs, and will log a hackattack if the rating is not between 1 and 10.
void
do_rating
(boolean $allow_rating, ID_TEXT $rating_for_type, ID_TEXT $id, [?array $extra_ratings = NULL])
-
boolean
$allow_rating: Whether this resource allows rating (if not, this function does nothing - but it's nice to move out this common logic into the shared function)
-
ID_TEXT
$rating_for_type: The type (download, etc) that this rating is for
-
ID_TEXT
$id: The ID of the type that this rating is for
-
?array
$extra_ratings: List of extra rating type steams (e.g. Quality would lookup download_Quality) (NULL: none).
do_trackback (line 502)
Add trackbacks to the specified resource.
boolean
do_trackback
(boolean $allow_trackbacks, ID_TEXT $trackback_for_type, ID_TEXT $id)
-
boolean
$allow_trackbacks: Whether this resource allows trackback (if not, this function does nothing - but it's nice to move out this common logic into the shared function)
-
ID_TEXT
$trackback_for_type: The type (download, etc) that this trackback is for
-
ID_TEXT
$id: The ID of the type that this trackback is for
get_comment_details (line 322)
Get the tempcode containing all the comments posted, and the comments posting form for the specified resource.
tempcode
get_comment_details
(ID_TEXT $type, boolean $allow_comments, ID_TEXT $id, [boolean $invisible_if_no_comments = false], [?string $forum = NULL], [?string $post_warning = NULL], [?mixed $_comments = NULL], [boolean $explicit_allow = false], [boolean $reverse = false], [?MEMBER $highlight_by_user = NULL], [boolean $allow_reviews = false])
-
ID_TEXT
$type: The type (download, etc) that this commenting is for
-
boolean
$allow_comments: Whether this resource allows comments (if not, this function does nothing - but it's nice to move out this common logic into the shared function)
-
ID_TEXT
$id: The ID of the type that this commenting is for
-
boolean
$invisible_if_no_comments: Whether the comment box will be invisible if there are not yet any comments (and you're not staff)
-
?string
$forum: The name of the forum to use (NULL: default comment forum)
-
?string
$post_warning: The default post to use (NULL: standard courtesy warning)
-
?mixed
$_comments: The raw comment array (NULL: lookup). This is useful if we want to pass it through a filter
-
boolean
$explicit_allow: Whether to skip permission checks
-
boolean
$reverse: Whether to reverse the posts
-
?MEMBER
$highlight_by_user: User to highlight the posts of (NULL: none)
-
boolean
$allow_reviews: Whether to allow ratings along with the comment (like reviews)
get_rating_simple_array (line 30)
Get rating information for the specified resource.
?array
get_rating_simple_array
(ID_TEXT $rating_for_type, ID_TEXT $id, [ID_TEXT $tpl = 'RATING_INSIDE'], [?array $extra_ratings = NULL])
-
ID_TEXT
$rating_for_type: The type (download, etc) that this rating is for
-
ID_TEXT
$id: The ID of the type that this rating is for
-
ID_TEXT
$tpl: The template to use to display the rating box
-
?array
$extra_ratings: List of extra rating type steams (e.g. Quality would lookup download_Quality) (NULL: none).
get_rating_text (line 92)
Get tempcode for doing ratings (sits above get_rating_simple_array)
tempcode
get_rating_text
(ID_TEXT $rating_for_type, ID_TEXT $id, boolean $allow_rating, [?array $extra_ratings = NULL])
-
ID_TEXT
$rating_for_type: The type (download, etc) that this rating is for
-
ID_TEXT
$id: The ID of the type that this rating is for
-
boolean
$allow_rating: Whether this resource allows rating (if not, this function does nothing - but it's nice to move out this common logic into the shared function)
-
?array
$extra_ratings: List of extra rating type steams (e.g. Quality would lookup download_Quality) (NULL: none).
get_trackback_details (line 526)
Get the tempcode containing all the trackbacks received, and the trackback posting form for the specified resource.
tempcode
get_trackback_details
(ID_TEXT $trackback_for_type, ID_TEXT $id, boolean $allow_trackback, [ID_TEXT $type = ''])
-
ID_TEXT
$trackback_for_type: The type (download, etc) that this trackback is for
-
ID_TEXT
$id: The ID of the type that this trackback is for
-
boolean
$allow_trackback: Whether this resource allows trackback (if not, this function does nothing - but it's nice to move out this common logic into the shared function)
-
ID_TEXT
$type: The type of details being fetched (currently: blank or XML)
sanitise_topic_description (line 181)
Similar to sanitise_topic_title, but operates on topic descriptions.
string
sanitise_topic_description
(string $description)
-
string
$description: Potentially complex topic description
sanitise_topic_title (line 165)
Topic titles may be encoded for both human readable data, and a special ID code: this will extract just the ID code, or return the whole thing if only an ID code
string
sanitise_topic_title
(string $title)
-
string
$title: Potentially complex topic title