Translations of this page:

Forum Apis usage

Here is the list and the documentations for all the forum APIS.

They will allow developper to build their own modules that will work with the forum. There is 2 ways to use those APIS.

  • You can use them in pl/sql block that will be launch by portal (so the context will be set automatically)
  • You can use them in sql*Plus. If you choose to use this method you need to set the context first

-- As the forum schema
begin
-- Those informations are the same used in the SSO
wwctx_api.set_context('USERNAME','PASSWORD');
forum_api.item_close(p_item_id=>1234);
end;
/

categorie_add

This procedure will create a new category

Parameters
  • p_name : Category name
  • p_css_id : Css_id. Valid values are
    • {*} -1 Default User or Default Css.
    • {*} id Css id to use.
Definition

PROCEDURE categorie_add(p_name VARCHAR2, p_css_id NUMBER);

categorie_drop

This procedure will drop a category

Parameters
  • p_categorie_id : Category id you want to drop
Definition

PROCEDURE categorie_drop(p_categorie_id INTEGER);

categorie_update

This procedure will update an existing category

Parameters
  • p_categorie_id : Category id
  • p_name : Category name
  • p_css_id : Css id. Valid values are
    • {*} -1 Default User or Default Css.
    • {*} id Css id to use.
Definition

PROCEDURE categorie_update(p_categorie_id INTEGER,
                             p_name         VARCHAR2 DEFAULT NULL,
                             p_css_id       INTEGER DEFAULT NULL);

forum_add

This procedure will add a new forum

Parameters
  • p_forum_name : Forum name
  • p_forum_desc : Forum description
  • p_isactive : Is the forum open and active?
    • {*} 1 Yes
    • {*} 0 No
  • p_readonly : Is the forum read only?
    • {*} 1 Yes
    • {*} 0 No
  • p_isstar : Is the posts in this forum count for stars?
    • {*} 1 Yes
    • {*} 0 No
  • p_approuved : Is the forum auto approve?
    • {*} 1 Yes
    • {*} 0 No
  • p_ispublic : Is the forum visible for public user?
    • {*} 1 Yes
    • {*} 0 No
  • p_grouplist : Groups that can access the forum (this should be submited as a list ex: 1,2,3,4…)
  • p_categorie_id : Category Id
  • p_isdefaultvisi : Is the forum visible by default?
    • {*} 1 Yes
    • {*} 0 No
  • p_allowvote : Is the forum allow votes?
    • {*} 1 Yes
    • {*} 0 No
  • p_allowscore : Is the forum allow users to score topics?
    • {*} 1 Yes
    • {*} 0 No
  • p_tri : Default forum sort
    • {*} a.titre to sort by title
    • {*} t.user_nick to sort by author
    • {*} a.nb_post to sort by number of post
    • {*} a.consultations to sort by number of views
    • {*} a.last_post_date to sort by last update
  • p_order : Sort Order
    • {*} ASC for Ascending
    • {*} DESC for Descending
  • p_date : Default range days
    • {*} 1 for today
    • {*} X X must be 5, 7, 10, 15, 20, 25, 30 , 60, 90 days
    • {*} 100 for the post from the beginning
  • p_css_id : Css id
  • p_rss_key : Key to build rss feed.
Definition

PROCEDURE forum_add(p_forum_name    VARCHAR2,
                      p_forum_desc    VARCHAR2,
                      p_isactive      NUMBER,
                      p_readonly      NUMBER,
                      p_isstar        NUMBER,
                      p_approuved     NUMBER,
                      p_ispublic      NUMBER,
                      p_grouplist     VARCHAR2 DEFAULT NULL,
                      p_categorie_id  NUMBER,
                      p_isdefaultvisi NUMBER,
                      p_allowvote     NUMBER,
                      p_allowscore    NUMBER,
                      p_tri           VARCHAR2 DEFAULT NULL,
                      p_order         VARCHAR2 DEFAULT NULL,
                      p_date          NUMBER DEFAULT NULL,
                      p_css_id        NUMBER,
                      p_rss_key       VARCHAR2 DEFAULT NULL);

forum_drop

This procedure will drop a forum

Parameters
  • p_forum_id : Forum id you want to drop
Definition

PROCEDURE forum_drop(p_forum_id NUMBER);

forum_update

