Index: openacs-4/packages/dotlrn-forums/www/user.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-forums/www/user.adp,v diff -u -N -r1.3 -r1.3.12.1 --- openacs-4/packages/dotlrn-forums/www/user.adp 13 Aug 2003 13:33:11 -0000 1.3 +++ openacs-4/packages/dotlrn-forums/www/user.adp 26 Mar 2007 11:17:50 -0000 1.3.12.1 @@ -5,13 +5,16 @@

#dotlrn-forums.Posting_history_for# - <% + @screen_name@ + + <% if {![permission::permission_p -object_id [acs_magic_object security_context_root] -privilege admin]} { adp_puts [acs_community_member_link -user_id $user(user_id)] } else { adp_puts [acs_community_member_admin_link -user_id $user(user_id)] } - %> + %> +

Index: openacs-4/packages/dotlrn-forums/www/user.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-forums/www/user.tcl,v diff -u -N -r1.3 -r1.3.12.1 --- openacs-4/packages/dotlrn-forums/www/user.tcl 13 Aug 2003 11:21:42 -0000 1.3 +++ openacs-4/packages/dotlrn-forums/www/user.tcl 26 Mar 2007 11:17:50 -0000 1.3.12.1 @@ -21,6 +21,10 @@ ] \ ] +# provide screen_name functionality +set screen_name [db_string select_screen_name { select screen_name from users where user_id = :user_id}] +set useScreenNameP [parameter::get -parameter "UseScreenNameP" -default 0] + set query select_messages if {[string equal $view forum]} { set query select_messages_by_forum Index: openacs-4/packages/forums/lib/forums/forums-history-chunk.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/forums/forums-history-chunk.adp,v diff -u -N -r1.1 -r1.1.8.1 --- openacs-4/packages/forums/lib/forums/forums-history-chunk.adp 8 Apr 2005 08:28:08 -0000 1.1 +++ openacs-4/packages/forums/lib/forums/forums-history-chunk.adp 26 Mar 2007 11:18:06 -0000 1.1.8.1 @@ -4,39 +4,10 @@
- - - - - - - - - - - - - - - - - - - - - - - + - - - + #forums.No_Postings# - -
#forums.User##forums.Number_of_Posts##forums.Posted#
@persons.first_names@ @persons.last_name@@persons.num_msg@@persons.last_post@
- #forums.No_Postings# -
-
Index: openacs-4/packages/forums/lib/forums/forums-history-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/forums/forums-history-chunk.tcl,v diff -u -N -r1.1 -r1.1.8.1 --- openacs-4/packages/forums/lib/forums/forums-history-chunk.tcl 8 Apr 2005 08:28:08 -0000 1.1 +++ openacs-4/packages/forums/lib/forums/forums-history-chunk.tcl 26 Mar 2007 11:18:06 -0000 1.1.8.1 @@ -8,13 +8,39 @@ } set package_id [ad_conn package_id] +set user_id [ad_conn user_id] # get the colors from the params set table_border_color [parameter::get -parameter table_border_color] set table_bgcolor [parameter::get -parameter table_bgcolor] set table_other_bgcolor [parameter::get -parameter table_other_bgcolor] +# provide screen_name functionality +set screen_name [db_string select_screen_name { select screen_name from users where user_id = :user_id}] +set useScreenNameP [parameter::get -parameter "UseScreenNameP" -default 0] +template::list::create \ + -html {width 50%} \ + -name persons \ + -multirow persons \ + -key message_id \ + -pass_properties {useScreenNameP screen_name} \ + -elements { + name { + label "\#forums.User\#" + html {align left} + display_template {@screen_name@@persons.first_names@ @persons.last_name@} + } + num_msg { + label "\#forums.Number_of_Posts\#" + html {align left} + } + last_post { + label "\#forums.Posted\#" + html {align right} + } + } + db_multirow persons select_users_wrote_post {} if {[exists_and_not_null alt_template]} { Index: openacs-4/packages/forums/lib/message/post.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/post.tcl,v diff -u -N -r1.11.2.3 -r1.11.2.4 --- openacs-4/packages/forums/lib/message/post.tcl 10 Mar 2007 20:24:34 -0000 1.11.2.3 +++ openacs-4/packages/forums/lib/message/post.tcl 26 Mar 2007 11:18:06 -0000 1.11.2.4 @@ -136,6 +136,7 @@ set message(content) $content set message(user_id) $displayed_user_id set message(user_name) [db_string select_name {}] + set message(screen_name) $screen_name set message(posting_date_ansi) [db_string select_date {}] set message(posting_date_pretty) [lc_time_fmt $message(posting_date_ansi) "%x %X"] Index: openacs-4/packages/forums/lib/message/threads-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/threads-chunk.tcl,v diff -u -N -r1.7.2.1 -r1.7.2.2 --- openacs-4/packages/forums/lib/message/threads-chunk.tcl 4 Mar 2007 21:21:26 -0000 1.7.2.1 +++ openacs-4/packages/forums/lib/message/threads-chunk.tcl 26 Mar 2007 11:18:06 -0000 1.7.2.2 @@ -3,7 +3,6 @@ @author Ben Adida (ben@openforce.net) @creation-date 2002-05-24 -<<<<<<< threads-chunk.tcl @cvs-id $Id$ } Index: openacs-4/packages/forums/lib/user/post-history-chunk.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/user/post-history-chunk.adp,v diff -u -N -r1.2 -r1.2.6.1 --- openacs-4/packages/forums/lib/user/post-history-chunk.adp 8 Apr 2005 08:28:08 -0000 1.2 +++ openacs-4/packages/forums/lib/user/post-history-chunk.adp 26 Mar 2007 11:18:07 -0000 1.2.6.1 @@ -1,13 +1,16 @@

