declare begin
Index: openacs-4/packages/forums/tcl/messages-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/messages-procs.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/forums/tcl/messages-procs.tcl 30 May 2002 06:25:52 -0000 1.2
+++ openacs-4/packages/forums/tcl/messages-procs.tcl 3 Jun 2002 05:53:55 -0000 1.3
@@ -32,9 +32,7 @@
oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list {forum_id message_id parent_id subject content html_p user_id}
db_transaction {
- # Instantiate the message
set message_id [package_instantiate_object -extra_vars $extra_vars forums_message]
-
do_notifications -message_id $message_id
}
@@ -47,20 +45,37 @@
# Select all the important information
get -message_id $message_id -array message
- set new_content "$message(forum_name) - $message(root_subject)\n"
- append new_content "$message(user_name) ($message(user_email)) posted on [util_AnsiDatetoPrettyDate $message(posting_date)]:"
- append new_content "\n\n"
+ set forum_id $message(forum_id)
+ set url "[ad_url][db_string select_forums_package_url {}]"
+
+ set new_content ""
+ append new_content "Forum: $message(forum_name)
\n"
+ append new_content "Thread: $message(root_subject)
\n"
+ append new_content "Author: $message(user_name)
\n"
+ append new_content "Posted: $message(posting_date)
"
+ append new_content "\n
\n"
append new_content $message(content)
+ # send text for now.
+ set new_content [ad_html_to_text $new_content]
+
# Do the notification for the forum
notification::new \
- -type_id [notification::type::get_type_id -short_name forums_forum_notif] \
- -object_id $message(forum_id) -response_id $message(message_id) -notif_subject $message(subject) -notif_text $new_content
+ -type_id [notification::type::get_type_id \
+ -short_name forums_forum_notif] \
+ -object_id $message(forum_id) \
+ -response_id $message(message_id) \
+ -notif_subject $message(subject) \
+ -notif_text $new_content
# Eventually we need notification for the root message too
notification::new \
- -type_id [notification::type::get_type_id -short_name forums_message_notif] \
- -object_id $message(root_message_id) -response_id $message(message_id) -notif_subject $message(subject) -notif_text $new_content
+ -type_id [notification::type::get_type_id \
+ -short_name forums_message_notif] \
+ -object_id $message(root_message_id) \
+ -response_id $message(message_id) \
+ -notif_subject $message(subject) \
+ -notif_text $new_content
}
ad_proc -public edit {
Index: openacs-4/packages/forums/www/message-post-confirm.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/message-post-confirm.adp,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/forums/www/message-post-confirm.adp 3 Jun 2002 04:39:05 -0000 1.2
+++ openacs-4/packages/forums/www/message-post-confirm.adp 3 Jun 2002 05:53:55 -0000 1.3
@@ -2,26 +2,27 @@
Confirm Post to Forum: @forum.name@
@context_bar@
-Please confirm the following post:
-
-Subject: @subject@
-Body:
-
-@content@
-
-
-
+Please confirm the following post:
+
+
+
+
Index: openacs-4/packages/forums/www/message-post.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/message-post.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/forums/www/message-post.tcl 3 Jun 2002 04:39:05 -0000 1.5
+++ openacs-4/packages/forums/www/message-post.tcl 3 Jun 2002 05:53:55 -0000 1.6
@@ -76,6 +76,12 @@
set confirm_p 1
set exported_vars [export_form_vars message_id forum_id parent_id subject content html_p confirm_p]
+ set message(subject) $subject
+ set message(content) $content
+ set message(user_id) $user_id
+ set message(user_name) [db_string select_name {select first_names || ' ' || last_name from persons where person_id = :user_id}]
+ set message(posting_date) [db_string select_date {select to_char(sysdate, 'Mon DD YYYY HH24:MI:SS') from dual}]
+
# Let's check if this person is subscribed to the forum
# in case we might want to subscribe them to the thread
if {[empty_string_p $parent_id]} {
@@ -111,7 +117,12 @@
}
if {![empty_string_p $subscribe_p] && $subscribe_p && [empty_string_p $parent_id]} {
- set notification_url [notification::display::subscribe_url -type forums_message_notif -object_id $message_id -url $message_view_url -user_id [ad_conn user_id]]
+ set notification_url [notification::display::subscribe_url \
+ -type forums_message_notif \
+ -object_id $message_id \
+ -url $message_view_url \
+ -user_id [ad_conn user_id] \
+ ]
# redirect to notification stuff
ad_returnredirect $notification_url