This procedure will update a forum

  • p_forum_id : Forum id
  • p_forum_name : Forum name
  • p_forum_desc : Forum description
  • p_isactive : Is the forum open and active?
    • {*} 1 Yes
    • {*} 0 No
  • p_readonly : Is the forum read only?
    • {*} 1 Yes
    • {*} 0 No
  • p_isstar : Is the posts in this forum count for stars?
    • {*} 1 Yes
    • {*} 0 No
  • p_approuved : Is the forum auto approve?
    • {*} 1 Yes
    • {*} 0 No
  • p_ispublic : Is the forum visible for public user?
    • {*} 1 Yes
    • {*} 0 No
  • p_grouplist : Groups that can access the forum (this should be submited as a list ex: 1,2,3,4…)
  • p_categorie_id : Category Id
  • p_isdefaultvisi : Is the forum visible by default?
    • {*} 1 Yes
    • {*} 0 No
  • p_allowvote : Is the forum allow votes?
    • {*} 1 Yes
    • {*} 0 No
  • p_allowscore : Is the forum allow users to score topics?
    • {*} 1 Yes
    • {*} 0 No
  • p_tri : Default forum sort
    • {*} a.titre to sort by title
    • {*} t.user_nick to sort by author
    • {*} a.nb_post to sort by number of post
    • {*} a.consultations to sort by number of views
    • {*} a.last_post_date to sort by last update
  • p_order : Sort Order
    • {*} ASC for Ascending
    • {*} DESC for Descending
  • p_date : Default range days
    • {*} 1 for today
    • {*} X X must be 5, 7, 10, 15, 20, 25, 30 , 60, 90 days
    • {*} 100 for the post from the beginning
  • p_css_id : Css id
  • p_rss_key : Key to build rss feed.
Definition

PROCEDURE forum_update(p_forum_id      NUMBER,
                         p_forum_name    VARCHAR2 DEFAULT NULL,
                         p_forum_desc    VARCHAR2 DEFAULT NULL,
                         p_isactive      NUMBER DEFAULT NULL,
                         p_readonly      NUMBER DEFAULT NULL,
                         p_isstar        NUMBER DEFAULT NULL,
                         p_approuved     NUMBER DEFAULT NULL,
                         p_ispublic      NUMBER DEFAULT NULL,
                         p_grouplist     VARCHAR2 DEFAULT NULL,
                         p_categorie_id  NUMBER DEFAULT NULL,
                         p_isdefaultvisi NUMBER DEFAULT NULL,
                         p_allowvote     NUMBER DEFAULT NULL,
                         p_allowscore    NUMBER DEFAULT NULL,
                         p_tri           VARCHAR2 DEFAULT NULL,
                         p_order         VARCHAR2 DEFAULT NULL,
                         p_date          NUMBER DEFAULT NULL,
                         p_css_id        NUMBER DEFAULT NULL,
                         p_rss_key       VARCHAR2 DEFAULT NULL);

forum_clear

This procedure will clear forums content

Parameters
  • p_forum_id : Forum id to clear
Definition

PROCEDURE forum_clear(p_forum_id INTEGER);

forum_resync

This procedure will resynchronise forum stats

Parameters
  • p_forum_id : Forum_id to resynchronise
Definition

PROCEDURE forum_resync(p_forum_id INTEGER);

item_add

This procedure will add a new message on the forum

Parameters
  • p_forum_id : The forum id that will receive the new message
  • p_parent_id : The parent thread id if this is an answer
  • p_title : The message title
  • p_desc : The message description
  • p_text : The message text
  • p_status : Id of the message status
  • p_closed : To say if the message can be closed or not
    • {*} 1 To close the thread
    • {*} NULL To not close the thread
  • p_reminder : If the user wants to subscribe to this thread
    • {*} 1 To subscribe
    • {*} NULL To not subscribe
  • p_filename : The list of files to add into the forum table. The files should have been placed in the wwdoc_document table
  • p_is_poll : Defined to 1 if the new thread is a vote
  • p_quest : Vote question if p_is_poll equal to 1
  • p_prop : List of possible answers separated by chr(13)||chr(10) charaters.
  • p_vote_day : Number of days the vote will be open
  1. - %return p_item_id : The id of the new message
Definition

PROCEDURE item_add(p_forum_id  INTEGER,
                     p_parent_id INTEGER DEFAULT NULL,
                     p_title     VARCHAR2,
                     p_desc      VARCHAR2 DEFAULT NULL,
                     p_text      CLOB,
                     p_status    INTEGER DEFAULT NULL,
                     p_closed    INTEGER DEFAULT NULL,
                     p_reminder  INTEGER DEFAULT NULL,
                     p_filename  IN owa_text.vc_arr DEFAULT cempty_array,
                     p_is_poll   INTEGER DEFAULT NULL,
                     p_quest     VARCHAR2 DEFAULT NULL,
                     p_prop      VARCHAR2 DEFAULT NULL,
                     p_vote_day  INTEGER DEFAULT NULL,
                     p_item_id   OUT INTEGER);

