forums-procs.tcl

Forums Library

Location:
packages/forums/tcl/forums-procs.tcl
Created:
2002-05-17
Author:
Ben Adida
CVS Identification:
$Id: forums-procs.tcl,v 1.38.2.9 2024/08/06 10:16:11 gustafn Exp $

Procedures in this file

Detailed information

forum::attachments_enabled_p (public)

 forum::attachments_enabled_p [ -forum_id forum_id ]

Check if attachments are enabled in forums. If 'forum_id' is not passed, check only if the attachments package is mounted as a child of the current forums package instance. Otherwise, check also if a particular forum's 'attachments_allowed_p' option is true. In case the package is mounted and the option enabled, return 1.

Switches:
-forum_id (optional)
Returns:
1 if the attachments are enabled in the forums, 0 otherwise.

Partial Call Graph (max 5 caller/called nodes):
%3 test_forum_message_new forum_message_new (test forums) forum::attachments_enabled_p forum::attachments_enabled_p test_forum_message_new->forum::attachments_enabled_p ad_conn ad_conn (public) forum::attachments_enabled_p->ad_conn ad_log ad_log (public) forum::attachments_enabled_p->ad_log forum::get forum::get (public) forum::attachments_enabled_p->forum::get site_node::get_children site_node::get_children (public) forum::attachments_enabled_p->site_node::get_children site_node::get_node_id_from_object_id site_node::get_node_id_from_object_id (public) forum::attachments_enabled_p->site_node::get_node_id_from_object_id forum::message::get forum::message::get (public) forum::message::get->forum::attachments_enabled_p forum::message::get_attachments forum::message::get_attachments (public, deprecated) forum::message::get_attachments->forum::attachments_enabled_p forums::form::forum forums::form::forum (public) forums::form::forum->forum::attachments_enabled_p packages/forums/lib/forums/edit.tcl packages/forums/ lib/forums/edit.tcl packages/forums/lib/forums/edit.tcl->forum::attachments_enabled_p packages/forums/lib/forums/new.tcl packages/forums/ lib/forums/new.tcl packages/forums/lib/forums/new.tcl->forum::attachments_enabled_p

Testcases:
forum_message_new

forum::delete (public)

 forum::delete [ -forum_id forum_id ]

delete a forum

Switches:
-forum_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_web_forum_edit web_forum_edit (test forums) forum::delete forum::delete test_web_forum_edit->forum::delete test_web_forum_new web_forum_new (test forums) test_web_forum_new->forum::delete test_web_forum_view web_forum_view (test forums) test_web_forum_view->forum::delete test_web_forums_message_and_reply web_forums_message_and_reply (test forums) test_web_forums_message_and_reply->forum::delete db_exec_plsql db_exec_plsql (public) forum::delete->db_exec_plsql forum::install::before-uninstantiate forum::install::before-uninstantiate (private) forum::install::before-uninstantiate->forum::delete

Testcases:
web_forum_new, web_forum_view, web_forum_edit, web_forums_message_and_reply

forum::disable (public)

 forum::disable -forum_id forum_id

Disable a forum

Switches:
-forum_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_forum_enable_disable forum_enable_disable (test forums) forum::disable forum::disable test_forum_enable_disable->forum::disable db_dml db_dml (public) forum::disable->db_dml packages/forums/www/admin/forum-disable.tcl packages/forums/ www/admin/forum-disable.tcl packages/forums/www/admin/forum-disable.tcl->forum::disable

Testcases:
forum_enable_disable

forum::edit (public)

 forum::edit -forum_id forum_id [ -name name ] [ -charter charter ] \
    [ -presentation_type presentation_type ] \
    [ -posting_policy posting_policy ] \
    [ -new_questions_allowed_p new_questions_allowed_p ] \
    [ -anonymous_allowed_p anonymous_allowed_p ] \
    [ -attachments_allowed_p attachments_allowed_p ] [ -no_callback ]

Edit a forum

Switches:
-forum_id (required)
-name (optional)
-charter (optional)
-presentation_type (optional)
-posting_policy (optional)
-new_questions_allowed_p (optional)
-anonymous_allowed_p (optional)
-attachments_allowed_p (optional)
-no_callback (optional, boolean)

