Function CMS_Topic->render_posts_from_topic
Definitions
sources/topics.php
- Render posts from a topic (usually tied into AJAX, to get iterative results).
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Return: object
Parameters
Name | Type | Default | Set | Range | Description |
---|---|---|---|---|---|
$topic_id | AUTO_LINK | required parameter | N/A | N/A | The topic ID |
$num_to_show_limit | integer | required parameter | N/A | N/A | Maximum to load |
$allow_comments | boolean | required parameter | N/A | N/A | 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) |
$invisible_if_no_comments | boolean | required parameter | N/A | N/A | Whether the comment box will be invisible if there are not yet any comments (and you're not staff) |
$forum_name | ?string | required parameter | N/A | N/A | The name of the forum to use (null: default comment forum) |
$preloaded_comments | ?mixed | required parameter | N/A | N/A | The raw comment array (null: lookup). This is useful if we want to pass it through a filter |
$reverse | boolean | required parameter | N/A | N/A | Whether to reverse the posts |
$may_reply | boolean | required parameter | N/A | N/A | Whether the current user may reply to the topic (influences what buttons show) |
$highlight_by_member | ?MEMBER | required parameter | N/A | N/A | Member to highlight the posts of (null: none) |
$allow_reviews | boolean | required parameter | N/A | N/A | Whether to allow ratings along with the comment (like reviews) |
$posts | array | required parameter | N/A | N/A | List of post IDs to load |
$parent_id | AUTO_LINK | required parameter | N/A | N/A | Parent node being loaded to |
Return
- The Tempcode for the comment topic
- Type: Tempcode
- Set: N/A
- Range: N/A