dokeos-forum
[ class tree: dokeos-forum ] [ index: dokeos-forum ] [ all elements ]

Procedural File: forumfunction.inc.php

Source Location: /main/forum/forumfunction.inc.php



Page Details:

These files are a complete rework of the forum. The database structure is

based on phpBB but all the code is rewritten. A lot of new functionalities are added:

          • new view option: nested view
          • quoting a message




          Tags:

          author:  firstname lastname <email>, organisation
          version:  (day) month year
          deprecated:  
          todo:  

          complete the missing phpdoc the correct order should be

          some explanation of the function

          todo:  displaying icons => display library
          todo:  several functions have to be moved to the itemmanager library
          filesource:  Source Code for this file


          Includes:

          require_once(api_get_path(INCLUDE_PATH).'/conf/mail.conf.php') [line 72]
          require_once(api_get_path(INCLUDE_PATH).'/lib/usermanager.lib.php') [line 73]
          require_once(api_get_path(INCLUDE_PATH).'/lib/mail.lib.inc.php') [line 71]
          *************************************************************************

          IMPORTANT NOTICE Please do not change anything is this code yet because there are still some significant code that need to happen and I do not have the time to merge files and test it all over again. So for the moment, please do not touch the code -- Patrick Cool <patrick.cool@UGent.be> *************************************************************************








          approve_post [line 2346]

          void approve_post( $post_id $post_id, $action $action)

          This function approves a post = change



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

          $post_id   $post_id   the id of the post that will be deleted
          $action   $action   make the post visible or invisible
          [ Top ]



          change_lock_status [line 794]

          string, change_lock_status( $content $content, $id $id, $action $action)

          This function changes the lock status in the database



          Tags:

          return:  language variable
          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8
          todo:  move to itemmanager


          Parameters

          $content   $content   what is it that we want to (un)lock: forum category, forum, thread, post
          $id   $id   the id of the content we want to (un)lock
          $action   $action   do we lock (=>locked value in db = 1) or unlock (=> locked value in db = 0)
          [ Top ]



          change_visibility [line 767]

          void change_visibility( $content $content, $id $id, $target_visibility $target_visibility)

          This function changes the visibility in the database (item_property)



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8
          todo:  change the get parameter so that it matches the tool constants.
          todo:  check if api_item_property_update returns true or false => returnmessage depends on it.
          todo:  move to itemmanager


          Parameters

          $content   $content   what is it that we want to make (in)visible: forum category, forum, thread, post
          $id   $id   the id of the content we want to make invisible
          $target_visibility   $target_visibility   what is the current status of the visibility (0 = invisible, 1 = visible)
          [ Top ]



          check_if_last_post_of_thread [line 597]

          an check_if_last_post_of_thread( $thread_id $thread_id)

          This function gets the all information of the last (=most recent) post of the thread This can be done by sorting the posts that have the field thread_id=$thread_id and sort them by post_date



          Tags:

          return:  array if there is a last post found, false if there is no post entry linked to that thread => thread will be deleted
          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

          $thread_id   $thread_id   the id of the thread we want to know the last post of.
          [ Top ]



          class_visible_invisible [line 971]

          string class_visible_invisible( boolean $current_visibility_status)

          This function returns a piece of html code that make the links grey (=invisible for the student)



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

          boolean   $current_visibility_status   0/1: 0 = invisible, 1 = visible
          [ Top ]



          count_number_of_forums_in_category [line 1545]

          int count_number_of_forums_in_category( $cat_id $cat_id)

          This function counts the number of forums inside a given category



          Tags:

          return:  the number of forums inside the given category
          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8
          todo:  an additional parameter that takes the visibility into account. For instance $countinvisible=0 would return the number of visible forums, $countinvisible=1 would return the number of visible and invisible forums


          Parameters

          $cat_id   $cat_id   the id of the forum category
          [ Top ]



          delete_attachment [line 3012]

          void delete_attachment( post $id)

          Delete the all the attachments from the DB and the file according to the post's id



          Tags:

          author:  Julio Montoya Dokeos
          version:  avril 2008, dokeos 1.8.5


          Parameters

          post   $id   id
          [ Top ]



          delete_forum_forumcategory_thread [line 518]

          void delete_forum_forumcategory_thread( $content $content, $id $id)

          This function deletes a forum or a forum category This function currently does not delete the forums inside the category, nor the threads and replies inside these forums.

          For the moment this is the easiest method and it has the advantage that it allows to recover fora that were acidently deleted when the forum category got deleted.




          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8
          todo:  write the code for the cascading deletion of the forums inside a forum category and also the threads and replies inside these forums
          todo:  config setting for recovery or not (see also the documents tool: real delete or not).


          Parameters

          $content   $content   = what we are deleting (a forum or a forum category)
          $id   $id   The id of the forum category that has to be deleted.
          [ Top ]



          delete_post [line 555]

          void delete_post( $post_id $post_id)

          This function deletes a forum post. This separate function is needed because forum posts do not appear in the item_property table (yet) and because deleting a post also has consequence on the posts that have this post as parent_id (they are also deleted).

          an alternative would be to store the posts also in item_property and mark this post as deleted (visibility = 2). We also have to decrease the number of replies in the thread table




          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8
          todo:  write recursive function that deletes all the posts that have this message as parent


          Parameters

          $post_id   $post_id   the id of the post that will be deleted
          [ Top ]



          display_forum_search_results [line 2876]

          void display_forum_search_results( $search_term)

          Display the search results



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
          version:  march 2008, dokeos 1.8.5


          Parameters

             $search_term  
          [ Top ]



          display_lock_unlock_icon [line 666]

          void display_lock_unlock_icon( $content $content, $id $id, $current_visibility_status $current_lock_status, [ $additional_url_parameters = ''])

          This function takes care of the display of the lock icon



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

          $content   $content   what is it that we want to (un)lock: forum category, forum, thread, post
          $id   $id   the id of the content we want to (un)lock
          $current_visibility_status   $current_lock_status   what is the current status of the visibility (0 = invisible, 1 = visible)
             $additional_url_parameters  
          [ Top ]



          display_up_down_icon [line 708]

          void display_up_down_icon( $content $content, $id $id, $list $list)

          This function takes care of the display of the up and down icon



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

          $content   $content   what is it that we want to make (in)visible: forum category, forum, thread, post
          $id   $id   is the id of the item we want to display the icons for
          $list   $list   is an array of all the items. All items in this list should have an up and down icon except for the first (no up icon) and the last (no down icon) The key of this $list array is the id of the item.
          [ Top ]



          display_user_image [line 2131]

          string display_user_image( int $user_id, str $name)

          This function displays the user image from the profile, with a link to the user's details.



          Tags:

          return:  An HTML with the anchor and the image of the user
          author:  Julio Montoya <julio.montoya@dokeos.com>


          Parameters

          int   $user_id   User's database ID
          str   $name   User's name
          [ Top ]



          display_user_link [line 2111]

          void display_user_link( $user_id, $name)

          This function displays the firstname and lastname of the user as a link to the user tool.



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

             $user_id  
             $name  
          [ Top ]



          display_visible_invisible_icon [line 626]

          void display_visible_invisible_icon( $content $content, $id $id, $current_visibility_status $current_visibility_status, [ $additional_url_parameters = ''])

          This function takes care of the display of the visibility icon



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

          $content   $content   what is it that we want to make (in)visible: forum category, forum, thread, post
          $id   $id   the id of the content we want to make invisible
          $current_visibility_status   $current_visibility_status   what is the current status of the visibility (0 = invisible, 1 = visible)
             $additional_url_parameters  
          [ Top ]



          forum_not_allowed_here [line 2199]

          void forum_not_allowed_here( )

          This function is called when the user is not allowed in this forum/thread/...



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          [ Top ]



          forum_search [line 2840]

          void forum_search( )

          Display the search form for the forum and display the search results



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
          version:  march 2008, dokeos 1.8.5


          [ Top ]



          get_attachment [line 2993]

          array get_attachment( the $post_id)

          Show a list with all the attachments according to the post's id



          Tags:

          return:  with the post info
          author:  Julio Montoya Dokeos
          version:  avril 2008, dokeos 1.8.5


          Parameters

          the   $post_id   post's id
          [ Top ]



          get_forumcategory_information [line 1520]

          array get_forumcategory_information( $forum_id $cat_id)

          This function retrieves all the information of a given forumcategory id



          Tags:

          return:  returns
          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

          $forum_id   $cat_id   integer that indicates the forum
          [ Top ]



          get_forums [line 1079]

          an get_forums( [ $id = ''])

          Retrieve all the forums (regardless of their category) or of only one. The forums are sorted according to the forum_order.

          Since it does not take the forum category into account there probably will be two or more forums that have forum_order=1, ...




          Tags:

          return:  array containing all the information about the forums (regardless of their category)
          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8
          todo:  check $sql4 because this one really looks fishy.


          Parameters

             $id  
          [ Top ]



          get_forums_in_category [line 1042]

          an get_forums_in_category( integer $cat_id)

          This function retrieves all the fora in a given forum category



          Tags:

          return:  array containing all the information about the forums (regardless of their category)
          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

          integer   $cat_id   the id of the forum category
          [ Top ]



          get_forums_of_group [line 3041]

          array get_forums_of_group( integer $group_id)

          This function gets all the forum information of the all the forum of the group



          Tags:

          todo:  this is basically the same code as the get_forums function. Consider merging the two.


          Parameters

          integer   $group_id   the id of the group we need the fora of (see forum.forum_of_group)
          [ Top ]



          get_forum_categories [line 989]

          an get_forum_categories( [$id $id = ''])

          Retrieve all the information off the forum categories (or one specific) for the current course.

          The categories are sorted according to their sorting order (cat_order




          Tags:

          return:  array containing all the information about all the forum categories
          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

          $id   $id   default ''. When an id is passed we only find the information about that specific forum category. If no id is passed we get all the forum categories.
          [ Top ]



          get_forum_information [line 1496]

          array get_forum_information( $forum_id $forum_id)

          This function retrieves all the information of a given forum_id



          Tags:

          return:  returns
          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8
          deprecated:  this functionality is now moved to get_forums($forum_id)


          Parameters

          $forum_id   $forum_id   integer that indicates the forum
          [ Top ]



          get_last_post_information [line 1255]

          array get_last_post_information( $forum_id $forum_id, [$show_invisibles $show_invisibles = false])

          This functions gets all the last post information of a certain forum



          Tags:

          return:  containing all the information about the last post (last_post_id, last_poster_id, last_post_date, last_poster_name, last_poster_lastname, last_poster_firstname)
          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

          $forum_id   $forum_id   the id of the forum we want to know the last post information of.
          $show_invisibles   $show_invisibles  
          [ Top ]



          get_notifications [line 3211]

          void get_notifications( string $content, integer $id)

          This function retrieves all the email adresses of the users who wanted to be notified about a new post in a certain forum or thread



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
          version:  May 2008, dokeos 1.8.5
          since:  May 2008, dokeos 1.8.5


          Parameters

          string   $content   does the user want to be notified about a forum or about a thread
          integer   $id   the id of the forum or thread
          [ Top ]



          get_notifications_of_user [line 3319]

          void get_notifications_of_user( [integer $user_id = 0], [boolean $force = false])

          Get all the notification subscriptions of the user = which forums and which threads does the user wants to be informed of when a new post is added to this thread



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
          version:  May 2008, dokeos 1.8.5
          since:  May 2008, dokeos 1.8.5


          Parameters

          integer   $user_id   the user_id of a user (default = 0 => the current user)
          boolean   $force   force get the notification subscriptions (even if the information is already in the session
          [ Top ]



          get_posts [line 1378]

          an get_posts( $thread_id)

          Retrieve all posts of a given thread



          Tags:

          return:  array containing all the information about the posts of a given thread
          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

             $thread_id  
          [ Top ]



          get_post_information [line 1449]

          array get_post_information( $forum_id $post_id)

          This function retrieves all the information of a post



          Tags:

          return:  returns
          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

          $forum_id   $post_id   integer that indicates the forum
          [ Top ]



          get_post_topics_of_forum [line 2270]

          void get_post_topics_of_forum( $forum_id)

          With this function we find the number of posts and topics in a given forum.



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8
          deprecated:  the counting mechanism is now inside the function get_forums
          todo:  consider merging both in one query.
          todo:  consider to call this function only once and let it return an array where the key is the forum id and the value is an array with number_of_topics and number of post as key of this array and the value as a value. This could reduce the number of queries needed (especially when there are more forums)


          Parameters

             $forum_id  
          [ Top ]



          get_threads [line 1312]

          an get_threads( $forum_id)

          Retrieve all the threads of a given forum



          Tags:

          return:  array containing all the information about the threads
          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

             $forum_id  
          [ Top ]



          get_thread_information [line 1470]

          array get_thread_information( $forum_id $thread_id)

          This function retrieves all the information of a thread



          Tags:

          return:  returns
          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

          $forum_id   $thread_id   integer that indicates the forum
          [ Top ]



          get_unaproved_messages [line 2379]

          void get_unaproved_messages( $forum_id $forum_id)

          This function retrieves all the unapproved messages for a given forum This is needed to display the icon that there are unapproved messages in that thread (only the courseadmin can see this)



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

          $forum_id   $forum_id   the forum where we want to know the unapproved messages of
          [ Top ]



          get_whats_new [line 2217]

          void get_whats_new( )

          This function is used to find all the information about what's new in the forum tool



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          [ Top ]



          handle_forum_and_forumcategories [line 86]

          void handle_forum_and_forumcategories( )

          This function handles all the forum and forumcategories actions. This is a wrapper for the forum and forum categories. All this code code could go into the section where this function is called but this make the code there cleaner.



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          [ Top ]



          handle_mail_cue [line 2472]

          void handle_mail_cue( $content, $id)

          This function is called whenever something is made visible because there might be new posts and the user might have indicated that (s)he wanted to be informed about the new posts by mail.



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

             $content  
             $id  
          [ Top ]



          icon [line 1422]

          void icon( $image_url $image_url, [$alt $alt = ''], [$title $title = ''])

          This function return the html syntax for the image



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8
          todo:  this is the same as the Display::xxx function, so it can be removed => all calls have to be changed also


          Parameters

          $image_url   $image_url   The url of the image (absolute or relative)
          $alt   $alt   The alt text (when the images cannot be displayed). http://www.w3.org/TR/html4/struct/objects.html#adef-alt
          $title   $title   The title of the image. Most browsers display this as 'tool tip'. http://www.w3.org/TR/html4/struct/global.html#adef-title
          [ Top ]



          increase_thread_view [line 2161]

          void increase_thread_view( $thread_id)

          The thread view counter gets increased every time someone looks at the thread



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

             $thread_id  
          [ Top ]



          move_post_form [line 2649]

          void move_post_form( )

          This function displays the form for moving a post message to a different (already existing) or a new thread.



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          [ Top ]



          move_thread_form [line 2590]

          void move_thread_form( )

          This function displays the form for moving a thread to a different (already existing) forum



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          [ Top ]



          move_up_down [line 864]

          void move_up_down( $content $content, $direction $direction, $id $id)

          This function moves a forum or a forum category up or down



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8
          todo:  consider removing the table_item_property calls here but this can prevent unwanted side effects when a forum does not have an entry in the item_property table but does have one in the forum table.


          Parameters

          $content   $content   what is it that we want to make (in)visible: forum category, forum, thread, post
          $direction   $direction   do we want to move it up or down.
          $id   $id   the id of the content we want to make invisible
          [ Top ]



          prepare4display [line 2799]

          mixed prepare4display( [mixed $input = ''])

          Prepares a string or an array of strings for display by stripping slashes



          Tags:

          return:  String or array of strings
          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

          mixed   $input   String or array of strings
          [ Top ]



          search_link [line 2965]

          void search_link( )

          Return the link to the forum search page



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
          version:  April 2008, dokeos 1.8.5


          [ Top ]



          send_mail [line 2554]

          void send_mail( [ $user_info = array()], [ $thread_information = array()])

          This function sends the mails for the mail notification



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

             $user_info  
             $thread_information  
          [ Top ]



          send_notifications [line 3254]

          unknown send_notifications( [integer $forum_id = 0], [integer $thread_id = 0], [integer $post_id = 0])

          Get all the users who need to receive a notification of a new post (those subscribed to the forum or the thread)



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
          version:  May 2008, dokeos 1.8.5
          since:  May 2008, dokeos 1.8.5


          Parameters

          integer   $forum_id   the id of the forum
          integer   $thread_id   the id of the thread
          integer   $post_id   the id of the post
          [ Top ]



          send_notification_mails [line 2405]

          void send_notification_mails( $thread_id, $reply_info)

          This function sends the notification mails to everybody who stated that they wanted to be informed when a new post was added to a given thread.



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

             $thread_id  
             $reply_info  
          [ Top ]



          set_notification [line 3155]

          void set_notification( string $content, integer $id, [ $add_only = false])

          This function stores which users have to be notified of which forums or threads



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
          version:  May 2008, dokeos 1.8.5
          since:  May 2008, dokeos 1.8.5


          Parameters

          string   $content   does the user want to be notified about a forum or about a thread
          integer   $id   the id of the forum or thread
             $add_only  
          [ Top ]



          show_add_forumcategory_form [line 145]

          void show_add_forumcategory_form( [ $inputvalues = array()])

          This function displays the form that is used to add a forum category.



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

             $inputvalues  
          [ Top ]



          show_add_forum_form [line 181]

          void show_add_forum_form( [ $inputvalues = array()])

          This function displays the form that is used to add a forum category.



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

             $inputvalues  
          [ Top ]



          show_add_post_form [line 1732]

          void show_add_post_form( [$action $action = ''], [ $id = ''], [ $form_values = ''])

          This function displays the form that is used to add a post. This can be a new thread or a reply.



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

          $action   $action   is the parameter that determines if we are
          1. newthread: adding a new thread (both empty) => No I-frame
          2. replythread: Replying to a thread ($action = replythread) => I-frame with the complete thread (if enabled)
          4. quote: Quoting a message ($action= quotemessage) => I-frame with the complete thread (if enabled). The message will be in the reply. (I first thought not to put an I-frame here)
             $id  
             $form_values  
          [ Top ]



          show_edit_forumcategory_form [line 354]

          void show_edit_forumcategory_form( [ $inputvalues = array()])

          This function displays the form that is used to edit a forum category.

          This is more or less a copy from the show_add_forumcategory_form function with the only difference that is uses some default values. I tried to have both in one function but this gave problems with the handle_forum_and_forumcategories function (storing was done twice)




          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

             $inputvalues  
          [ Top ]



          show_edit_post_form [line 1979]

          void show_edit_post_form( array $current_post, array $current_thread, array $current_forum, [array $form_values = ''])

          This function displays the form that is used to edit a post. This can be a new thread or a reply.



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

          array   $current_post   contains all the information about the current post
          array   $current_thread   contains all the information about the current thread
          array   $current_forum   contains all info about the current forum (to check if attachments are allowed)
          array   $form_values   contains the default values to fill the form
          [ Top ]



          store_edit_post [line 2064]

          void store_edit_post( $values)

          This function stores the edit of a post in the forum_post table.



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

             $values  
          [ Top ]



          store_forum [line 442]

          void store_forum( $values)

          This function stores the forum in the database. The new forum is added to the end.



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

             $values  
          [ Top ]



          store_forumcategory [line 399]

          void store_forumcategory( $values)

          This function stores the forum category in the database. The new category is added to the end.



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

             $values  
          [ Top ]



          store_move_post [line 2698]

          void store_move_post( $values)



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

             $values  
          [ Top ]



          store_move_thread [line 2771]

          void store_move_thread( $values)



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

             $values  
          [ Top ]



          store_reply [line 1843]

          void store_reply( $values)

          This function stores a reply in the forum_post table.

          It also updates the forum_threads table (thread_replies +1 , thread_last_post, thread_date)




          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

             $values  
          [ Top ]



          store_thread [line 1565]

          void store_thread( $values)

          This function stores a new thread. This is done through an entry in the forum_thread table AND in the forum_post table because. The threads are also stored in the item_property table. (forum posts are not (yet))



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

             $values  
          [ Top ]



          update_thread [line 2178]

          void update_thread( $thread_id, $last_post_id, $post_date)

          The relies counter gets increased every time somebody replies to the thread



          Tags:

          author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
          version:  february 2006, dokeos 1.8


          Parameters

             $thread_id  
             $last_post_id  
             $post_date  
          [ Top ]



          Documentation generated on Thu, 12 Jun 2008 13:30:47 -0500 by phpDocumentor 1.4.1