Index: openacs-4/packages/forums/forums.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/forums.info,v diff -u -r1.3 -r1.4 --- openacs-4/packages/forums/forums.info 1 Jun 2002 21:43:16 -0000 1.3 +++ openacs-4/packages/forums/forums.info 3 Jun 2002 04:39:05 -0000 1.4 @@ -47,9 +47,9 @@ + - @@ -60,24 +60,30 @@ + + + + + + + - @@ -87,7 +93,6 @@ - Index: openacs-4/packages/forums/tcl/forums-security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/forums-security-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/tcl/forums-security-procs.tcl 29 May 2002 21:40:10 -0000 1.1 +++ openacs-4/packages/forums/tcl/forums-security-procs.tcl 3 Jun 2002 04:39:05 -0000 1.2 @@ -14,105 +14,112 @@ {-user_id ""} {-forum_id:required} } { - # hack - return 1 + return [permission::permission_p -party_id $user_id -object_id $forum_id -privilege forum_read] } ad_proc -public require_read_forum { {-user_id ""} {-forum_id:required} } { - + if {![can_read_forum_p -user_id $user_id -forum_id $forum_id]} { + do_abort + } } ad_proc -public can_read_message_p { {-user_id ""} {-message_id:required} } { - # hack - return 1 + return [permission::permission_p -party_id $user_id -object_id $message_id -privilege forum_read] } ad_proc -public require_read_message { {-user_id ""} {-message_id:required} } { - + if {![can_read_message_p -user_id $user_id -message_id $message_id]} { + do_abort + } } ad_proc -public can_post_forum_p { {-user_id ""} {-forum_id:required} } { - return [permission::permission_p -object_id $forum_id \ - -party_id $user_id \ - -privilege forum_create] + return [permission::permission_p -party_id $user_id -object_id $forum_id -privilege forum_write] } ad_proc -public require_post_forum { {-user_id ""} {-forum_id:required} } { - + if {![can_post_forum_p -user_id $user_id -forum_id $forum_id]} { + do_abort + } } ad_proc -public can_post_message_p { {-user_id ""} {-message_id:required} } { - # hack - return 1 + return [permission::permission_p -party_id $user_id -object_id $message_id -privilege forum_write] } ad_proc -public require_post_message { {-user_id ""} {-message_id:required} } { - + if {![can_post_message_p -user_id $user_id -message_id $message_id]} { + do_abort + } } ad_proc -public can_moderate_forum_p { {-user_id ""} {-forum_id:required} } { - # hack - return 1 + return [permission::permission_p -party_id $user_id -object_id $forum_id -privilege forum_moderate] } ad_proc -public require_moderate_forum { {-user_id ""} {-forum_id:required} } { - + if {![can_moderate_forum_p -user_id $user_id -forum_id $forum_id]} { + do_abort + } } ad_proc -public can_moderate_message_p { {-user_id ""} {-message_id:required} } { - # hack - return 1 + return [permission::permission_p -party_id $user_id -object_id $message_id -privilege forum_moderate] } ad_proc -public require_moderate_message { {-user_id ""} {-message_id:required} } { - + if {![can_moderate_message_p -user_id $user_id -message_id $message_id]} { + do_abort + } } ad_proc -public can_admin_forum_p { {-user_id ""} {-forum_id:required} } { - # hack - return 1 + return [permission::permission_p -party_id $user_id -object_id $forum_id -privilege forum_moderate] } ad_proc -public require_admin_forum { {-user_id ""} {-forum_id:required} } { - + if {![can_admin_forum_p -user_id $user_id -forum_id $forum_id]} { + do_abort + } } + } Index: openacs-4/packages/forums/tcl/messages-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/Attic/messages-procs-oracle.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/forums/tcl/messages-procs-oracle.xql 1 Jun 2002 19:34:39 -0000 1.2 +++ openacs-4/packages/forums/tcl/messages-procs-oracle.xql 3 Jun 2002 04:39:05 -0000 1.3 @@ -1,43 +1,54 @@ + - oracle8.1.6 + oracle8.1.6 - - -select message_id, forum_id, subject, content, person.name(user_id) as user_name, -party.email(user_id) as user_email, user_id, -forums_forum.name(forum_id) as forum_name, -forums_message.root_message_id(forums_messages.message_id) as root_message_id, -(select subject from forums_messages fm2 -where message_id= forums_message.root_message_id(forums_messages.message_id)) as root_subject, -posting_date, tree_sortkey, parent_id, state, html_p -from forums_messages -where message_id= :message_id - - + + + select message_id, + forum_id, + subject, + content, + person.name(user_id) as user_name, + party.email(user_id) as user_email, + user_id, + forums_forum.name(forum_id) as forum_name, + forums_message.root_message_id(forums_messages.message_id) as root_message_id, + (select subject + from forums_messages fm2 + where message_id = forums_message.root_message_id(forums_messages.message_id)) as root_subject, + to_char(posting_date, 'Mon DD YYYY HH24:MI:SS') as posting_date, + tree_sortkey, + parent_id, + state, + html_p + from forums_messages + where message_id= :message_id + + - - -declare begin - forums_message.delete_thread(:message_id); -end; - - + + + declare begin + forums_message.delete_thread(:message_id); + end; + + - - -declare begin -forums_message.thread_close(:message_id); -end; - - + + + declare begin + forums_message.thread_close(:message_id); + end; + + - - -declare begin -forums_message.thread_open(:message_id); -end; - - + + + declare begin + forums_message.thread_open(:message_id); + end; + + Index: openacs-4/packages/forums/tcl/messages-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/Attic/messages-procs-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/forums/tcl/messages-procs-postgresql.xql 3 Jun 2002 04:39:05 -0000 1.1 @@ -0,0 +1,54 @@ + + + + postgresql7.1 + + + + select message_id, + forum_id, + subject, + content, + person__name(user_id) as user_name, + party__email(user_id) as user_email, + user_id, + forums_forum__name(forum_id) as forum_name, + forums_message__root_message_id(forums_messages.message_id) as root_message_id, + (select subject + from forums_messages fm2 + where message_id = forums_message__root_message_id(forums_messages.message_id)) as root_subject, + to_char(posting_date, 'Mon DD YYYY HH24:MI:SS') as posting_date, + tree_sortkey, + parent_id, + state, + html_p + from forums_messages + where message_id= :message_id + + + + + + declare begin + forums_message__delete_thread(:message_id); + end; + + + + + + declare begin + forums_message__thread_close(:message_id); + end; + + + + + + declare begin + forums_message__thread_open(:message_id); + end; + + + + Index: openacs-4/packages/forums/www/forum-view-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/forum-view-oracle.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/www/forum-view-oracle.xql 29 May 2002 21:40:11 -0000 1.1 +++ openacs-4/packages/forums/www/forum-view-oracle.xql 3 Jun 2002 04:39:05 -0000 1.2 @@ -1,24 +1,47 @@ + oracle8.1.6 - - - select message_id, subject, user_id, person.name(user_id) as user_name, posting_date, state - from forums_messages_approved - where forum_id = :forum_id - and parent_id is NULL - order by posting_date desc - - + + + select fm.message_id, + fm.subject, + fm.user_id, + person.name(fm.user_id) as user_name, + fm.posting_date, + fm.state, + (select count(*) + from forums_messages_approved fm1 + where fm1.tree_sortkey between tree.left(fm.tree_sortkey) and tree.right(fm.tree_sortkey)) as n_messages, + to_char(acs_objects.last_modified, 'Mon DD YYYY HH24:MI:SS') as last_modified + from forums_messages_approved fm, + acs_objects + where fm.forum_id = :forum_id + and fm.parent_id is null + and fm.message_id = acs_objects.object_id + order by fm.posting_date desc + + - - - select message_id, subject, user_id, person.name(user_id) as user_name, posting_date, state - from forums_messages - where forum_id = :forum_id - and parent_id is NULL - order by posting_date desc - - + + + select fm.message_id, + fm.subject, + fm.user_id, + person.name(fm.user_id) as user_name, + fm.posting_date, + fm.state, + (select count(*) + from forums_messages fm1 + where fm1.tree_sortkey between tree.left(fm.tree_sortkey) and tree.right(fm.tree_sortkey)) as n_messages, + to_char(acs_objects.last_modified, 'Mon DD YYYY HH24:MI:SS') as last_modified + from forums_messages fm, + acs_objects + where fm.forum_id = :forum_id + and fm.parent_id is null + and fm.message_id = acs_objects.object_id + order by fm.posting_date desc + + Index: openacs-4/packages/forums/www/forum-view-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/forum-view-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/forums/www/forum-view-postgresql.xql 3 Jun 2002 04:39:05 -0000 1.1 @@ -0,0 +1,47 @@ + + + postgresql7.1 + + + + select fm.message_id, + fm.subject, + fm.user_id, + person__name(fm.user_id) as user_name, + fm.posting_date, + fm.state, + (select count(fm1.*) + from forums_messages_approved fm1 + where fm1.tree_sortkey between tree__left(fm.tree_sortkey) and tree__right(fm.tree_sortkey)) as n_messages, + to_char(acs_objects.last_modified, 'Mon DD YYYY HH24:MI:SS') as last_modified + from forums_messages_approved fm, + acs_objects + where fm.forum_id = :forum_id + and fm.parent_id is null + and fm.message_id = acs_objects.object_id + order by fm.posting_date desc + + + + + + select fm.message_id, + fm.subject, + fm.user_id, + person__name(fm.user_id) as user_name, + fm.posting_date, + fm.state, + (select count(fm1.*) + from forums_messages fm1 + where fm1.tree_sortkey between tree__left(fm.tree_sortkey) and tree__right(fm.tree_sortkey)) as n_messages, + to_char(acs_objects.last_modified, 'Mon DD YYYY HH24:MI:SS') as last_modified + from forums_messages fm, + acs_objects + where fm.forum_id = :forum_id + and fm.parent_id is null + and fm.message_id = acs_objects.object_id + order by fm.posting_date desc + + + + Index: openacs-4/packages/forums/www/forum-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/forum-view.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/www/forum-view.adp 29 May 2002 21:40:11 -0000 1.1 +++ openacs-4/packages/forums/www/forum-view.adp 3 Jun 2002 04:39:05 -0000 1.2 @@ -2,20 +2,76 @@ Forum: @forum.name@ @context_bar@ - -[Administer this Forum]   +
+ + + + + + + + + + + + + +
+ [ - -[Manage/Moderate this Forum] + + + Administer] | -

-@notification_chunk@ -

+ + Manage/Moderate + -
+ @notification_chunk@ +

+ + [ Post a New Message ] + +
+ +
+ + + + + + + + + + -
  • (@messages.state@)   @messages.subject@, by @messages.user_name@ on <%= [util_AnsiDatetoPrettyDate $messages(posting_date)] %> + + +
  • + + + + + + + + + + + - + +
    SubjectRepliesAuthorLast Post
    + @messages.subject@ + + (@messages.state@) + + @messages.n_messages@@messages.user_name@@messages.last_modified@
    + +
    Index: openacs-4/packages/forums/www/forum-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/forum-view.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/www/forum-view.tcl 29 May 2002 21:40:10 -0000 1.1 +++ openacs-4/packages/forums/www/forum-view.tcl 3 Jun 2002 04:39:05 -0000 1.2 @@ -1,38 +1,49 @@ - ad_page_contract { - One Forum View + one forum view - @author Ben Adida (ben@openforce) + @author Ben Adida (ben@openforce.net) @creation-date 2002-05-24 - @cvs-id $Id$ -} { + @version $Id$ + +} -query { forum_id:integer,notnull } -# Security Check forum::security::require_read_forum -forum_id $forum_id set package_id [ad_conn package_id] - set user_id [ad_verify_and_get_user_id] set admin_p [forum::security::can_admin_forum_p -forum_id $forum_id] -set moderate_p [forum::security::can_moderate_forum_p -forum_id $forum_id] +if {!${admin_p}} { + set moderate_p [forum::security::can_moderate_forum_p -forum_id $forum_id] + if {!${moderate_p}} { + set post_p [forum::security::can_post_forum_p -forum_id $forum_id] + } else { + set post_p 1 + } +} else { + set moderate_p 1 + set post_p 1 +} + # Get forum data forum::get -forum_id $forum_id -array forum -if {!$moderate_p} { - # Normal select - db_multirow messages messages_select {} -} else { - # Moderator select! - db_multirow messages messages_select_moderator {} +set query messages_select +if {$moderate_p} { + set query messages_select_moderator } -set post_p [forum::security::can_post_forum_p -forum_id $forum_id] +db_multirow messages $query {} -set notification_chunk [notification::display::request_widget -type forums_forum_notif -object_id $forum_id -pretty_name $forum(name) -url [ad_conn url]?forum_id=$forum_id] +set notification_chunk [notification::display::request_widget \ + -type forums_forum_notif \ + -object_id $forum_id \ + -pretty_name $forum(name) \ + -url [ad_conn url]?forum_id=$forum_id \ +] set context_bar [list $forum(name)] Index: openacs-4/packages/forums/www/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/index-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/forums/www/index-oracle.xql 3 Jun 2002 04:39:05 -0000 1.1 @@ -0,0 +1,27 @@ + + + + oracle8.1.6 + + + + select forums_forums_enabled.*, + (select count(*) + from forums_messages + where forums_messages.forum_id = forums_forums_enabled.forum_id + and 1 = tree.tree_level(forums_messages.tree_sortkey)) as n_threads, + to_char(acs_objects.last_modified, 'Mon DD YYYY HH24:MI:SS') as last_modified + from forums_forums_enabled, + acs_objects + where forums_forums_enabled.package_id = :package_id + and ( + forums_forums_enabled.posting_policy = 'open' + or forums_forums_enabled.posting_policy = 'moderated' + or 't' = acs_permission.permission_p(:user_id, forums_forums_enabled.forum_id, 'forum_read') + ) + and forums_forums_enabled.forum_id = acs_objects.object_id + order by forums_forums_enabled.name + + + + Index: openacs-4/packages/forums/www/index-postresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/index-postresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/forums/www/index-postresql.xql 3 Jun 2002 04:39:05 -0000 1.1 @@ -0,0 +1,27 @@ + + + + postgresql7.1 + + + + select forums_forums_enabled.*, + (select count(*) + from forums_messages + where forums_messages.forum_id = forums_forums_enabled.forum_id + and 1 = tree__tree_level(forums_messages.tree_sortkey)) as n_threads, + to_char(acs_objects.last_modified, 'Mon DD YYYY HH24:MI:SS') as last_modified + from forums_forums_enabled, + acs_objects + where forums_forums_enabled.package_id = :package_id + and ( + forums_forums_enabled.posting_policy = 'open' + or forums_forums_enabled.posting_policy = 'moderated' + or 't' = acs_permission__permission_p(:user_id, forums_forums_enabled.forum_id, 'forum_read') + ) + and forums_forums_enabled.forum_id = acs_objects.object_id + order by forums_forums_enabled.name + + + + Index: openacs-4/packages/forums/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/index.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/www/index.adp 29 May 2002 21:40:10 -0000 1.1 +++ openacs-4/packages/forums/www/index.adp 3 Jun 2002 04:39:05 -0000 1.2 @@ -2,11 +2,50 @@ Forums @context_bar@ -
      - -
    • Create New Forum

      +

      + + + + + + + + +
      + [ New Forum ] +
      + +
      + + + + + + + + + -
    • @forums.name@ + + +
    • + + + + + + + + + + + - + +
      Forum NameThreadsLast Post
      + @forums.name@
      + @forums.charter@ +
      @forums.n_threads@@forums.last_modified@
      + +
      Index: openacs-4/packages/forums/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/index.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/www/index.tcl 29 May 2002 21:40:10 -0000 1.1 +++ openacs-4/packages/forums/www/index.tcl 3 Jun 2002 04:39:05 -0000 1.2 @@ -1,29 +1,19 @@ - ad_page_contract { - List of Forums + top level list of forums - @author Ben Adida (ben@openforce) + @author Ben Adida (ben@openforce.net) @creation-date 2002-05-24 - @cvs-id $Id$ -} { + @version $Id$ + } set package_id [ad_conn package_id] - set user_id [ad_verify_and_get_user_id] -set admin_p [ad_permission_p $package_id admin] +set admin_p [permission::permission_p -party_id $user_id -object_id $package_id -privilege admin] -db_multirow forums forums_select { - select forum_id, name, posting_policy - from forums_forums_enabled - where package_id = :package_id - and - (posting_policy= 'open' or posting_policy= 'moderated' or - acs_permission.permission_p(:user_id, forum_id, 'forum_read') ='t') - order by name -} +db_multirow forums select_forums {} -set context_bar "" +set context_bar {} ad_return_template Index: openacs-4/packages/forums/www/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/master.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/forums/www/master.adp 30 May 2002 06:25:52 -0000 1.2 +++ openacs-4/packages/forums/www/master.adp 3 Jun 2002 04:39:05 -0000 1.3 @@ -1,7 +1,10 @@ @title@ -@context_bar@ +

      @title@

      + +@context_bar@ +
      -

      + Index: openacs-4/packages/forums/www/master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/master.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/forums/www/master.tcl 1 Jun 2002 19:33:42 -0000 1.2 +++ openacs-4/packages/forums/www/master.tcl 3 Jun 2002 04:39:05 -0000 1.3 @@ -1,6 +1 @@ - -if {[info exists context_bar]} { - set context_bar [eval ad_context_bar $context_bar] -} else { - set context_bar "FOO" -} +set context_bar [eval ad_context_bar $context_bar] Index: openacs-4/packages/forums/www/message-chunk.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/message-chunk.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/forums/www/message-chunk.adp 3 Jun 2002 04:39:05 -0000 1.1 @@ -0,0 +1,22 @@ + + @message.subject@ + @message.user_name@ + @message.posting_date@ + + + [ + reply + | email + + | edit + | delete + | approve + | reject + + ] + + + + +

      @message.content@
      + Index: openacs-4/packages/forums/www/message-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/message-chunk.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/forums/www/message-chunk.tcl 3 Jun 2002 04:39:05 -0000 1.1 @@ -0,0 +1,15 @@ +ad_page_contract { + + a message chunk to be included in a table listing of messages + + @author yon (yon@openforce.net) + @creation-date 2002-06-02 + @version $Id: message-chunk.tcl,v 1.1 2002/06/03 04:39:05 yon Exp $ + +} + +if {![array exists message]} { + ad_return_complaint 1 "Need to provide a message to display." +} +if {![exists_and_not_null bgcolor]} { set bgcolor "#ffffff" } +if {![exists_and_not_null moderate_p]} { set moderate_p 0 } Index: openacs-4/packages/forums/www/message-email.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/message-email.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/www/message-email.adp 29 May 2002 21:40:11 -0000 1.1 +++ openacs-4/packages/forums/www/message-email.adp 3 Jun 2002 04:39:05 -0000 1.2 @@ -1,13 +1,9 @@ Email Message: @message.forum_name@ - @message.subject@ - +@context_bar@ -You're emailing a copy of a posting to a friend.

      -Subject of Posting: @message.subject@
      -Body of Posting:
      -

      -@message.content@ -
      -

      +

      Email a copy of the following message:

      + + Index: openacs-4/packages/forums/www/message-email.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/message-email.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/www/message-email.tcl 29 May 2002 21:40:11 -0000 1.1 +++ openacs-4/packages/forums/www/message-email.tcl 3 Jun 2002 04:39:05 -0000 1.2 @@ -1,28 +1,41 @@ - ad_page_contract { Forward a message to a friend @author Ben Adida (ben@openforce) @creation-date 2002-05-28 - @cvs-id $id: Exp $ + @version $Id$ + } { message_id:integer,notnull } +forum::security::require_read_message -message_id $message_id + form create message element create message message_id \ - -label "Message ID" -datatype integer -widget hidden + -label "Message ID" \ + -datatype integer \ + -widget hidden element create message to_email \ - -label "Email" -datatype text -widget text -html {size 60} + -label Email \ + -datatype text \ + -widget text \ + -html {size 60} element create message subject \ - -label "Subject" -datatype text -widget text -html {size 80} + -label Subject \ + -datatype text \ + -widget text \ + -html {size 80} element create message pre_body \ - -label "Your Note" -datatype text -widget textarea -html {cols 80 rows 10 wrap hard} + -label "Your Note" \ + -datatype text \ + -widget textarea \ + -html {cols 80 rows 10 wrap hard} if {[form is_valid message]} { @@ -33,15 +46,14 @@ set new_body "$pre_body" append new_body "\n\n===================================\n\n" - append new_body "$message(user_name) wrote, on [util_AnsiDatetoPrettyDate $message(posting_date)]:\n" - append new_body "Subject: $message(subject)\n\n" + append new_body "On $message(posting_date), $message(user_name) wrote:\n\n" append new_body "$message(content)\n" # Send the email acs_mail_lite::send -to_addr $to_email \ - -from_addr [cc_email_from_party [ad_conn user_id]] \ - -subject $subject \ - -body $new_body + -from_addr [cc_email_from_party [ad_conn user_id]] \ + -subject $subject \ + -body $new_body ad_returnredirect "message-view?message_id=$message_id" ad_script_abort @@ -50,7 +62,14 @@ # Get the message information forum::message::get -message_id $message_id -array message -element set_properties message subject -value "\[Fwd from $message(user_name): $message(subject)\]" +element set_properties message subject -value "\[Fwd: $message(subject)\]" element set_properties message message_id -value $message_id +set context_bar [list [list "./forum-view?forum_id=$message(forum_id)" "$message(forum_name)"]] +if {![empty_string_p $message(parent_id)]} { + lappend context_bar [list "./message-view?message_id=$message(root_message_id)" "Entire Thread"] +} +lappend context_bar [list "./message-view?message_id=$message(message_id)" "$message(subject)"] +lappend context_bar {Email to a friend} + ad_return_template 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.1 -r1.2 --- openacs-4/packages/forums/www/message-post-confirm.adp 30 May 2002 06:25:52 -0000 1.1 +++ openacs-4/packages/forums/www/message-post-confirm.adp 3 Jun 2002 04:39:05 -0000 1.2 @@ -1,6 +1,6 @@ Confirm Post to Forum: @forum.name@ - +@context_bar@ Please confirm the following post:

      Index: openacs-4/packages/forums/www/message-post.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/message-post.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/www/message-post.adp 29 May 2002 21:40:10 -0000 1.1 +++ openacs-4/packages/forums/www/message-post.adp 3 Jun 2002 04:39:05 -0000 1.2 @@ -1,5 +1,10 @@ Post to Forum: @forum.name@ - +@context_bar@ + + +
      +
      + 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.4 -r1.5 --- openacs-4/packages/forums/www/message-post.tcl 1 Jun 2002 19:34:33 -0000 1.4 +++ openacs-4/packages/forums/www/message-post.tcl 3 Jun 2002 04:39:05 -0000 1.5 @@ -1,52 +1,74 @@ - ad_page_contract { Form to create message and insert it - @author Ben Adida (ben@openforce) + @author Ben Adida (ben@openforce.net) @creation-date 2002-05-25 - @cvs-id $id: Exp $ -} { + @version $Id$ + +} -query { {forum_id ""} {parent_id ""} +} -validate { + forum_id_or_parent_id { + if {[empty_string_p $forum_id] && [empty_string_p $parent_id]} { + ad_complain "You either have to post to a forum or in reply to another message" + } + } } -# Either forum_id or parent_id has to be non-null -if {[empty_string_p $forum_id] && [empty_string_p $parent_id]} { - ns_log Notice "BMA: both are null!" - # error! - return -code error -} +set user_id [ad_verify_and_get_user_id] -# We would use the nice ad_form construct if we could form create message element create message message_id \ - -label "Message ID" -datatype integer -widget hidden + -label "Message ID" \ + -datatype integer \ + -widget hidden element create message subject \ - -label "Subject" -datatype text -widget text -html {size 60} + -label Subject \ + -datatype text \ + -widget text \ + -html {size 60} element create message content \ - -label "Body" -datatype text -widget textarea -html {rows 30 cols 60 wrap soft} + -label Body \ + -datatype text \ + -widget textarea \ + -html {rows 20 cols 60 wrap soft} element create message parent_id \ - -label "parent ID" -datatype integer -widget hidden -optional + -label "parent ID" \ + -datatype integer \ + -widget hidden \ + -optional element create message forum_id \ - -label "forum ID" -datatype integer -widget hidden + -label "forum ID" \ + -datatype integer \ + -widget hidden element create message html_p \ - -label "Format" -datatype text -widget select -options {{text f} {html t}} + -label Format \ + -datatype text \ + -widget select \ + -options {{text f} {html t}} element create message confirm_p \ - -label "Confirm?" -datatype text -widget hidden + -label "Confirm?" \ + -datatype text \ + -widget hidden element create message subscribe_p \ - -label "Subscribe?" -datatype text -widget hidden -optional + -label "Subscribe?" \ + -datatype text \ + -widget hidden \ + -optional if {[form is_valid message]} { - template::form get_values message message_id forum_id parent_id subject content html_p confirm_p subscribe_p + 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 @@ -67,16 +89,20 @@ } } + set context_bar [list [list "./forum-view?forum_id=$forum_id" "$forum(name)"]] + lappend context_bar {Post a Message} + 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 + forum::message::new \ + -forum_id $forum_id \ + -message_id $message_id \ + -parent_id $parent_id \ + -subject $subject \ + -content $content \ + -html_p $html_p if {[empty_string_p $parent_id]} { set message_view_url "[ad_conn package_url]message-view?message_id=$message_id" @@ -98,20 +124,34 @@ } set message_id [db_nextval acs_object_id_seq] +set subject "" -if {[empty_string_p $forum_id]} { +if {![empty_string_p $parent_id]} { # get the parent message information forum::message::get -message_id $parent_id -array parent_message set forum_id $parent_message(forum_id) + set subject "Re: $parent_message(subject)" + } +forum::security::require_post_forum -forum_id $forum_id + forum::get -forum_id $forum_id -array forum # Prepare the other data 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 subject -value $subject element set_properties message confirm_p -value 0 element set_properties message subscribe_p -value 0 +set context_bar [list [list "./forum-view?forum_id=$forum_id" "$forum(name)"]] +if {![empty_string_p $parent_id]} { + lappend context_bar [list "./message-view?message_id=$parent_message(message_id)" "$parent_message(subject)"] + lappend context_bar {Post a Reply} +} else { + lappend context_bar {Post a Message} +} + ad_return_template Index: openacs-4/packages/forums/www/message-post.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/message-post.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/www/message-post.xql 29 May 2002 21:40:11 -0000 1.1 +++ openacs-4/packages/forums/www/message-post.xql 3 Jun 2002 04:39:05 -0000 1.2 @@ -1,10 +1,13 @@ + - - -select forum_id from forums_messages where message_id= :parent_id - - + + + select forum_id + from forums_messages + where message_id = :parent_id + + Index: openacs-4/packages/forums/www/message-preview-chunk.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/message-preview-chunk.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/forums/www/message-preview-chunk.adp 3 Jun 2002 04:39:05 -0000 1.1 @@ -0,0 +1,10 @@ + + + + + + + + + +
      @message.subject@@message.user_name@@message.posting_date@
      @message.content@
      Index: openacs-4/packages/forums/www/message-preview-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/message-preview-chunk.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/forums/www/message-preview-chunk.tcl 3 Jun 2002 04:39:05 -0000 1.1 @@ -0,0 +1,14 @@ +ad_page_contract { + + a message preview chunk to be included elsewhere + + @author yon (yon@openforce.net) + @creation-date 2002-06-02 + @version $Id: message-preview-chunk.tcl,v 1.1 2002/06/03 04:39:05 yon Exp $ + +} + +if {![array exists message]} { + ad_return_complaint 1 "Need to provide a message to display." +} +if {![exists_and_not_null bgcolor]} { set bgcolor "#ffffff" } Index: openacs-4/packages/forums/www/message-view-flat.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/message-view-flat.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/www/message-view-flat.adp 1 Jun 2002 19:33:42 -0000 1.1 +++ openacs-4/packages/forums/www/message-view-flat.adp 3 Jun 2002 04:39:05 -0000 1.2 @@ -2,43 +2,42 @@ Forum @forum.name@: @message.subject@ @context_bar@ -

      -@notification_chunk@ -

      +
      -

      Message

      -
      - -response to @message.root_subject@

      + + + + +
      + @notification_chunk@ + + [ + Post a New Message + ] +
      -@message.subject@ +
      -

      + + +
      -@message.content@ +
      -

      --- @message.user_name@ on <%= [util_AnsiDatetoPrettyDate $message(posting_date)] %>

      + -Respond! -  |   -Email + - -

      -Administration: [@message.state@] [ delete | approve | reject | edit] + + - + + + -

      Responses

      - - -
      -(@responses.state@)
      -@responses.subject@

      -@responses.content@

      --- @responses.user_name@ on <%= [util_AnsiDatetoPrettyDate $responses(posting_date)] %>


      -

      - + +
      + +

      Index: openacs-4/packages/forums/www/message-view-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/message-view-oracle.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/www/message-view-oracle.xql 29 May 2002 21:40:11 -0000 1.1 +++ openacs-4/packages/forums/www/message-view-oracle.xql 3 Jun 2002 04:39:05 -0000 1.2 @@ -2,24 +2,72 @@ oracle8.1.6 - - -select message_id, subject, content, person.name(user_id) as user_name, posting_date, tree.tree_level(tree_sortkey) as tree_level, state, user_id -from forums_messages_approved -where forum_id= :forum_id -and tree_sortkey between tree.left(:tree_sortkey) and tree.right(:tree_sortkey) -order by tree_sortkey - - + + + select message_id, + subject, + content, + person.name(user_id) as user_name, + to_char(posting_date, 'Mon DD YYYY HH24:MI:SS') as posting_date, + tree.tree_level(tree_sortkey) as tree_level, + state, + user_id + from forums_messages_approved + where forum_id = :forum_id + and tree_sortkey between tree.left(:tree_sortkey) and tree.right(:tree_sortkey) + order by tree_sortkey + + - - -select message_id, subject, content, person.name(user_id) as user_name, posting_date, tree.tree_level(tree_sortkey) as tree_level, state, user_id -from forums_messages -where forum_id= :forum_id -and tree_sortkey between tree.left(:tree_sortkey) and tree.right(:tree_sortkey) -order by tree_sortkey - - + + + select message_id, + subject, + content, + person.name(user_id) as user_name, + to_char(posting_date, 'Mon DD YYYY HH24:MI:SS') as posting_date, + tree.tree_level(tree_sortkey) as tree_level, + state, + user_id + from forums_messages_approved + where forum_id = :forum_id + and tree_sortkey between tree.left(:tree_sortkey) and tree.right(:tree_sortkey) + order by posting_date, tree_sortkey + + + + + select message_id, + subject, + content, + person.name(user_id) as user_name, + to_char(posting_date, 'Mon DD YYYY HH24:MI:SS') as posting_date, + tree.tree_level(tree_sortkey) as tree_level, + state, + user_id + from forums_messages + where forum_id = :forum_id + and tree_sortkey between tree.left(:tree_sortkey) and tree.right(:tree_sortkey) + order by tree_sortkey + + + + + + select message_id, + subject, + content, + person.name(user_id) as user_name, + to_char(posting_date, 'Mon DD YYYY HH24:MI:SS') as posting_date, + tree.tree_level(tree_sortkey) as tree_level, + state, + user_id + from forums_messages + where forum_id = :forum_id + and tree_sortkey between tree.left(:tree_sortkey) and tree.right(:tree_sortkey) + order by posting_date, tree_sortkey + + + Index: openacs-4/packages/forums/www/message-view-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/message-view-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/www/message-view-postgresql.xql 29 May 2002 21:40:11 -0000 1.1 +++ openacs-4/packages/forums/www/message-view-postgresql.xql 3 Jun 2002 04:39:05 -0000 1.2 @@ -1,12 +1,74 @@ + - postgresql7.1 + postgresql7.1 - - -select message_id, subject, content, party__name(user_id) as user_name, posting_date from forums_messages -where parent_id= :message_id order by posting_date - - + + + select message_id, + subject, + content, + person__name(user_id) as user_name, + to_char(posting_date, 'Mon DD YYYY HH24:MI:SS') as posting_date, + tree__tree_level(tree_sortkey) as tree_level, + state, + user_id + from forums_messages_approved + where forum_id = :forum_id + and tree_sortkey between tree__left(:tree_sortkey) and tree__right(:tree_sortkey) + order by tree_sortkey + + + + + select message_id, + subject, + content, + person__name(user_id) as user_name, + to_char(posting_date, 'Mon DD YYYY HH24:MI:SS') as posting_date, + tree__tree_level(tree_sortkey) as tree_level, + state, + user_id + from forums_messages_approved + where forum_id = :forum_id + and tree_sortkey between tree__left(:tree_sortkey) and tree__right(:tree_sortkey) + order by posting_date, tree_sortkey + + + + + + select message_id, + subject, + content, + person__name(user_id) as user_name, + to_char(posting_date, 'Mon DD YYYY HH24:MI:SS') as posting_date, + tree__tree_level(tree_sortkey) as tree_level, + state, + user_id + from forums_messages + where forum_id = :forum_id + and tree_sortkey between tree__left(:tree_sortkey) and tree__right(:tree_sortkey) + order by tree_sortkey + + + + + + select message_id, + subject, + content, + person__name(user_id) as user_name, + to_char(posting_date, 'Mon DD YYYY HH24:MI:SS') as posting_date, + tree__tree_level(tree_sortkey) as tree_level, + state, + user_id + from forums_messages + where forum_id = :forum_id + and tree_sortkey between tree__left(:tree_sortkey) and tree__right(:tree_sortkey) + order by posting_date, tree_sortkey + + + Index: openacs-4/packages/forums/www/message-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/message-view.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/www/message-view.adp 29 May 2002 21:40:10 -0000 1.1 +++ openacs-4/packages/forums/www/message-view.adp 3 Jun 2002 04:39:05 -0000 1.2 @@ -2,36 +2,50 @@ Forum @forum.name@: @message.subject@ @context_bar@ -

      -@notification_chunk@ -

      +
      - -response to @message.root_subject@

      + + + + +
      + @notification_chunk@ + + [ + Post a New Message + ] +
      -@message.subject@ +
      -

      + + +
      -

      -@message.content@ -
      +
      -

      -Respond! -  |   -Email + - -

      -Administration: [@message.state@] [ delete | approve | reject | edit] - + -

      Responses

      +<% set width [expr 100 - $responses(tree_level) * 3] %> -
      + + + - + +
      + + + + + + + +
      +
      + +

      Index: openacs-4/packages/forums/www/message-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/message-view.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/forums/www/message-view.tcl 1 Jun 2002 19:33:42 -0000 1.2 +++ openacs-4/packages/forums/www/message-view.tcl 3 Jun 2002 04:39:05 -0000 1.3 @@ -1,27 +1,30 @@ - ad_page_contract { - View a message (and its children) + view a message (and its children) - @author Ben Adida (ben@openforce) + @author Ben Adida (ben@openforce.net) @creation-date 2002-05-25 - @cvs-id $id: Exp $ + @version $Id$ + } { message_id:integer,notnull } -# Security forum::security::require_read_message -message_id $message_id # Check if the user has admin on the message set moderate_p [forum::security::can_moderate_message_p -message_id $message_id] -set post_p [forum::security::can_post_message_p -message_id $message_id] +if {!${moderate_p}} { + set post_p [forum::security::can_post_message_p -message_id $message_id] +} else { + set post_p 1 +} # Load up the message information forum::message::get -message_id $message_id -array message # Check if the message is approved -if {!$moderate_p && $message(state) != "approved"} { +if {!${moderate_p} && ![string equal $message(state) approved]} { ad_returnredirect "forum-view?forum_id=$message(forum_id)" ad_script_abort } @@ -35,28 +38,38 @@ set forum_id $message(forum_id) set tree_sortkey $message(tree_sortkey) -if {!$moderate_p} { - # Select publicly viewable items - db_multirow responses select_message_responses {} -} else { - # Select all items - db_multirow responses select_message_responses_moderator {} +set query select_message_responses +if {$moderate_p} { + set query select_message_responses_moderator } +if {[string equal $forum(presentation_type) flat]} { + append query "_flat" +} + +db_multirow responses $query {} + # If this is a top-level thread, we allow subscriptions here if {[empty_string_p $message(parent_id)]} { - set notification_chunk [notification::display::request_widget -type forums_message_notif -object_id $message_id -pretty_name $message(subject) -url [ad_conn url]?message_id=$message_id] + set notification_chunk [notification::display::request_widget \ + -type forums_message_notif \ + -object_id $message_id \ + -pretty_name $message(subject) \ + -url [ad_conn url]?message_id=$message_id \ + ] + append notification_chunk "

      " } else { set notification_chunk "" } -set context_bar [list [list "./forum-view?forum_id=$message(forum_id)" "$message(forum_name)"] {One Message}] +set context_bar [list [list "./forum-view?forum_id=$message(forum_id)" "$message(forum_name)"]] +if {![empty_string_p $message(parent_id)]} { + lappend context_bar [list "./message-view?message_id=$message(root_message_id)" "Entire Thread"] +} +lappend context_bar {One Message} -if {$forum(presentation_type) == "flat"} { - ad_return_template message-view-flat +if {[string equal $forum(presentation_type) flat]} { + ad_return_template "message-view-flat" } else { ad_return_template } - - - Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/forums/www/messsage-view-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/forums/www/test.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/forums/www/user-history.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/user-history.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/www/user-history.tcl 29 May 2002 21:40:11 -0000 1.1 +++ openacs-4/packages/forums/www/user-history.tcl 3 Jun 2002 04:39:05 -0000 1.2 @@ -1,11 +1,11 @@ - ad_page_contract { Posting History for a User @author Ben Adida (ben@openforce) @creation-date 2002-05-29 - @cvs-id $id: Exp $ + @version $Id$ + } { user_id:integer,notnull {view "date"} Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/forums/www/admin/forum-add-edit.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/forums/www/admin/forum-disable.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/admin/forum-disable.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/www/admin/forum-disable.tcl 29 May 2002 21:40:11 -0000 1.1 +++ openacs-4/packages/forums/www/admin/forum-disable.tcl 3 Jun 2002 04:39:05 -0000 1.2 @@ -1,11 +1,11 @@ - ad_page_contract { Disable a Forum @author Ben Adida (ben@openforce) @creation-date 2002-05-28 - @cvs-id $id: Exp $ + @version $Id$ + } { forum_id:integer,notnull } Index: openacs-4/packages/forums/www/admin/forum-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/admin/forum-edit.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/www/admin/forum-edit.tcl 29 May 2002 21:40:11 -0000 1.1 +++ openacs-4/packages/forums/www/admin/forum-edit.tcl 3 Jun 2002 04:39:05 -0000 1.2 @@ -1,11 +1,11 @@ - ad_page_contract { Edit a Forum @author Ben Adida (ben@openforce) @creation-date 2002-05-25 - @cvs-id $id: Exp $ + @version $Id$ + } { forum_id:integer,notnull } Index: openacs-4/packages/forums/www/admin/forum-enable.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/admin/forum-enable.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/www/admin/forum-enable.tcl 29 May 2002 21:40:11 -0000 1.1 +++ openacs-4/packages/forums/www/admin/forum-enable.tcl 3 Jun 2002 04:39:05 -0000 1.2 @@ -1,11 +1,11 @@ - ad_page_contract { Disable a Forum @author Ben Adida (ben@openforce) @creation-date 2002-05-28 - @cvs-id $id: Exp $ + @version $Id$ + } { forum_id:integer,notnull } 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.2 -r1.3 --- openacs-4/packages/forums/www/admin/forum-new.tcl 30 May 2002 06:25:52 -0000 1.2 +++ openacs-4/packages/forums/www/admin/forum-new.tcl 3 Jun 2002 04:39:05 -0000 1.3 @@ -1,11 +1,11 @@ - ad_page_contract { Create a Forum @author Ben Adida (ben@openforce) @creation-date 2002-05-25 - @cvs-id $id: Exp $ + @version $Id$ + } { {name ""} } Index: openacs-4/packages/forums/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/admin/index.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/www/admin/index.tcl 29 May 2002 21:40:11 -0000 1.1 +++ openacs-4/packages/forums/www/admin/index.tcl 3 Jun 2002 04:39:05 -0000 1.2 @@ -1,12 +1,11 @@ - ad_page_contract { Forums Administration @author Ben Adida (ben@openforce) @creation-date 2002-05-24 - @cvs-id $Id$ -} { + @version $Id$ + } # scoping @@ -16,4 +15,3 @@ db_multirow forums select_forums {} ad_return_template - Index: openacs-4/packages/forums/www/moderate/forum.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/forum.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/www/moderate/forum.tcl 29 May 2002 21:40:11 -0000 1.1 +++ openacs-4/packages/forums/www/moderate/forum.tcl 3 Jun 2002 04:39:06 -0000 1.2 @@ -1,11 +1,11 @@ - ad_page_contract { Moderate a Forum @author Ben Adida (ben@openforce) @creation-date 2002-05-24 - @cvs-id $Id$ + @version $Id$ + } { forum_id:integer,notnull } Index: openacs-4/packages/forums/www/moderate/message-approve.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/message-approve.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/www/moderate/message-approve.tcl 29 May 2002 21:40:11 -0000 1.1 +++ openacs-4/packages/forums/www/moderate/message-approve.tcl 3 Jun 2002 04:39:06 -0000 1.2 @@ -1,11 +1,11 @@ - ad_page_contract { Approve a Message @author Ben Adida (ben@openforce) @creation-date 2002-05-24 - @cvs-id $Id$ + @version $Id$ + } { message_id:integer,notnull {return_url "../message-view"} Index: openacs-4/packages/forums/www/moderate/message-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/message-delete.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/www/moderate/message-delete.tcl 29 May 2002 21:40:11 -0000 1.1 +++ openacs-4/packages/forums/www/moderate/message-delete.tcl 3 Jun 2002 04:39:06 -0000 1.2 @@ -1,11 +1,11 @@ - ad_page_contract { Delete a Message @author Ben Adida (ben@openforce) @creation-date 2002-05-24 - @cvs-id $Id$ + @version $Id$ + } { message_id:integer,notnull {return_url ""} Index: openacs-4/packages/forums/www/moderate/message-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/message-edit.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/www/moderate/message-edit.tcl 29 May 2002 21:40:11 -0000 1.1 +++ openacs-4/packages/forums/www/moderate/message-edit.tcl 3 Jun 2002 04:39:06 -0000 1.2 @@ -1,30 +1,40 @@ - ad_page_contract { Form to edit a message @author Ben Adida (ben@openforce) @creation-date 2002-05-25 - @cvs-id $id: Exp $ + @version $Id$ + } { message_id:integer,notnull {return_url "../message-view"} } -# We would use the nice ad_form construct if we could form create message element create message message_id \ - -label "Message ID" -datatype integer -widget hidden + -label "Message ID" \ + -datatype integer \ + -widget hidden element create message subject \ - -label "Subject" -datatype text -widget text -html {size 60} + -label Subject \ + -datatype text \ + -widget text \ + -html {size 60} element create message content \ - -label "Body" -datatype text -widget textarea -html {rows 30 cols 60 wrap soft} + -label Body \ + -datatype text \ + -widget textarea \ + -html {rows 20 cols 60 wrap soft} element create message html_p \ - -label "Format" -datatype text -widget select -options {{text f} {html t}} + -label Format \ + -datatype text \ + -widget select \ + -options {{text f} {html t}} if {[form is_valid message]} { template::form get_values message message_id subject content html_p Index: openacs-4/packages/forums/www/moderate/message-reject.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/message-reject.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/www/moderate/message-reject.tcl 29 May 2002 21:40:11 -0000 1.1 +++ openacs-4/packages/forums/www/moderate/message-reject.tcl 3 Jun 2002 04:39:06 -0000 1.2 @@ -1,11 +1,11 @@ - ad_page_contract { Reject a Message @author Ben Adida (ben@openforce) @creation-date 2002-05-24 - @cvs-id $Id$ + @version $Id$ + } { message_id:integer,notnull {return_url "../message-view"}