• Publicity: Public Only All

messages-procs.tcl

Forums Library - for Messages

Location:
packages/forums/tcl/messages-procs.tcl
Created:
2002-05-20
Author:
Ben Adida
CVS Identification:
$Id: messages-procs.tcl,v 1.59.2.30 2024/08/07 09:54:43 gustafn Exp $

Procedures in this file

Detailed information

forum::message::approve (public)

 forum::message::approve -message_id message_id

Approve a message.

Switches:
-message_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_forum_message_new forum_message_new (test forums) forum::message::approve forum::message::approve test_forum_message_new->forum::message::approve db_transaction db_transaction (public) forum::message::approve->db_transaction forum::message::do_notifications forum::message::do_notifications (public) forum::message::approve->forum::message::do_notifications forum::message::set_state forum::message::set_state (private) forum::message::approve->forum::message::set_state packages/forums/www/moderate/message-approve.tcl packages/forums/ www/moderate/message-approve.tcl packages/forums/www/moderate/message-approve.tcl->forum::message::approve

Testcases:
forum_message_new

forum::message::close (public)

 forum::message::close -message_id message_id

Close a thread.
This is not exactly a cheap operation if the thread is long.

Switches:
-message_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_forum_message_new forum_message_new (test forums) forum::message::close forum::message::close test_forum_message_new->forum::message::close db_dml db_dml (public) forum::message::close->db_dml

Testcases:
forum_message_new

forum::message::delete (public)

 forum::message::delete -message_id message_id [ -no_callback ]

Delete a message and obviously all of its descendents.

Switches:
-message_id (required)
-no_callback (optional, boolean)

Partial Call Graph (max 5 caller/called nodes):
%3 test_forum_count_test forum_count_test (test forums) forum::message::delete forum::message::delete test_forum_count_test->forum::message::delete test_web_forums_message_and_reply web_forums_message_and_reply (test forums) test_web_forums_message_and_reply->forum::message::delete ad_conn ad_conn (public) forum::message::delete->ad_conn callback callback (public) forum::message::delete->callback db_transaction db_transaction (public) forum::message::delete->db_transaction forum::flush_cache forum::flush_cache (public) forum::message::delete->forum::flush_cache forum::message::get forum::message::get (public) forum::message::delete->forum::message::get forum::install::before-uninstantiate forum::install::before-uninstantiate (private) forum::install::before-uninstantiate->forum::message::delete packages/forums/lib/message/delete.tcl packages/forums/ lib/message/delete.tcl packages/forums/lib/message/delete.tcl->forum::message::delete

Testcases:
forum_count_test, web_forums_message_and_reply

forum::message::do_notifications (public)

 forum::message::do_notifications -message_id message_id \
    [ -user_id user_id ]

Perform the notifications.

Switches:
-message_id (required)
-user_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_forum_count_test forum_count_test (test forums) forum::message::do_notifications forum::message::do_notifications test_forum_count_test->forum::message::do_notifications test_forum_message_new forum_message_new (test forums) test_forum_message_new->forum::message::do_notifications ad_url ad_url (public) forum::message::do_notifications->ad_url db_string db_string (public) forum::message::do_notifications->db_string forum::message::get forum::message::get (public) forum::message::do_notifications->forum::message::get forum::message::notify_moderators forum::message::notify_moderators (private) forum::message::do_notifications->forum::message::notify_moderators forum::message::notify_users forum::message::notify_users (private) forum::message::do_notifications->forum::message::notify_users forum::message::approve forum::message::approve (public) forum::message::approve->forum::message::do_notifications forum::message::new forum::message::new (public) forum::message::new->forum::message::do_notifications

Testcases:
forum_message_new, forum_count_test

forum::message::edit (public)

 forum::message::edit -message_id message_id -subject subject \
    -content content -format format [ -no_callback ]

Editing a message. There is no versioning here! This means this function is for admins only!

Switches:
-message_id (required)
-subject (required)
-content (required)
-format (required)
-no_callback (optional, boolean)

Partial Call Graph (max 5 caller/called nodes):
%3 test_web_forums_message_and_reply web_forums_message_and_reply (test forums) forum::message::edit forum::message::edit test_web_forums_message_and_reply->forum::message::edit ad_conn ad_conn (public) forum::message::edit->ad_conn callback callback (public) forum::message::edit->callback db_dml db_dml (public) forum::message::edit->db_dml packages/forums/lib/message/edit.tcl packages/forums/ lib/message/edit.tcl packages/forums/lib/message/edit.tcl->forum::message::edit

Testcases:
web_forums_message_and_reply

forum::message::get (public)

 forum::message::get -message_id message_id -array array

Get the fields for a message.