item_drop

This procedure will drop a message from a forum

Parameters
  • p_item_id : The id of the message to drop
Definition

PROCEDURE item_drop(p_item_id INTEGER);

item_update

This procedure will update a message

Parameters
  • p_item_id : The id of the message to update
  • p_title : The message title
  • p_text : The message text
  • p_filename : The list of files to add into the forum table. The files should have been placed in the wwdoc_document table
  • p_drop_file : List of file ids to remove
  • p_desc : The message description
Definition

PROCEDURE item_update(p_item_id   INTEGER,
                        p_title     VARCHAR2 DEFAULT NULL,
                        p_text      CLOB DEFAULT NULL,
                        p_filename  IN owa_text.vc_arr DEFAULT cempty_array,
                        p_drop_file IN owa_text.vc_arr DEFAULT cempty_array,
                        p_desc      VARCHAR2 DEFAULT NULL);

item_move

This procedure will move a message from a forum to another forum

Parameters
  • p_item_id : The message id to move
  • p_old_forum_id : Source forum id
  • p_new_forum_id : Destination forum id
Definition

PROCEDURE item_move(p_item_id      INTEGER,
                      p_old_forum_id INTEGER,
                      p_new_forum_id INTEGER);

item_approve

This procedure will approve a message

Parameters
  • p_item_id : The message id to approve
Definition

PROCEDURE item_approve(p_item_id INTEGER);

item_close

This procedure will close a thread

Parameters
  • p_item_id : The message id to close
Definition

PROCEDURE item_close(p_item_id INTEGER);

item_open

This procedure will open a thread

Parameters
  • p_item_id : The message id to open
Definition

PROCEDURE item_open(p_item_id INTEGER);

item_pin

This procedure will pin (attach to the top of the forum) a thread

Parameters
  • p_item_id : The message id to pin
Definition

PROCEDURE item_pin(p_item_id INTEGER);

item_unpin

This procedure will unpin a thread

Parameters
  • p_item_id : The message id to unpin
Definition

PROCEDURE item_unpin(p_item_id INTEGER);

item_status

This procedure will give a status to a thread

Parameters
  • p_item_id : The message id
  • p_status_pub : Public status id
    • {*} NULL if we do not want to update the public status
    • {*} -1 if we want to remove the public status
    • {*} value for the status we want to set
  • p_status_pub : Admin status id
    • {*} NULL if we do not want to update the admin status
    • {*} -1 if we want to remove the admin status
    • {*} value for the status we want to set
Definition

PROCEDURE item_status(p_item_id    INTEGER,
                        p_status_pub INTEGER DEFAULT NULL,
                        p_status_adm INTEGER DEFAULT NULL);

start_follow_item

This procedure will follow a thread and get notified when there is a change

Parameters
  • p_item_id : The message id
Definition

PROCEDURE start_follow_item(p_item_id INTEGER);

stop_follow_item

This procedure will stop following a thread

Parameters
  • p_item_id : The message id
Definition

PROCEDURE stop_follow_item(p_item_id INTEGER);

start_follow_forum

This procedure will follow forum activity and get notified when there is a change

Parameters
  • p_forum_id : Forum id
Definition

PROCEDURE start_follow_forum(p_forum_id INTEGER);

stop_follow_forum

This procedure will stop following forum activity

Parameters
  • p_forum_id : Forum id
Definition

PROCEDURE stop_follow_forum(p_forum_id INTEGER);

vote_drop

This procedure will remove a vote from a thread

Parameters
  • p_item_id : The message id
Definition

PROCEDURE vote_drop(p_item_id INTEGER);

vote_clear

This procedure will clean the vote answers (reset the vote)

Parameters
  • p_item_id : The message id
Definition

PROCEDURE vote_clear(p_item_id INTEGER);

vote_update

This procedure will update a vote

Parameters
  • p_item_id : The message id were the vote is attached
  • p_quest : the vote question
  • p_prop_id : The votes answers ids
  • p_prop : The votes answers text
Definition

PROCEDURE vote_update(p_item_id INTEGER,
                        p_quest   VARCHAR2,
                        p_prop_id IN owa_text.vc_arr DEFAULT cempty_array,
                        p_prop    IN owa_text.vc_arr DEFAULT cempty_array);

 
forum/manage_api.txt · Last modified: 2009/08/11 16:34 by helyos
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported