@context_bar@
+@context_bar@
@title@
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
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/www/message-post-confirm.adp 30 May 2002 06:25:52 -0000 1.1
@@ -0,0 +1,27 @@
+
+Confirm Post to Forum: @forum.name@
+
+
+Please confirm the following post:
+
+Subject: @subject@
+Body:
+
+@content@
+
+
+
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.1 -r1.2
--- openacs-4/packages/forums/www/message-post.tcl 29 May 2002 21:40:10 -0000 1.1
+++ openacs-4/packages/forums/www/message-post.tcl 30 May 2002 06:25:52 -0000 1.2
@@ -38,17 +38,57 @@
element create message html_p \
-label "Format" -datatype text -widget select -options {{text f} {html t}}
+element create message confirm_p \
+ -label "Confirm?" -datatype text -widget hidden
+
+element create message subscribe_p \
+ -label "Subscribe?" -datatype text -widget hidden
+
if {[form is_valid message]} {
- template::form get_values message message_id forum_id parent_id subject content html_p
+ template::form get_values message message_id forum_id parent_id subject content html_p confirm_p subscribe_p
+ if {!$confirm_p} {
+ forum::get -forum_id $forum_id -array forum
+
+ set confirm_p 1
+ set exported_vars [export_form_vars message_id forum_id parent_id subject content html_p confirm_p]
+
+ # 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]} {
+ if {![empty_string_p [notification::request::get_request_id \
+ -type_id [notification::type::get_type_id -short_name forums_forum_notif] \
+ -object_id $forum_id \
+ -user_id [ad_conn user_id]]]} {
+ set forum_notification_p 1
+ } else {
+ set forum_notification_p 0
+ }
+ }
+
+ ad_return_template message-post-confirm
+ return
+ }
+
forum::message::new -forum_id $forum_id \
-message_id $message_id \
-parent_id $parent_id \
-subject $subject \
-content $content \
-html_p $html_p
- ad_returnredirect "message-view?message_id=$message_id"
+ set message_view_url "[ad_conn package_url]message-view?message_id=$message_id"
+
+ if {$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]]
+
+ # redirect to notification stuff
+ ad_returnredirect $notification_url
+ } else {
+ # redirect to viewing the message
+ ad_returnredirect $message_view_url
+ }
+
ad_script_abort
}
@@ -66,5 +106,7 @@
element set_properties message forum_id -value $forum_id
element set_properties message parent_id -value $parent_id
element set_properties message message_id -value $message_id
+element set_properties message confirm_p -value 0
+element set_properties message subscribe_p -value 0
ad_return_template
Index: openacs-4/packages/forums/www/test.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/test.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/forums/www/test.tcl 29 May 2002 21:40:10 -0000 1.1
+++ openacs-4/packages/forums/www/test.tcl 30 May 2002 06:25:52 -0000 1.2
@@ -1,9 +1,2 @@
-db_transaction {
- # create the forum
- set forum_id [forum::new -name "test" -charter "test chrater" -presentation_type "flat" -posting_policy "open" -package_id [ad_conn package_id]]
- set msg_id [forum::message::new -forum_id $forum_id -subject "Test" -content "this is rocking content" -user_id [ad_conn user_id]]
-}
-
-doc_body_append $msg_id
Index: openacs-4/packages/forums/www/user-history.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/user-history.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/forums/www/user-history.adp 29 May 2002 21:40:11 -0000 1.1
+++ openacs-4/packages/forums/www/user-history.adp 30 May 2002 06:25:52 -0000 1.2
@@ -2,6 +2,8 @@
Forums: Posting History for @user.full_name@
@context_bar@
+You are viewing Forums posting information for <%= [acs_community_member_link -user_id $user(user_id)] %>.
+
@dimensional_chunk@
Index: openacs-4/packages/forums/www/admin/forum-new.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/admin/forum-new.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/forums/www/admin/forum-new.tcl 29 May 2002 21:40:11 -0000 1.1
+++ openacs-4/packages/forums/www/admin/forum-new.tcl 30 May 2002 06:25:52 -0000 1.2
@@ -7,6 +7,7 @@
@creation-date 2002-05-25
@cvs-id $id: Exp $
} {
+ {name ""}
}
# scoping
@@ -56,6 +57,7 @@
# Pre-fetch the forum_id
set forum_id [db_nextval acs_object_id_seq]
element set_properties forum forum_id -value $forum_id
+element set_properties forum name -value $name
element set_properties forum new_threads_p -value 1
ad_return_template