From 5efc0dce0bbba2756ef6d298865a6bb4346c19c1 Mon Sep 17 00:00:00 2001 From: orbiter Date: Fri, 30 Apr 2010 21:53:20 +0000 Subject: [PATCH] fix for domain options in search box git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6848 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- defaults/yacy.init | 2 +- htroot/index.html | 2 ++ htroot/index.java | 11 ++++++----- htroot/yacysearch.html | 4 +++- htroot/yacysearch.java | 11 ++++++----- 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/defaults/yacy.init b/defaults/yacy.init index 63e4ef864..f115ed269 100644 --- a/defaults/yacy.init +++ b/defaults/yacy.init @@ -698,7 +698,7 @@ stacker.slots = 2000 # search domains. If set to false then that search is not available search.text = true -search.images = true +search.image = true search.audio = true search.video = true search.app = true diff --git a/htroot/index.html b/htroot/index.html index c7425c49c..30ba15eea 100644 --- a/htroot/index.html +++ b/htroot/index.html @@ -32,6 +32,7 @@ + #(searchdomswitches)#::
#(searchtext)#::  #(/searchtext)# #(searchimage)#::  #(/searchimage)# @@ -39,6 +40,7 @@ #(searchvideo)#::  #(/searchvideo)# #(searchapp)#::#(/searchapp)#
+ #(/searchdomswitches)# #(searchoptions)# diff --git a/htroot/index.java b/htroot/index.java index 9c4734dc9..fde3de1b6 100644 --- a/htroot/index.java +++ b/htroot/index.java @@ -120,12 +120,13 @@ public class index { prop.put("depth", "0"); prop.put("display", display); prop.putHTML("constraint", constraint); + prop.put("searchdomswitches", sb.getConfigBool("search.text", true) || sb.getConfigBool("search.audio", true) || sb.getConfigBool("search.video", true) || sb.getConfigBool("search.image", true) || sb.getConfigBool("search.app", true) ? 1 : 0); + prop.put("searchdomswitches_searchtext", sb.getConfigBool("search.text", true) ? 1 : 0); + prop.put("searchdomswitches_searchaudio", sb.getConfigBool("search.audio", true) ? 1 : 0); + prop.put("searchdomswitches_searchvideo", sb.getConfigBool("search.video", true) ? 1 : 0); + prop.put("searchdomswitches_searchimage", sb.getConfigBool("search.image", true) ? 1 : 0); + prop.put("searchdomswitches_searchapp", sb.getConfigBool("search.app", true) ? 1 : 0); prop.put("searchoptions_display", display); - prop.put("searchtext", sb.getConfigBool("search.text", true) ? 1 : 0); - prop.put("searchaudio", sb.getConfigBool("search.audio", true) ? 1 : 0); - prop.put("searchvideo", sb.getConfigBool("search.video", true) ? 1 : 0); - prop.put("searchimage", sb.getConfigBool("search.image", true) ? 1 : 0); - prop.put("searchapp", sb.getConfigBool("search.app", true) ? 1 : 0); prop.put("searchtext_check", (contentdom == ContentDomain.TEXT) ? "1" : "0"); prop.put("searchaudio_check", (contentdom == ContentDomain.AUDIO) ? "1" : "0"); prop.put("searchvideo_check", (contentdom == ContentDomain.VIDEO) ? "1" : "0"); diff --git a/htroot/yacysearch.html b/htroot/yacysearch.html index 3381eed47..527c8f363 100644 --- a/htroot/yacysearch.html +++ b/htroot/yacysearch.html @@ -69,8 +69,9 @@ $(function() {
+ #(searchdomswitches)#::
- #(searchtext)#::  #(/searchtext)# + #(searchtext)#::  #(/searchtext)# #(searchimage)#::  #(/searchimage)# #(searchaudio)#::  #(/searchaudio)# #(searchvideo)#::  #(/searchvideo)# @@ -78,6 +79,7 @@ $(function() {   more options
+ #(/searchdomswitches)# diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java index d0a6260a5..95b810ade 100644 --- a/htroot/yacysearch.java +++ b/htroot/yacysearch.java @@ -685,11 +685,12 @@ public class yacysearch { prop.put("constraint", (constraint == null) ? "" : constraint.exportB64()); prop.put("verify", (fetchSnippets) ? "true" : "false"); prop.put("contentdom", (post == null ? "text" : post.get("contentdom", "text"))); - prop.put("searchtext", sb.getConfigBool("search.text", true) ? 1 : 0); - prop.put("searchaudio", sb.getConfigBool("search.audio", true) ? 1 : 0); - prop.put("searchvideo", sb.getConfigBool("search.video", true) ? 1 : 0); - prop.put("searchimage", sb.getConfigBool("search.image", true) ? 1 : 0); - prop.put("searchapp", sb.getConfigBool("search.app", true) ? 1 : 0); + prop.put("searchdomswitches", sb.getConfigBool("search.text", true) || sb.getConfigBool("search.audio", true) || sb.getConfigBool("search.video", true) || sb.getConfigBool("search.image", true) || sb.getConfigBool("search.app", true) ? 1 : 0); + prop.put("searchdomswitches_searchtext", sb.getConfigBool("search.text", true) ? 1 : 0); + prop.put("searchdomswitches_searchaudio", sb.getConfigBool("search.audio", true) ? 1 : 0); + prop.put("searchdomswitches_searchvideo", sb.getConfigBool("search.video", true) ? 1 : 0); + prop.put("searchdomswitches_searchimage", sb.getConfigBool("search.image", true) ? 1 : 0); + prop.put("searchdomswitches_searchapp", sb.getConfigBool("search.app", true) ? 1 : 0); prop.put("searchtext_check", (contentdom == ContentDomain.TEXT) ? "1" : "0"); prop.put("searchaudio_check", (contentdom == ContentDomain.AUDIO) ? "1" : "0"); prop.put("searchvideo_check", (contentdom == ContentDomain.VIDEO) ? "1" : "0");