From 227ebc6651d5fb699d39746a7cbe6aff9c0a62d8 Mon Sep 17 00:00:00 2001 From: orbiter Date: Tue, 18 May 2010 13:52:15 +0000 Subject: [PATCH] - added more map layers to the new location search: openstreetmap (mapnik, osmarender, cycle map) - cycle map is default because it looks best at 'world view' - added control elements to map - increased map size - added deletion of search results for each time when a new search is done - moved search box up and added yacy icon in such a way that the search page looks exaclty the same as the standard search git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6885 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/yacysearch.html | 73 +++++++++++++++------------------ htroot/yacysearch_location.html | 70 +++++++++++++++++++------------ htroot/yacysearch_location.java | 19 +++++---- 3 files changed, 90 insertions(+), 72 deletions(-) diff --git a/htroot/yacysearch.html b/htroot/yacysearch.html index ad628f9a1..e6322cb0d 100644 --- a/htroot/yacysearch.html +++ b/htroot/yacysearch.html @@ -18,8 +18,6 @@ #%env/templates/simpleheader.template%# - - ::
- - #(/display)# - #(didYouMean)# - :: -

Did you mean: #{suggestions}# #[word]# #[sep]##{/suggestions}#

- #(/didYouMean)# +

#[promoteSearchPageGreeting]#

+ +
+ + + #(searchdomswitches)#:: +
+ #(searchtext)#::  #(/searchtext)# + #(searchimage)#::  #(/searchimage)# + #(searchaudio)#::  #(/searchaudio)# + #(searchvideo)#::  #(/searchvideo)# + #(searchapp)#::#(/searchapp)# +   + more options +
+ #(/searchdomswitches)# + + + + + + + + + + + + + +
+ +#(didYouMean)#:: +

Did you mean: #{suggestions}# #[word]# #[sep]##{/suggestions}#

+#(/didYouMean)# #(searchagain)# :: diff --git a/htroot/yacysearch_location.html b/htroot/yacysearch_location.html index 50fa549a5..0f17c85c2 100644 --- a/htroot/yacysearch_location.html +++ b/htroot/yacysearch_location.html @@ -1,35 +1,54 @@ - #[former]# - YaCy '#[clientname]#': Search Page + YaCy '#[clientname]#': Location Search #%env/templates/metas.template%# - - - - - + - + #(display)# #%env/templates/simpleheader.template%# :: @@ -37,15 +56,14 @@ :: #%env/templates/embeddedheader.template%# #(/display)# -
-
-
- -
+
+
\ No newline at end of file diff --git a/htroot/yacysearch_location.java b/htroot/yacysearch_location.java index bfb385ea1..8afb780e2 100644 --- a/htroot/yacysearch_location.java +++ b/htroot/yacysearch_location.java @@ -43,14 +43,14 @@ public class yacysearch_location { final serverObjects prop = new serverObjects(); prop.put("kml", 0); - if (post == null) return prop; if (header.get(HeaderFramework.CONNECTION_PROP_EXT, "").equals("kml") || - header.get(HeaderFramework.CONNECTION_PROP_EXT, "").equals("xml") || - header.get(HeaderFramework.CONNECTION_PROP_EXT, "").equals("rss") - ) { + header.get(HeaderFramework.CONNECTION_PROP_EXT, "").equals("xml") || + header.get(HeaderFramework.CONNECTION_PROP_EXT, "").equals("rss") + ) { // generate a kml output page prop.put("kml", 1); + if (post == null) return prop; String query = post.get("query", ""); long maximumTime = post.getLong("maximumTime", 1000); int maximumRecords = post.getInt("maximumRecords", 100); @@ -95,8 +95,9 @@ public class yacysearch_location { } prop.put("kml_placemark", placemarkCounter); } catch (InterruptedException e) {} - } if (header.get(HeaderFramework.CONNECTION_PROP_EXT, "").equals("rss")) { - + } + if (header.get(HeaderFramework.CONNECTION_PROP_EXT, "").equals("rss")) { + if (post == null) return prop; String promoteSearchPageGreeting = env.getConfig(SwitchboardConstants.GREETING, ""); if (env.getConfigBool(SwitchboardConstants.GREETING_NETWORK_NAME, false)) promoteSearchPageGreeting = env.getConfig("network.unit.description", ""); String hostName = header.get("Host", "localhost"); @@ -114,12 +115,16 @@ public class yacysearch_location { prop.put("kml_contentdom", (post == null ? "text" : post.get("contentdom", "text"))); prop.put("kml_verify", (post == null) ? "true" : post.get("verify", "true")); - } else if (header.get(HeaderFramework.CONNECTION_PROP_EXT, "").equals("html")) { + } + if (header.get(HeaderFramework.CONNECTION_PROP_EXT, "").equals("html")) { final Switchboard sb = (Switchboard) env; final boolean authenticated = sb.adminAuthenticated(header) >= 2; int display = (post == null) ? 0 : post.getInt("display", 0); if (!authenticated) display = 2; prop.put("display", display); + prop.put("promoteSearchPageGreeting", sb.getConfig(SwitchboardConstants.GREETING, "")); + prop.put("promoteSearchPageGreeting.homepage", sb.getConfig(SwitchboardConstants.GREETING_HOMEPAGE, "")); + prop.put("promoteSearchPageGreeting.smallImage", sb.getConfig(SwitchboardConstants.GREETING_SMALL_IMAGE, "")); } // return rewrite properties