From 4eecf0bb124d54a0bb6cb84ffa2f774da61505dc Mon Sep 17 00:00:00 2001 From: orbiter Date: Tue, 10 Apr 2007 14:28:04 +0000 Subject: [PATCH] templates for embedded display. try: http://localhost:8080/yacysearch.html?display=2&input=0&search=yacy&resource=local git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3557 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/env/templates/embeddedfooter.template | 1 + htroot/env/templates/embeddedheader.template | 1 + htroot/index.html | 8 +- htroot/yacysearch.html | 18 +++-- htroot/yacysearch.java | 85 ++++++++++---------- 5 files changed, 63 insertions(+), 50 deletions(-) create mode 100644 htroot/env/templates/embeddedfooter.template create mode 100644 htroot/env/templates/embeddedheader.template diff --git a/htroot/env/templates/embeddedfooter.template b/htroot/env/templates/embeddedfooter.template new file mode 100644 index 000000000..04f5b8449 --- /dev/null +++ b/htroot/env/templates/embeddedfooter.template @@ -0,0 +1 @@ + diff --git a/htroot/env/templates/embeddedheader.template b/htroot/env/templates/embeddedheader.template new file mode 100644 index 000000000..fb3f8c7b9 --- /dev/null +++ b/htroot/env/templates/embeddedheader.template @@ -0,0 +1 @@ +
diff --git a/htroot/index.html b/htroot/index.html index 98af9fe6a..46006cd36 100644 --- a/htroot/index.html +++ b/htroot/index.html @@ -10,7 +10,9 @@ #(display)# #%env/templates/simpleheader.template%# :: - #%env/templates/header.template%# + #%env/templates/header.template%# + :: + #%env/templates/embeddedheader.template%# #(/display)#

@@ -113,7 +115,9 @@ #(display)# #%env/templates/simplefooter.template%# :: - #%env/templates/footer.template%# + #%env/templates/footer.template%# + :: + #%env/templates/embeddedfooter.template%# #(/display)# diff --git a/htroot/yacysearch.html b/htroot/yacysearch.html index 48268d5c3..19d722f81 100644 --- a/htroot/yacysearch.html +++ b/htroot/yacysearch.html @@ -16,8 +16,12 @@ #%env/templates/simpleheader.template%# :: #%env/templates/header.template%# + :: + #%env/templates/embeddedheader.template%# #(/display)# +#(input)# + ::

- +#(/input)# + @@ -199,14 +204,17 @@ document.getElementById("Enter").value = "search again - catch up more links"; #(/type)# -

-YaCy is a GPL'ed project with the target of implementing a P2P-based global search engine.
-Architecture (C) by Michael Peter Christen, Mail-Adresse von Michael Peter Christen -

+ #(display)# +

+ YaCy is a GPL'ed project with the target of implementing a P2P-based global search engine.
+ Architecture (C) by Michael Peter Christen, Mail-Adresse von Michael Peter Christen +

#%env/templates/simplefooter.template%# :: #%env/templates/footer.template%# + :: + #%env/templates/embeddedfooter.template%# #(/display)# diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java index 8df89db46..3fb725a63 100644 --- a/htroot/yacysearch.java +++ b/htroot/yacysearch.java @@ -93,6 +93,7 @@ public class yacysearch { boolean authenticated = sb.adminAuthenticated(header) >= 2; int display = ((post == null) || (!authenticated)) ? 0 : post.getInt("display", 0); + int input = (post == null) ? 0 : post.getInt("input", 1); String promoteSearchPageGreeting = env.getConfig("promoteSearchPageGreeting", ""); if (promoteSearchPageGreeting.length() == 0) promoteSearchPageGreeting = "P2P WEB SEARCH"; @@ -119,31 +120,31 @@ public class yacysearch { // we create empty entries for template strings final serverObjects prop = new serverObjects(); - prop.putASIS("promoteSearchPageGreeting", promoteSearchPageGreeting); - prop.put("former", ""); - prop.put("count", 10); - prop.put("order", plasmaSearchPreOrder.canUseYBR() ? "YBR-Date-Quality" : "Date-Quality-YBR"); - prop.put("resource", "global"); - prop.put("time", 6); - prop.put("urlmaskfilter", ".*"); - prop.put("prefermaskfilter", ""); - prop.put("indexof", "off"); - prop.put("constraint", plasmaSearchQuery.catchall_constraint.exportB64()); - prop.put("cat", "href"); - prop.put("depth", "0"); - prop.put("type", 0); - prop.put("type_excluded", 0); - prop.put("type_num-results", 0); - prop.put("type_combine", 0); - prop.put("type_resultbottomline", 0); - prop.put("type_results", ""); prop.put("display", display); - prop.put("contentdom", "text"); - prop.put("contentdomCheckText", 1); - prop.put("contentdomCheckAudio", 0); - prop.put("contentdomCheckVideo", 0); - prop.put("contentdomCheckImage", 0); - prop.put("contentdomCheckApp", 0); + prop.putASIS("input_promoteSearchPageGreeting", promoteSearchPageGreeting); + prop.put("input_former", ""); + prop.put("input_count", 10); + prop.put("input_resource", "global"); + prop.put("input_time", 6); + prop.put("input_urlmaskfilter", ".*"); + prop.put("input_prefermaskfilter", ""); + prop.put("input_indexof", "off"); + prop.put("input_constraint", plasmaSearchQuery.catchall_constraint.exportB64()); + prop.put("input_cat", "href"); + prop.put("input_depth", "0"); + prop.put("input_type", 0); + prop.put("input_type_excluded", 0); + prop.put("input_type_num-results", 0); + prop.put("input_type_combine", 0); + prop.put("input_type_resultbottomline", 0); + prop.put("input_type_results", ""); + prop.put("input_contentdom", "text"); + prop.put("input_contentdomCheckText", 1); + prop.put("input_contentdomCheckAudio", 0); + prop.put("input_contentdomCheckVideo", 0); + prop.put("input_contentdomCheckImage", 0); + prop.put("input_contentdomCheckApp", 0); + prop.put("input", 0); return prop; } @@ -157,7 +158,6 @@ public class yacysearch { if (sb.facilityDB != null) try { sb.facilityDB.update("zeitgeist", querystring, post); } catch (Exception e) {} int count = Integer.parseInt(post.get("count", "10")); - final String order = post.get("order", plasmaSearchPreOrder.canUseYBR() ? "YBR-Date-Quality" : "Date-Quality-YBR"); boolean global = (post == null) ? true : post.get("resource", "global").equals("global"); final boolean indexof = post.get("indexof","").equals("on"); final long searchtime = 1000 * Long.parseLong(post.get("time", "10")); @@ -398,7 +398,6 @@ public class yacysearch { prop.put("type_combine_words_" + hintcount + "_word", word); prop.put("type_combine_words_" + hintcount + "_newsearch", post.get("search", "").replace(' ', '+') + "+" + word); prop.put("type_combine_words_" + hintcount + "_count", count); - prop.put("type_combine_words_" + hintcount + "_order", order); prop.put("type_combine_words_" + hintcount + "_resource", ((global) ? "global" : "local")); prop.put("type_combine_words_" + hintcount + "_time", (searchtime / 1000)); } @@ -489,24 +488,24 @@ public class yacysearch { for (int i=0; i