Home
The Toolkit for Online Communities
15900 Community Members, 0 members online, 2374 visitors today
Log In Register

acs-messaging-procs.tcl

OpenACS Home : ACS API Browser : ACS Messaging 5.5.1 : acs-messaging-procs.tcl
Publicity:
[Public Only | All]

acs-messaging-procs.tcl

Utility procs for working with messages
Location:
packages/acs-messaging/tcl/acs-messaging-procs.tcl
Created:
2000-09-01
Author:
John Prevost
CVS Identification:
$Id: acs-messaging-procs.tcl,v 1.6.2.1 2009/05/15 13:34:58 emmar Exp $

Procedures in this file

Detailed information

acs_message_p (public)

acs_message_p message_id
Check if an integer is a valid OpenACS message id.

Parameters:
message_id
 

acs_messaging_first_ancestor (public)

acs_messaging_first_ancestor message_id
Takes the message_id of an acs_message and returns the message_id of the first ancestor message (i.e. the message that originated the thread).

Parameters:
message_id
 

acs_messaging_format_as_html (public)

acs_messaging_format_as_html mime_type content
Returns a string of HTML which appropriately renders the content given its mime content-type. This function supports three content types, "text/plain", "text/plain; format=flowed", and "text/html"

Parameters:
mime_type - MIME content-type of content
content - Text to view
 

acs_messaging_process_queue (private)

acs_messaging_process_queue
Process the message queue, sending any reasonable messages.

 

acs_messaging_send (public)

acs_messaging_send -message_id message_id -recipient_id recipient_id \
    [ -grouping_id grouping_id ] [ -wait_until wait_until ]
Schedule one message to be sent to one party.

Switches:
-message_id (required)
-recipient_id (required)
-grouping_id (optional)
-wait_until (optional)
 

acs_messaging_send_query (public)

acs_messaging_send_query -message_id message_id -query query \
    [ -bind bind ]
Given an SQL query returning columns recipient_id, grouping_id, and wait_until, arrange for all to be sent for this message. Example: acs_message_send_query -message_id $new_message -query { select subscriber_id as recipient_id, forum_id as grouping_id, bboard_util.next_period(period) as wait_until from bboard_forum_subscribers where forum_id = :forum_id } -bind [list forum_id $forum_id] Assuming bboard_util.next_period(period) returns the next date at which a digest should be sent, the above will enter info to send all subscriptions for a single message. The bind argument, if given, must be a list, NOT an ns_set.

Switches:
-message_id (required)
-query (required)
-bind (optional)
 

acs_messaging_timezone_offset (private)

acs_messaging_timezone_offset
Returns a best guess of the timezone offset for the machine.

 

ad_page_contract_filter_proc_acs_message_id (public)

ad_page_contract_filter_proc_acs_message_id name value_varname
Checks whether the value (assumed to be an integer) is the id of an already-existing OpenACS message.

Parameters:
name
value_varname