mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
fix for domain options in search box
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6848 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
parent
fc5efcc05a
commit
5efc0dce0b
|
@ -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
|
||||
|
|
|
@ -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]#" />
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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]#" />
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue
Block a user