Partial Call Graph (max 5 caller/called nodes):
%3 test_web_forum_edit web_forum_edit (test forums) forum::edit forum::edit test_web_forum_edit->forum::edit test_web_forums_message_and_reply web_forums_message_and_reply (test forums) test_web_forums_message_and_reply->forum::edit ad_conn ad_conn (public) forum::edit->ad_conn callback callback (public) forum::edit->callback db_dml db_dml (public) forum::edit->db_dml forum::flush_cache forum::flush_cache (public) forum::edit->forum::flush_cache forum::get forum::get (public) forum::edit->forum::get forum::posting_policy_set forum::posting_policy_set (public, deprecated) forum::posting_policy_set->forum::edit packages/forums/lib/forums/edit.tcl packages/forums/ lib/forums/edit.tcl packages/forums/lib/forums/edit.tcl->forum::edit

Testcases:
web_forum_edit, web_forums_message_and_reply

forum::enable (public)

 forum::enable -forum_id forum_id

Enable a forum

Switches:
-forum_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_forum_enable_disable forum_enable_disable (test forums) forum::enable forum::enable test_forum_enable_disable->forum::enable db_dml db_dml (public) forum::enable->db_dml packages/forums/www/admin/forum-enable.tcl packages/forums/ www/admin/forum-enable.tcl packages/forums/www/admin/forum-enable.tcl->forum::enable

Testcases:
forum_enable_disable

forum::flush_cache (public)

 forum::flush_cache -forum_id forum_id

Flushes all the forum caches.

Switches:
-forum_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_forum_count_test forum_count_test (test forums) forum::flush_cache forum::flush_cache test_forum_count_test->forum::flush_cache forum::flush_namespaced_cache forum::flush_namespaced_cache (public) forum::flush_cache->forum::flush_namespaced_cache forum::flush_templating_cache forum::flush_templating_cache (public) forum::flush_cache->forum::flush_templating_cache forum::edit forum::edit (public) forum::edit->forum::flush_cache forum::message::delete forum::message::delete (public) forum::message::delete->forum::flush_cache forum::message::new forum::message::new (public) forum::message::new->forum::flush_cache forum::message::set_state forum::message::set_state (private) forum::message::set_state->forum::flush_cache

Testcases:
forum_count_test

forum::flush_namespaced_cache (public)

 forum::flush_namespaced_cache -forum_id forum_id

Unsets namespaced thread variable holding the forum cache

Switches:
-forum_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_forum_count_test forum_count_test (test forums) forum::flush_namespaced_cache forum::flush_namespaced_cache test_forum_count_test->forum::flush_namespaced_cache forum::flush_cache forum::flush_cache (public) forum::flush_cache->forum::flush_namespaced_cache

Testcases:
forum_count_test

forum::flush_templating_cache (public)

 forum::flush_templating_cache -forum_id forum_id

Flushes forum templating cache, created by template::paginator

Switches:
-forum_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_forum_new forum_new (test forums) forum::flush_templating_cache forum::flush_templating_cache test_forum_new->forum::flush_templating_cache template::cache template::cache (public) forum::flush_templating_cache->template::cache forum::flush_cache forum::flush_cache (public) forum::flush_cache->forum::flush_templating_cache forum::new forum::new (public) forum::new->forum::flush_templating_cache packages/forums/www/moderate/message-approve.tcl packages/forums/ www/moderate/message-approve.tcl packages/forums/www/moderate/message-approve.tcl->forum::flush_templating_cache

Testcases:
forum_new

forum::get (public)

 forum::get -forum_id forum_id -array array

get the fields for a forum

Switches:
-forum_id (required)
-array (required)
Returns:

