m_get_moderate_topic
Function
Function Name | Description | Level |
m_get_moderate_topic | Returns a list of topics awaiting moderator approval. This function will only invoked if get_config returns "m_approve = 1" | |
Input Parameters:
Name | Type | Required? | Description | Level |
start_num | Int | | For pagination. If start_num = 0 & last_num = 9, it returns first 10 items, sorted by date (last-in-first-out). If both are not presented, return first 20 items. if start_num = 0 and last_num = 0, return the first item only. If last_num smaller than start_num returns error code "Out-of-range" (see error code column). If last_num - start_num > 50, returns only first 50 items starting from start_num. | |
last_num | Int | | See above. | |
Output Parameters:
Name | Type | Required? | Description | Level |
total_topic_num | Int | | Total number of topics awaiting to be moderated. | |
topics | Array of Hash table | | Returns a list of topic in an array, each topic is in Hash Table format. Returns null if total_topic_num = 0 | |
forum_id | String | yes | | |
forum_name | byte[] | yes | | |
topic_id | String | yes | | |
topic_title | byte[] | yes | Remove all BBCode in title | |
topic_author_id | String | | | |
topic_author_name | byte[] | yes | | |
icon_url | String | | Return topic author avatar URL | |
post_time | Date | yes | dateTime.iso8601 format. If this topic has no reply, use the topic creation time. | |
timestamp | String | yes | Timestamp of topic last post | |
short_content | byte[] | | Characters display rules (should follow this sequence):
1) Remove all BBCode except [ur], [img].
2) Convert "[url http://...]http://…..[/url]" to "[url]".
3) Convert "[img]http://…..[/img]" to "[img]".
4) Remove "Last edited by..." tag at the end.
5) Remove all non-displayable characters (e.g. \n, \t, etc).
6) Remove all whitespace, /n and /r at the beginning and ending of the content.
7) return only first 200 characters | |
moderated_by_id | String | | | |
moderated_by_name | byte[] | | If this topic has already been moderated, return the username of the person who moderated this topic | |
moderated_reason | byte[] | | | |