Index: openacs-4/packages/forums/forums.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/forums.info,v diff -u -r1.26 -r1.27 --- openacs-4/packages/forums/forums.info 25 Mar 2004 15:59:28 -0000 1.26 +++ openacs-4/packages/forums/forums.info 1 Apr 2004 16:14:28 -0000 1.27 @@ -7,14 +7,14 @@ f f - + OpenACS Online discussion forums. 2003-11-10 OpenACS This online discussion board software is the successor of the original bboard package. The biggest improvement is a scalable datamodel. Forums supports threaded and flat view, moderation, a stand alone search function as well as integration with the OpenACS search package and integration with the notifications package for email alerts. It also supports reply via email. - + @@ -23,6 +23,7 @@ + Index: openacs-4/packages/forums/lib/message/thread-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/thread-chunk.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/lib/message/thread-chunk.tcl 17 Dec 2003 15:45:29 -0000 1.1 +++ openacs-4/packages/forums/lib/message/thread-chunk.tcl 1 Apr 2004 16:14:29 -0000 1.2 @@ -78,8 +78,8 @@ db_multirow -extend { posting_date_pretty direct_url number parent_number parent_direct_url } responses $query {} { set posting_date_pretty [lc_time_fmt $posting_date_ansi "%x %X"] - set direct_url "$direct_url_base\#$message(message_id)" - set number [expr [lsearch $message_id_list $message(message_id)] + 1] + set direct_url "$direct_url_base\#$message_id" + set number [expr [lsearch $message_id_list $message_id] + 1] set parent_number [expr [lsearch $message_id_list $parent_id] + 1] set parent_direct_url "$direct_url_base\#$parent_id" } Index: openacs-4/packages/forums/lib/search/search-chunk.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/search/search-chunk.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/lib/search/search-chunk.adp 17 Dec 2003 15:45:30 -0000 1.1 +++ openacs-4/packages/forums/lib/search/search-chunk.adp 1 Apr 2004 16:14:29 -0000 1.2 @@ -1,3 +1,4 @@ +
@@ -11,3 +12,4 @@
+ Index: openacs-4/packages/forums/lib/search/search-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/search/search-chunk.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/lib/search/search-chunk.tcl 17 Dec 2003 15:45:30 -0000 1.1 +++ openacs-4/packages/forums/lib/search/search-chunk.tcl 1 Apr 2004 16:14:29 -0000 1.2 @@ -5,36 +5,38 @@ @cvs-id $Id$ } - set package_id [ad_conn package_id] -form create search -forums::form::search search +set searchbox_p [parameter::get -parameter ForumsSearchBoxP -package_id $package_id -default 1] +if {$searchbox_p} { + form create search + forums::form::search search -if {[form is_valid search]} { - form get_values search search_text forum_id + if {[form is_valid search]} { + form get_values search search_text forum_id - # remove any special characters from the search text so we - # don't crash interMedia - regsub -all {[^[:alnum:]_[:blank:]]} $search_text {} search_text + # remove any special characters from the search text so we + # don't crash interMedia + regsub -all {[^[:alnum:]_[:blank:]]} $search_text {} search_text - set query search_all_forums - if {![empty_string_p $forum_id]} { - set query search_one_forum - } - - if { [parameter::get -parameter UseIntermediaForSearchP -default 0] } { - append query "_intermedia" - } + set query search_all_forums + if {![empty_string_p $forum_id]} { + set query search_one_forum + } + + if { [parameter::get -parameter UseIntermediaForSearchP -default 0] } { + append query "_intermedia" + } - db_multirow messages $query {} { - set posting_date_pretty [lc_time_fmt $posting_date_ansi "%x %X"] + db_multirow messages $query {} { + set posting_date_pretty [lc_time_fmt $posting_date_ansi "%x %X"] + } + + } else { + set messages:rowcount 0 } -} else { - set messages:rowcount 0 -} - -if {[exists_and_not_null alt_template]} { - ad_return_template $alt_template -} + if {[exists_and_not_null alt_template]} { + ad_return_template $alt_template + } +} \ No newline at end of file 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.26 -r1.27 --- openacs-4/packages/forums/www/forum-view.adp 30 Mar 2004 21:00:32 -0000 1.26 +++ openacs-4/packages/forums/www/forum-view.adp 1 Apr 2004 16:14:30 -0000 1.27 @@ -3,18 +3,14 @@ @context;noquote@ @forum_id;noquote@ - - - - - -
- @notification_chunk;noquote@ - - - - #forums.Search#  - -
+ +
+ + + #forums.Search_colon#  + + +
+
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.22 -r1.23 --- openacs-4/packages/forums/www/forum-view.tcl 17 Dec 2003 15:45:30 -0000 1.22 +++ openacs-4/packages/forums/www/forum-view.tcl 1 Apr 2004 16:14:30 -0000 1.23 @@ -11,6 +11,7 @@ {orderby "posting_date,desc"} } + # Get forum data forum::get -forum_id $forum_id -array forum @@ -38,13 +39,15 @@ set post_url [export_vars -base "message-post" { forum_id }] # Create a search form and action when used -form create search -action search -forums::form::search search +set searchbox_p [parameter::get -parameter ForumsSearchBoxP -default 1] +if {$searchbox_p} { + form create search -action search + forums::form::search search -if {[form is_request search]} { - element set_properties search forum_id -value $forum_id + if {[form is_request search]} { + element set_properties search forum_id -value $forum_id + } } - # Need to quote forum(name) since it is noquoted on display as part of an # HTML fragment. set notification_chunk [notification::display::request_widget \ Index: openacs-4/packages/forums/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/index.adp,v diff -u -r1.22 -r1.23 --- openacs-4/packages/forums/www/index.adp 30 Dec 2003 23:10:03 -0000 1.22 +++ openacs-4/packages/forums/www/index.adp 1 Apr 2004 16:14:30 -0000 1.23 @@ -2,12 +2,14 @@ #forums.Forums# @context;noquote@ +
#forums.Search_colon# 
+
Index: openacs-4/packages/forums/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/index.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/forums/www/index.tcl 17 Dec 2003 15:45:30 -0000 1.10 +++ openacs-4/packages/forums/www/index.tcl 1 Apr 2004 16:14:30 -0000 1.11 @@ -11,11 +11,12 @@ set package_id [ad_conn package_id] set user_id [ad_verify_and_get_user_id] set admin_p [permission::permission_p -party_id $user_id -object_id $package_id -privilege admin] +set searchbox_p [parameter::get -parameter ForumsSearchBoxP -package_id $package_id -default 1] # Create a search form and action when used -form create search -action search -forums::form::search search +if {$searchbox_p} { + form create search -action search + forums::form::search search +} set context {} - -ad_return_template 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.24 -r1.25 --- openacs-4/packages/forums/www/message-view.adp 25 Mar 2004 12:28:19 -0000 1.24 +++ openacs-4/packages/forums/www/message-view.adp 1 Apr 2004 16:14:30 -0000 1.25 @@ -3,32 +3,20 @@ @context;noquote@ @message_id@ -
- - - - - - - - - -
- - -   -
- @notification_chunk;noquote@ - + +
- #forums.Search#  + #forums.Search_colon#  + -
+ + + -
+

@notification_chunk;noquote@