@@ -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@
|