Switches:
-message_id (required)
-array (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_forum_count_test forum_count_test (test forums) forum::message::get forum::message::get test_forum_count_test->forum::message::get test_forum_message_new forum_message_new (test forums) test_forum_message_new->forum::message::get test_web_forums_message_and_reply web_forums_message_and_reply (test forums) test_web_forums_message_and_reply->forum::message::get acs_user::get acs_user::get (public) forum::message::get->acs_user::get db_0or1row db_0or1row (public) forum::message::get->db_0or1row forum::attachments_enabled_p forum::attachments_enabled_p (public) forum::message::get->forum::attachments_enabled_p lc_time_fmt lc_time_fmt (public) forum::message::get->lc_time_fmt lc_time_system_to_conn lc_time_system_to_conn (public) forum::message::get->lc_time_system_to_conn callback::search::datasource::impl::forums_message callback::search::datasource::impl::forums_message (private) callback::search::datasource::impl::forums_message->forum::message::get forum::message::datasource forum::message::datasource (private, deprecated) forum::message::datasource->forum::message::get forum::message::delete forum::message::delete (public) forum::message::delete->forum::message::get forum::message::do_notifications forum::message::do_notifications (public) forum::message::do_notifications->forum::message::get forum::message::url forum::message::url (private, deprecated) forum::message::url->forum::message::get

Testcases:
forum_message_new, forum_count_test, web_forums_message_and_reply

forum::message::get_attachments (public, deprecated)

 forum::message::get_attachments -message_id message_id
Deprecated. Invoking this procedure generates a warning.

Get the attachments for a message. DEPRECATED: this proc requires a connection context in a forums package instance to work as expected. An alternative could be to retrieve the forum_id from the message instead, but as this proc is not used anywhere and its logics are not difficult to inline, we just deprecate it.

Switches:
-message_id (required)
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log_deprecated ad_log_deprecated (public) attachments::get_attachments attachments::get_attachments (public) forum::attachments_enabled_p forum::attachments_enabled_p (public) forum::message::get_attachments forum::message::get_attachments forum::message::get_attachments->ad_log_deprecated forum::message::get_attachments->attachments::get_attachments forum::message::get_attachments->forum::attachments_enabled_p

Testcases:
No testcase defined.

forum::message::initial_message (public, deprecated)

 forum::message::initial_message [ -forum_id forum_id ] \
    [ -parent parent ] -message message
Deprecated. Invoking this procedure generates a warning.

Create an array with values initialized for a new message. DEPRECATED: this proc is not used in current upstream code, its upvar juggling is questionable and most of the data returned is already provided from the start.

Switches:
-forum_id (optional)
-parent (optional)
-message (required)
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) ad_log_deprecated ad_log_deprecated (public) forum::format::reply_subject forum::format::reply_subject (public) forum::message::initial_message forum::message::initial_message forum::message::initial_message->_ forum::message::initial_message->ad_log_deprecated forum::message::initial_message->forum::format::reply_subject

Testcases:
No testcase defined.

forum::message::new (public)

 forum::message::new -forum_id forum_id [ -message_id message_id ] \
    [ -parent_id parent_id ] -subject subject -content content \
    [ -format format ] [ -user_id user_id ] [ -no_callback ]

Create a new message.

Switches:
-forum_id (required)
-message_id (optional)
-parent_id (optional)
-subject (required)
-content (required)
-format (optional, defaults to "text/plain")
-user_id (optional)
-no_callback (optional, boolean)

Partial Call Graph (max 5 caller/called nodes):
%3 test_forum_count_test forum_count_test (test forums) forum::message::new forum::message::new test_forum_count_test->forum::message::new test_forum_message_new forum_message_new (test forums) test_forum_message_new->forum::message::new test_web_forums_message_and_reply web_forums_message_and_reply (test forums) test_web_forums_message_and_reply->forum::message::new ad_conn ad_conn (public) forum::message::new->ad_conn ad_return_error ad_return_error (public) forum::message::new->ad_return_error ad_script_abort ad_script_abort (public) forum::message::new->ad_script_abort db_abort_transaction db_abort_transaction (public) forum::message::new->db_abort_transaction db_string db_string (public) forum::message::new->db_string forum::notification::process_reply forum::notification::process_reply (private) forum::notification::process_reply->forum::message::new packages/forums/lib/message/post.tcl packages/forums/ lib/message/post.tcl packages/forums/lib/message/post.tcl->forum::message::new

Testcases:
forum_message_new, forum_count_test, web_forums_message_and_reply

forum::message::open (public)

 forum::message::open -message_id message_id

Reopen a thread.
This is not exactly a cheap operation if the thread is long.

Switches:
-message_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_forum_message_new forum_message_new (test forums) forum::message::open forum::message::open test_forum_message_new->forum::message::open db_dml db_dml (public) forum::message::open->db_dml

Testcases:
forum_message_new

forum::message::reject (public)

 forum::message::reject -message_id message_id

Reject a message.

Switches:
-message_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_forum_message_new forum_message_new (test forums) forum::message::reject forum::message::reject test_forum_message_new->forum::message::reject forum::message::set_state forum::message::set_state (private) forum::message::reject->forum::message::set_state packages/forums/www/moderate/message-reject.tcl packages/forums/ www/moderate/message-reject.tcl packages/forums/www/moderate/message-reject.tcl->forum::message::reject

Testcases:
forum_message_new

forum::message::set_format (public)

 forum::message::set_format -message_id message_id -format format

Set whether a message is HTML or not.

Switches:
-message_id (required)
-format (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_forum_message_new forum_message_new (test forums) forum::message::set_format forum::message::set_format test_forum_message_new->forum::message::set_format db_dml db_dml (public) forum::message::set_format->db_dml

Testcases:
forum_message_new

forum::message::subject_sort_filter (public, deprecated)

 forum::message::subject_sort_filter -forum_id forum_id \
    -order_by order_by
Deprecated. Invoking this procedure generates a warning.

Switches:
-forum_id (required)
-order_by (required)
Returns:
A piece of HTML for toggling the sort order of threads (subjects) in a forum. The user can either sort by the first postings in subjects (the creation date of the subjects) or the last one. DEPRECATED: this proc is not mentioned anywhere in current upstream codebase. Furthermore, it refers to a very specific UI (e.g. sorting properties, styling...) and does therefore provide little value in general.
Author:
Peter Marklund
See Also:
  • idioms in the specific UI

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) ad_conn ad_conn (public) ad_log_deprecated ad_log_deprecated (public) export_vars export_vars (public) forum::message::subject_sort_filter forum::message::subject_sort_filter forum::message::subject_sort_filter->_ forum::message::subject_sort_filter->ad_conn forum::message::subject_sort_filter->ad_log_deprecated forum::message::subject_sort_filter->export_vars

Testcases:
No testcase defined.
[ show source ]