#forums.Posting_history_for# - <% + @screen_name@ + + <% if {![permission::permission_p -object_id [acs_magic_object security_context_root] -privilege admin]} { adp_puts [acs_community_member_link -user_id $user_id] } else { adp_puts [acs_community_member_admin_link -user_id $user_id] } - %> + %> +

@@ -19,33 +22,8 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -55,35 +33,12 @@ -
#forums.Forum##forums.Subject##forums.Posted#
@messages.forum_name@@messages.subject@@messages.posting_date_pretty@
-

-
+

#forums.Summary_Posting_history_for#

-

- - - - - - +

- - - - - - - - - - - - - - - - + @@ -92,47 +47,6 @@ - -
#forums.Forum##forums.Number_of_Posts##forums.Posted#
@posts.name@@posts.num_msg@@posts.last_post@
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@messages.forum_name@

#forums.Subject##forums.Posted#
@messages.subject@@messages.posting_date_pretty@
-
- -
- -
-
Index: openacs-4/packages/forums/lib/user/post-history-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/user/post-history-chunk.tcl,v diff -u -N -r1.2 -r1.2.6.1 --- openacs-4/packages/forums/lib/user/post-history-chunk.tcl 8 Apr 2005 08:28:08 -0000 1.2 +++ openacs-4/packages/forums/lib/user/post-history-chunk.tcl 26 Mar 2007 11:18:07 -0000 1.2.6.1 @@ -6,6 +6,8 @@ @creation-date 2002-05-29 @cvs-id $Id$ +} { + groupby:optional } set package_id [ad_conn package_id] @@ -15,6 +17,10 @@ set table_bgcolor [parameter::get -parameter table_bgcolor] set table_other_bgcolor [parameter::get -parameter table_other_bgcolor] +# provide screen_name functionality +set screen_name [db_string select_screen_name { select screen_name from users where user_id = :user_id}] +set useScreenNameP [parameter::get -parameter "UseScreenNameP" -default 0] + # choosing the view set dimensional_list " { @@ -28,15 +34,84 @@ set query select_messages if {[string equal $view forum]} { set query select_messages_by_forum + template::list::create \ + -html {width 50%} \ + -name messages \ + -multirow messages \ + -key message_id \ + -elements { + forum_name { + label "\#forums.Forum\#" + hide_p t + html {align left} + display_template {@messages.forum_name@} + } + subject { + label "\#forums.Subject\#" + html {align left} + display_template {@messages.subject@} + } + posting_date_pretty { + label "\#forums.Posted\#" + html {align right} + } + } -groupby { + label "\#forums.Forum\#" + values { "\#forums.Forum\#" {{groupby forum_name} {orderby forum_name,desc}}} + } +} else { + template::list::create \ + -html {width 50%} \ + -name messages \ + -multirow messages \ + -key message_id \ + -elements { + forum_name { + label "\#forums.Forum\#" + html {align left} + display_template {@messages.forum_name@} + } + subject { + label "\#forums.Subject\#" + html {align left} + display_template {@messages.subject@} + } + posting_date_pretty { + label "\#forums.Posted\#" + html {align right} + } + } } # Select the postings db_multirow -extend { posting_date_pretty } messages $query {} { set posting_date_pretty [lc_time_fmt $posting_date_ansi "%x %X"] } +template::list::create \ + -name posts \ + -multirow posts \ + -key message_id \ + -elements { + name { + label "\#forums.Forum\#" + html {align left} + display_template {@posts.name@} + } + num_msg { + label "\#forums.Number_of_Posts\#" + html {align left} + } + posting_date_pretty { + label "\#forums.Posted\#" + html {align right} + } + } + # select number of post from this user -db_multirow posts select_num_post {} +db_multirow -extend { posting_date_pretty } posts select_num_post {} { + set posting_date_pretty [lc_time_fmt $last_post "%x %X"] +} set dimensional_chunk [ad_dimensional $dimensional_list] Index: openacs-4/packages/forums/lib/user/post-history-chunk.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/user/post-history-chunk.xql,v diff -u -N -r1.2 -r1.2.6.1 --- openacs-4/packages/forums/lib/user/post-history-chunk.xql 8 Apr 2005 08:28:08 -0000 1.2 +++ openacs-4/packages/forums/lib/user/post-history-chunk.xql 26 Mar 2007 11:18:07 -0000 1.2.6.1 @@ -5,6 +5,7 @@ select forums_messages.message_id, + forums_forums.forum_id, forums_messages.subject, to_char(forums_messages.posting_date, 'YYYY-MM-DD HH24:MI:SS') as posting_date_ansi, forums_forums.forum_id, @@ -21,6 +22,7 @@ select forums_messages.message_id, + forums_forums.forum_id, forums_messages.subject, to_char(forums_messages.posting_date, 'YYYY-MM-DD HH24:MI:SS') as posting_date_ansi, forums_forums.forum_id, @@ -30,8 +32,7 @@ where forums_messages.user_id = :user_id and forums_messages.forum_id = forums_forums.forum_id and forums_forums.package_id = :package_id - order by forum_name, - forums_messages.posting_date desc + order by forums_forums.name asc, forums_messages.posting_date desc @@ -45,4 +46,21 @@ + + + select forums_messages.message_id, + forums_messages.subject, + to_char(forums_messages.posting_date, 'YYYY-MM-DD HH24:MI:SS') as posting_date_ansi, + forums_forums.forum_id, + forums_forums.name as forum_name + from forums_messages, + forums_forums + where forums_messages.user_id = :user_id + [template::list::filter_where_clauses -and -name messages] + forums_messages.forum_id = forums_forums.forum_id + and forums_forums.package_id = :package_id + order by forums_messages.posting_date desc + + +