Index: openacs.org-dev/packages/forums/forums.info
===================================================================
RCS file: /usr/local/cvsroot/openacs.org-dev/packages/forums/forums.info,v
diff -u -r1.3 -r1.4
--- openacs.org-dev/packages/forums/forums.info 5 Sep 2002 17:27:43 -0000 1.3
+++ openacs.org-dev/packages/forums/forums.info 17 Apr 2003 14:28:53 -0000 1.4
@@ -47,12 +47,19 @@
\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)
+ ## JCD: new_content not used for now.
+ #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 "\n
\n"
+ #append new_content $message(content)
+ #append new_content "
-------------------
"
+ ## send text for now.
+ ## only convert if it is not already text
+ #set new_content [ad_html_to_text $new_content]
- # send text for now.
- if { $message(html_p) == "t" } {
- set body_text [ad_html_to_text $message(content)]
- } else {
- set body_text [wrap_string $message(content) 72]
- }
+ set new_content ""
+ append new_content "Forum: $message(forum_name)
+Thread: $message(root_subject)
+Author: $message(user_name) <$message(user_email)>
+
+"
+ if { $message(html_p) } {
+ append new_content "[ad_html_to_text $message(content)]"
+ } else {
+ append new_content "[wrap_string $message(content)]"
+ }
+ append new_content "
+
+--
+To post a reply to this email or view this message go to:
+${url}message-view?message_id=$message(root_message_id)"
+
+
# 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_subject "\[$message(forum_name)\] $message(subject)" \
-notif_text $new_content
# Eventually we need notification for the root message too
@@ -82,7 +99,7 @@
-short_name forums_message_notif] \
-object_id $message(root_message_id) \
-response_id $message(message_id) \
- -notif_subject $message(subject) \
+ -notif_subject "\[$message(forum_name)\] $message(subject)" \
-notif_text $new_content
}
@@ -169,6 +186,15 @@
db_foreach get_notifications_for_delete {} {
db_exec_plsql delete_notification {}
}
+
+
+ #delete all rows in notifications table also -DaveB
+ db_foreach get_notifications_for_delete {} {
+ db_exec_plsql delete_notification {}
+ }
+
+
+
# Remove the message
db_exec_plsql delete_message {}
}
Index: openacs.org-dev/packages/forums/www/index-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs.org-dev/packages/forums/www/index-postgresql.xql,v
diff -u -r1.3 -r1.4
--- openacs.org-dev/packages/forums/www/index-postgresql.xql 11 Dec 2002 16:37:18 -0000 1.3
+++ openacs.org-dev/packages/forums/www/index-postgresql.xql 17 Apr 2003 14:31:25 -0000 1.4
@@ -9,7 +9,7 @@
(select count(*)
from forums_messages
where forums_messages.forum_id = forums_forums_enabled.forum_id
- and 1 = tree_level(forums_messages.tree_sortkey)) as n_threads,
+ and parent_id is null) as n_threads,
to_char(last_post, 'Mon DD YYYY HH24:MI:SS') as last_post,
case when last_post > (now() - 1) then 't' else 'f' end as new_p
from forums_forums_enabled