Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
fix for domain options in search box
orbiter5efc0dce0bbb
diff --git a/defaults/yacy.init b/defaults/yacy.initindex 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 availablesearch.text = true-search.images = true+search.image = truesearch.audio = truesearch.video = truesearch.app = truediff --git a/htroot/index.html b/htroot/index.htmlindex c7425c49c..30ba15eea 100644--- a/htroot/index.html+++ b/htroot/index.html@@ -32,6 +32,7 @@<input name="query" id="search" type="text" size="52" maxlength="80" value="#[former]#" /><input type="submit" name="Enter" value="Search" /><input type="hidden" name="verify" value="true" />+ #(searchdomswitches)#::<div class="yacysearch">#(searchtext)#::<input type="radio" id="text" name="contentdom" value="text" #(check)#::checked="checked"#(/check)# /><label for="text">Text</label> #(/searchtext)##(searchimage)#::<input type="radio" id="image" name="contentdom" value="image" #(check)#::checked="checked"#(/check)# /><label for="image">Images</label> #(/searchimage)#@@ -39,6 +40,7 @@#(searchvideo)#::<input type="radio" id="video" name="contentdom" value="video" #(check)#::checked="checked"#(/check)# /><label for="video">Video</label> #(/searchvideo)##(searchapp)#::<input type="radio" id="app" name="contentdom" value="app" #(check)#::checked="checked"#(/check)# /><label for="app">Applications</label>#(/searchapp)#</div>+ #(/searchdomswitches)#<input type="hidden" name="nav" value="all" />#(searchoptions)#<input type="hidden" name="maximumRecords" value="#[maximumRecords]#" />diff --git a/htroot/index.java b/htroot/index.javaindex 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.htmlindex 3381eed47..527c8f363 100644--- a/htroot/yacysearch.html+++ b/htroot/yacysearch.html@@ -69,8 +69,9 @@ $(function() {<fieldset class="yacys"><input id="search" name="query" type="text" size="50" maxlength="80" value="#[former]#" onclick="document.getElementById('Enter').value = 'Search'" /><input id="Enter" type="submit" name="Enter" value="Search" />+ #(searchdomswitches)#::<div class="yacysearch">- #(searchtext)#::<input type="radio" id="text" name="contentdom" value="text" #(check)#::checked="checked"#(/check)# /><label for="text">Text</label> #(/searchtext)#+ #(searchtext)#::<input type="radio" id="text" name="contentdom" value="text" #(check)#::checked="checked"#(/check)# /><label for="text">Text</label> #(/searchtext)##(searchimage)#::<input type="radio" id="image" name="contentdom" value="image" #(check)#::checked="checked"#(/check)# /><label for="image">Images</label> #(/searchimage)##(searchaudio)#::<input type="radio" id="audio" name="contentdom" value="audio" #(check)#::checked="checked"#(/check)# /><label for="audio">Audio</label> #(/searchaudio)##(searchvideo)#::<input type="radio" id="video" name="contentdom" value="video" #(check)#::checked="checked"#(/check)# /><label for="video">Video</label> #(/searchvideo)#@@ -78,6 +79,7 @@ $(function() { <a href="index.html?display=#[display]#&searchoptions=1&count=#[count]#&resource=#[resource]#&urlmaskfilter=#[urlmaskfilter]#&prefermaskfilter=#[prefermaskfilter]#&cat=#[cat]#&constraint=#[constraint]#&contentdom=#[contentdom]#&former=#[former]#&meanCount=#[meanCount]#">more options</a></div>+ #(/searchdomswitches)#<input type="hidden" name="former" value="#[former]#" /><input type="hidden" name="maximumRecords" value="#[count]#" /><input type="hidden" name="startRecord" value="#[offset]#" />diff --git a/htroot/yacysearch.java b/htroot/yacysearch.javaindex 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");