Partial Call Graph (max 5 caller/called nodes):
%3 test_forum_count_test forum_count_test (test forums) forum::get forum::get test_forum_count_test->forum::get test_web_forum_edit web_forum_edit (test forums) test_web_forum_edit->forum::get test_web_forum_view web_forum_view (test forums) test_web_forum_view->forum::get test_web_forums_message_and_reply web_forums_message_and_reply (test forums) test_web_forums_message_and_reply->forum::get db_0or1row db_0or1row (public) forum::get->db_0or1row callback::search::datasource::impl::forums_message callback::search::datasource::impl::forums_message (private) callback::search::datasource::impl::forums_message->forum::get forum::attachments_enabled_p forum::attachments_enabled_p (public) forum::attachments_enabled_p->forum::get forum::edit forum::edit (public) forum::edit->forum::get forum::new_questions_allowed_p forum::new_questions_allowed_p (public, deprecated) forum::new_questions_allowed_p->forum::get forum::security::can_post_forum_p forum::security::can_post_forum_p (public) forum::security::can_post_forum_p->forum::get

Testcases:
forum_count_test, web_forum_view, web_forum_edit, web_forums_message_and_reply

forum::list_forums (public)

 forum::list_forums -package_id package_id

List all forums in a package

Switches:
-package_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_forum_new forum_new (test forums) forum::list_forums forum::list_forums test_forum_new->forum::list_forums db_list_of_ns_sets db_list_of_ns_sets (public) forum::list_forums->db_list_of_ns_sets

Testcases:
forum_new

forum::new (public)

 forum::new [ -forum_id forum_id ] -name name [ -charter charter ] \
    [ -presentation_type presentation_type ] \
    [ -posting_policy posting_policy ] -package_id package_id \
    [ -new_questions_allowed_p new_questions_allowed_p ] \
    [ -anonymous_allowed_p anonymous_allowed_p ] \
    [ -attachments_allowed_p attachments_allowed_p ] [ -no_callback ]

create a new forum

Switches:
-forum_id (optional)
-name (required)
-charter (optional)
-presentation_type (optional, defaults to "flat")
-posting_policy (optional, defaults to "open")
-package_id (required)
-new_questions_allowed_p (optional, defaults to "t")
-anonymous_allowed_p (optional, defaults to "f")
-attachments_allowed_p (optional, defaults to "t")
-no_callback (optional, boolean)

Partial Call Graph (max 5 caller/called nodes):
%3 test_forum_count_test forum_count_test (test forums) forum::new forum::new test_forum_count_test->forum::new test_forum_enable_disable forum_enable_disable (test forums) test_forum_enable_disable->forum::new test_forum_message_new forum_message_new (test forums) test_forum_message_new->forum::new test_forum_new forum_new (test forums) test_forum_new->forum::new test_web_forum_edit web_forum_edit (test forums) test_web_forum_edit->forum::new callback callback (public) forum::new->callback db_dml db_dml (public) forum::new->db_dml forum::flush_templating_cache forum::flush_templating_cache (public) forum::new->forum::flush_templating_cache package_instantiate_object package_instantiate_object (public) forum::new->package_instantiate_object callback::pm::project_new::impl::forums callback::pm::project_new::impl::forums (private) callback::pm::project_new::impl::forums->forum::new install::xml::action::forum-create install::xml::action::forum-create (private) install::xml::action::forum-create->forum::new packages/forums/lib/forums/new.tcl packages/forums/ lib/forums/new.tcl packages/forums/lib/forums/new.tcl->forum::new

Testcases:
forum_new, forum_message_new, forum_count_test, web_forum_new, web_forum_view, web_forum_edit, web_forums_message_and_reply, forum_enable_disable

forum::new_questions_allow (public, deprecated)

 forum::new_questions_allow -forum_id forum_id [ -party_id party_id ]
Deprecated. Invoking this procedure generates a warning.

Allow the users to create new threads in the forum DEPRECATED: either use forum::edit or inline this trivial query.

Switches:
-forum_id (required)
-party_id (optional)
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log ad_log (public) ad_log_deprecated ad_log_deprecated (public) db_dml db_dml (public) forum::new_questions_allow forum::new_questions_allow forum::new_questions_allow->ad_log forum::new_questions_allow->ad_log_deprecated forum::new_questions_allow->db_dml

Testcases:
No testcase defined.

forum::new_questions_allowed_p (public, deprecated)

 forum::new_questions_allowed_p -forum_id forum_id \
    [ -party_id party_id ]
Deprecated. Invoking this procedure generates a warning.

Check if the users can create new threads in the forum DEPRECATED: the forum::get api already retrieves this information and there is normally no need to invoke this API specifically.

