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.24.2.2 -r1.24.2.3
--- openacs-4/packages/forums/tcl/messages-procs.tcl 22 Jun 2004 16:53:43 -0000 1.24.2.2
+++ openacs-4/packages/forums/tcl/messages-procs.tcl 25 Jun 2004 15:34:08 -0000 1.24.2.3
@@ -18,6 +18,7 @@
{-content:required}
{-format "text/plain"}
{-user_id ""}
+ {-posting_date ""}
} {
create a new message
} {
@@ -73,58 +74,73 @@
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 "\n
\n"
- append new_content $message(content)
- append new_content "
-------------------
"
+ set attachments [attachments::get_attachments -object_id $message(message_id)]
+ if {$message(html_p) == "t"} {
+ set message_html $message(content)
+ set message_text [ad_html_text_convert -from html -to text $message(content)]
+ } else {
+ set message_text $message(content)
+ set message_html [ad_html_text_convert -from text -to html $message(content)]
+ }
- # send text for now.
- set new_content [ad_html_to_text -- $new_content]
- set html_version $new_content
+ set html_version ""
+ append html_version "Forum: $message(forum_name)
\n"
+ append html_version "Thread: $message(root_subject)
\n"
+ append html_version "Author: $message(user_name)
\n"
+ append html_version "Posted: $message(posting_date)
"
+ append html_version "\n
\n"
+ append html_version $message_html
+ append html_version "
" - set text_version "" - - append text_version "Forum: $message(forum_name) -Thread: $message(root_subject) -Author: $message(user_name) ($message(user_email))\n\n" + if {[llength $attachments] > 0} { + append html_version "Attachments: +