Go to the source code of this file.
Data Structures | |
| class | topicLister |
| class | postLister |
Namespaces | |
| namespace | CLFRM |
Enumerations | |
| enum | GROUP_FORUMS_CATEGORY |
Functions | |
| get_total_posts ($id, $type= 'all', $course_id=NULL) | |
| is_first_post ($topic_id, $post_id) | |
| error_die ($msg) | |
| sync ($forumId, $topicId=null) | |
| datetime_to_timestamp ($dateTime) | |
| get_forum_settings ($forumId) | |
| get_topic_settings ($topicId) | |
| request_forum_notification ($forumId, $userId) | |
| cancel_forum_notification ($forumId=null, $userId=null) | |
| is_forum_notification_requested ($forumId, $userId) | |
| trig_forum_notification ($forumId) | |
| create_new_topic ($subject, $time, $forumId, $userId, $userFirstname, $userLastname, $course_id=NULL) | |
| get_post_settings ($postId) | |
| create_new_post ($topicId, $forumId, $userId, $time, $posterIp, $userLastname, $userFirstname, $message, $course_id=NULL) | |
| update_post ($post_id, $topic_id, $message, $subject= '') | |
| delete_post ($postId, $topicId, $forumId) | |
| request_topic_notification ($topicId, $userId) | |
| cancel_topic_notification ($topicId=null, $userId=null) | |
| is_topic_notification_requested ($topicId, $userId) | |
| trig_topic_notification ($topicId) | |
| disp_confirmation_message ($message, $forumId=false, $topicId=false) | |
| disp_mini_pager ($url, $offsetParam, $total, $step, $pageMax=3) | |
| disp_forum_toolbar ($pagetype, $forum_id, $cat_id=0, $topic_id=0) | |
| disp_search_box () | |
| disp_forum_breadcrumb ($pagetype, $forum_id, $forum_name, $topic_id=0, $topic_name='') | |
| forum_group_tool_list ($gid, $active=true) | |
| delete_all_post_in_forum ($forumId) | |
| update_category_title ($catId, $catTitle) | |
| update_forum_settings ($forum_id, $forum_name, $forum_desc, $forum_post_allowed, $cat_id) | |
| create_category ($cat_title, $course_id=NULL) | |
| delete_category ($cat_id) | |
| delete_forum ($forum_id) | |
| create_forum ($forum_name, $forum_desc, $forum_post_allowed, $cat_id, $group_id=null, $course_id=NULL) | |
| move_forum_rank ($currForumId, $direction) | |
| move_up_forum ($forum_id) | |
| move_down_forum ($forum_id) | |
| get_category_settings ($cat_id) | |
| move_category_rank ($currCatId, $direction) | |
| move_up_category ($cat_id) | |
| move_down_category ($cat_id) | |
| get_forum_list () | |
| get_category_list () | |
| increase_topic_view_count ($topicId) | |
| delete_group_forums ($groupId) | |
| get_group_forum_list ($groupId) | |
Gets user data from uid
| int | user id |
Definition at line 28 of file forum.lib.php.
| cancel_forum_notification | ( | $ | forumId = null, |
|
| $ | userId = null | |||
| ) |
| int | $userId | |
| int | $forumId (optionnal) |
Definition at line 328 of file forum.lib.php.
| cancel_topic_notification | ( | $ | topicId = null, |
|
| $ | userId = null | |||
| ) |
| int | $userId | |
| int | $topicId (optionnal) |
Definition at line 656 of file forum.lib.php.
| create_category | ( | $ | cat_title, | |
| $ | course_id = NULL | |||
| ) |
create a new forum category
| string | $cat_title | |
| context | course id $course_id |
Definition at line 1349 of file forum.lib.php.
| create_forum | ( | $ | forum_name, | |
| $ | forum_desc, | |||
| $ | forum_post_allowed, | |||
| $ | cat_id, | |||
| $ | group_id = null, |
|||
| $ | course_id = NULL | |||
| ) |
Create a new forum (set of threads)
| string | $forum_name | |
| string | $forum_desc | |
| boolean | $forum_post_allowed | |
| integer | $cat_id | |
| integer | $group_id default null(current) | |
| string | $course_id default null(current) |
Definition at line 1456 of file forum.lib.php.
| create_new_post | ( | $ | topicId, | |
| $ | forumId, | |||
| $ | userId, | |||
| $ | time, | |||
| $ | posterIp, | |||
| $ | userLastname, | |||
| $ | userFirstname, | |||
| $ | message, | |||
| $ | course_id = NULL | |||
| ) |
| @return | integer id of the new post |
Definition at line 503 of file forum.lib.php.
| create_new_topic | ( | $ | subject, | |
| $ | time, | |||
| $ | forumId, | |||
| $ | userId, | |||
| $ | userFirstname, | |||
| $ | userLastname, | |||
| $ | course_id = NULL | |||
| ) |
create a new topic
| string | $subject | |
| string | $time | |
| int | $forumId | |
| int | $userId | |
| string | $userFirstname | |
| string | $userLastname |
Definition at line 436 of file forum.lib.php.
| datetime_to_timestamp | ( | $ | dateTime | ) |
Convert a SQL date or datetime to a unix time stamp
| string | SQL DATETIME or DATE |
Definition at line 209 of file forum.lib.php.
| delete_all_post_in_forum | ( | $ | forumId | ) |
Delete all post and topics from a sepcific forum
| int | $forumId forum id |
Definition at line 1236 of file forum.lib.php.
| delete_category | ( | $ | cat_id | ) |
Delete the given category
| integer | $cat_id |
Definition at line 1378 of file forum.lib.php.
| delete_forum | ( | $ | forum_id | ) |
Definition at line 1424 of file forum.lib.php.
| delete_group_forums | ( | $ | groupId | ) |
Deletes forums for ALL or a given group
| integer | $groupId or ALL If param is 'ALL', all groups forums are returned otherwise the param is use as group id to filter result. |
Definition at line 1766 of file forum.lib.php.
| delete_post | ( | $ | postId, | |
| $ | topicId, | |||
| $ | forumId | |||
| ) |
| int | $postId | |
| int | $topciId | |
| int | $forumId |
Definition at line 603 of file forum.lib.php.
Display formated message with several 'return to ...' possibility
| string | $message | |
| int | $forumId (optional) | |
| int | $topicId (optional) |
Definition at line 758 of file forum.lib.php.
| disp_forum_breadcrumb | ( | $ | pagetype, | |
| $ | forum_id, | |||
| $ | forum_name, | |||
| $ | topic_id = 0, |
|||
| $ | topic_name = '' | |||
| ) |
Definition at line 1116 of file forum.lib.php.
| disp_forum_toolbar | ( | $ | pagetype, | |
| $ | forum_id, | |||
| $ | cat_id = 0, |
|||
| $ | topic_id = 0 | |||
| ) |
| disp_mini_pager | ( | $ | url, | |
| $ | offsetParam, | |||
| $ | total, | |||
| $ | step, | |||
| $ | pageMax = 3 | |||
| ) |
Display a mini pager. At the opposite of the claro_sql_pager, it doesn't depend of SQL, but you have to know before the total count of item.
| string | $url - url to be used | |
| string | $offsetParam - param to introduce to call the pager offset | |
| int | $total - total number of items | |
| int | $step - step between each offset | |
| int | $pageMax (optionnal) - If the number of page exceeds this param the remaining pages are replaced by a '...' except the last one. |
Definition at line 805 of file forum.lib.php.
| disp_search_box | ( | ) |
Definition at line 1094 of file forum.lib.php.
| error_die | ( | $ | msg | ) |
Displays an error message and exits the script. Used in the posting files.
Definition at line 101 of file forum.lib.php.
| forum_group_tool_list | ( | $ | gid, | |
| $ | active = true | |||
| ) |
| @param | boolean $active if set to true, only actvated tool will be considered for display |
Definition at line 1185 of file forum.lib.php.
| get_category_list | ( | ) |
Get the list of not empty categories. The query return category only if there is forums inside
Definition at line 1718 of file forum.lib.php.
| get_category_settings | ( | $ | cat_id | ) |
get setting of a given category
| integer | $cat_id |
Definition at line 1581 of file forum.lib.php.
| get_forum_list | ( | ) |
Return the full list of forum
Definition at line 1692 of file forum.lib.php.
| get_forum_settings | ( | $ | forumId | ) |
Get the forum settings of a forum
| int | $forumId | |
| int | $topicId (optional) |
Definition at line 242 of file forum.lib.php.
| get_group_forum_list | ( | $ | groupId | ) |
Get list of forums linked to ALL or a specific group.
| integer | $groupId or ALL If param is 'ALL', all groups forums are returned otherwise the param is use as group id to filter result. |
Definition at line 1786 of file forum.lib.php.
| get_post_settings | ( | $ | postId | ) |
get the main settings of a post
| int | $postId |
Definition at line 472 of file forum.lib.php.
| get_topic_settings | ( | $ | topicId | ) |
Get topic settings of a topic
| int | $topicId |
Definition at line 272 of file forum.lib.php.
| get_total_posts | ( | $ | id, | |
| $ | type = 'all', |
|||
| $ | course_id = NULL | |||
| ) |
Returns the total number of posts in the whole system, a forum, or a topic Also can return the number of users on the system.
| $id | integer id of the item in the type | |
| $type | string 'users','forum', 'topic', 'all' |
Definition at line 40 of file forum.lib.php.
| increase_topic_view_count | ( | $ | topicId | ) |
Function to increase the counter of view a topic
| integer | $topicId |
Definition at line 1745 of file forum.lib.php.
| is_first_post | ( | $ | topic_id, | |
| $ | post_id | |||
| ) |
Check if this is the first post in a topic. Used in editpost.php
| $topic_id | integer | |
| $post_id | integer |
Definition at line 82 of file forum.lib.php.
| is_forum_notification_requested | ( | $ | forumId, | |
| $ | userId | |||
| ) |
| is_topic_notification_requested | ( | $ | topicId, | |
| $ | userId | |||
| ) |
| move_category_rank | ( | $ | currCatId, | |
| $ | direction | |||
| ) |
Change change rank of a category
| integer | $currCatId id of category | |
| string | $direction (UP|DOWN) |
Definition at line 1604 of file forum.lib.php.
| move_down_category | ( | $ | cat_id | ) |
Decrease the rank of the given category
| integer | $cat_id |
Definition at line 1679 of file forum.lib.php.
| move_down_forum | ( | $ | forum_id | ) |
Move down a forum in his category This function is a helper for move_forum_rank()
| integer | $forum_id id of forum to downrank |
Definition at line 1570 of file forum.lib.php.
| move_forum_rank | ( | $ | currForumId, | |
| $ | direction | |||
| ) |
swap rank of a forum in a category with his neiborgth
| integer | $currForumId | |
| string | $direction (UP|DOWN) |
Definition at line 1493 of file forum.lib.php.
| move_up_category | ( | $ | cat_id | ) |
Increase the rank of the given category
| integer | $cat_id |
Definition at line 1667 of file forum.lib.php.
| move_up_forum | ( | $ | forum_id | ) |
Move up a forum in his category This function is a helper for move_forum_rank()
| integer | $forum_id id of forum to uprank |
Definition at line 1557 of file forum.lib.php.
| request_forum_notification | ( | $ | forumId, | |
| $ | userId | |||
| ) |
| request_topic_notification | ( | $ | topicId, | |
| $ | userId | |||
| ) |
| sync | ( | $ | forumId, | |
| $ | topicId = null | |||
| ) |
Update summary info in forum and topic table
| int | forumId | |
| int | topicId (optionnal) |
Definition at line 121 of file forum.lib.php.
| trig_forum_notification | ( | $ | forumId | ) |
Definition at line 371 of file forum.lib.php.
| trig_topic_notification | ( | $ | topicId | ) |
Definition at line 696 of file forum.lib.php.
| update_category_title | ( | $ | catId, | |
| $ | catTitle | |||
| ) |
Change title of a category
| integer | $catId | |
| string | $catTitle new title |
Definition at line 1298 of file forum.lib.php.
| update_forum_settings | ( | $ | forum_id, | |
| $ | forum_name, | |||
| $ | forum_desc, | |||
| $ | forum_post_allowed, | |||
| $ | cat_id | |||
| ) |
Set properties of a forum
| integer | $forum_id | |
| string | $forum_name | |
| string | $forum_desc | |
| boolean | $forum_post_allowed | |
| integer | $cat_id |
Definition at line 1325 of file forum.lib.php.
| update_post | ( | $ | post_id, | |
| $ | topic_id, | |||
| $ | message, | |||
| $ | subject = '' | |||
| ) |
Definition at line 570 of file forum.lib.php.
1.6.3