Switches:
-forum_id (required)
-party_id (optional)
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log ad_log (public) ad_log_deprecated ad_log_deprecated (public) forum::get forum::get (public) forum::new_questions_allowed_p forum::new_questions_allowed_p forum::new_questions_allowed_p->ad_log forum::new_questions_allowed_p->ad_log_deprecated forum::new_questions_allowed_p->forum::get

Testcases:
No testcase defined.

forum::new_questions_deny (public, deprecated)

 forum::new_questions_deny -forum_id forum_id [ -party_id party_id ]
Deprecated. Invoking this procedure generates a warning.

Deny the users to create new threads in the forum DEPRECATED: either use forum::edit or inline this trivial query.

Switches:
-forum_id (required)
-party_id (optional)
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log ad_log (public) ad_log_deprecated ad_log_deprecated (public) db_dml db_dml (public) forum::new_questions_deny forum::new_questions_deny forum::new_questions_deny->ad_log forum::new_questions_deny->ad_log_deprecated forum::new_questions_deny->db_dml

Testcases:
No testcase defined.

forum::posting_policy_set (public, deprecated)

 forum::posting_policy_set -posting_policy posting_policy \
    -forum_id forum_id
Deprecated. Invoking this procedure generates a warning.

Set the posting policy. This used to happen by setting permissions on the registered_users group, but was reformed to be just a flag on the forum itself in order to support subsite installation. Please use forum::edit instead.

Switches:
-posting_policy (required)
-forum_id (required)
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log_deprecated ad_log_deprecated (public) forum::edit forum::edit (public) forum::posting_policy_set forum::posting_policy_set forum::posting_policy_set->ad_log_deprecated forum::posting_policy_set->forum::edit

Testcases:
No testcase defined.

forum::use_ReadingInfo_p (public)

 forum::use_ReadingInfo_p [ -package_id package_id ]
Switches:
-package_id (optional)
Returns:
1 if the UseReadingInfo package parameter is true, 0 otherwise.

Partial Call Graph (max 5 caller/called nodes):
%3 test_web_forums_message_and_reply web_forums_message_and_reply (test forums) forum::use_ReadingInfo_p forum::use_ReadingInfo_p test_web_forums_message_and_reply->forum::use_ReadingInfo_p ad_conn ad_conn (public) forum::use_ReadingInfo_p->ad_conn apm_package_ids_from_key apm_package_ids_from_key (public) forum::use_ReadingInfo_p->apm_package_ids_from_key parameter::get parameter::get (public) forum::use_ReadingInfo_p->parameter::get packages/forums/lib/forums/forums-chunk.tcl packages/forums/ lib/forums/forums-chunk.tcl packages/forums/lib/forums/forums-chunk.tcl->forum::use_ReadingInfo_p packages/forums/lib/message/post.tcl packages/forums/ lib/message/post.tcl packages/forums/lib/message/post.tcl->forum::use_ReadingInfo_p packages/forums/lib/message/threads-chunk.tcl packages/forums/ lib/message/threads-chunk.tcl packages/forums/lib/message/threads-chunk.tcl->forum::use_ReadingInfo_p packages/forums/www/message-view.tcl packages/forums/ www/message-view.tcl packages/forums/www/message-view.tcl->forum::use_ReadingInfo_p packages/forums/www/moderate/move-thread.tcl packages/forums/ www/moderate/move-thread.tcl packages/forums/www/moderate/move-thread.tcl->forum::use_ReadingInfo_p

Testcases:
web_forums_message_and_reply

forum::valid_forum_id_p (public)

 forum::valid_forum_id_p -forum_id forum_id [ -package_id package_id ]

checks forum_id

Switches:
-forum_id (required)
-package_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_forum_new forum_new (test forums) forum::valid_forum_id_p forum::valid_forum_id_p test_forum_new->forum::valid_forum_id_p test_web_forums_message_and_reply web_forums_message_and_reply (test forums) test_web_forums_message_and_reply->forum::valid_forum_id_p db_0or1row db_0or1row (public) forum::valid_forum_id_p->db_0or1row

Testcases:
forum_new, web_forums_message_and_reply
[ show source ]