Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

templates for embedded display. try: http://localhost:8080/yacysearch.html?display=2&input=0&search=yacy&resource=local

orbiter4eecf0bb124d
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 @@
+</div>
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 @@
+<div style="clear:center; padding:10px;">
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)#
<h2 class="yacy">
@@ -113,7 +115,9 @@
#(display)#
#%env/templates/simplefooter.template%#
::
- #%env/templates/footer.template%#
+ #%env/templates/footer.template%#
+ ::
+ #%env/templates/embeddedfooter.template%#
#(/display)#
</body>
</html>
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)#
+ ::
<form class="search small" action="yacysearch.html" method="get" accept-charset="UTF-8">
<p class="yacylogo"><a href="http://yacy.net/yacy/" class="yacylogo"><img src="/env/grafics/yacy.png" alt="yacy" /></a></p>
<h2>#[promoteSearchPageGreeting]#</h2>
@@ -53,7 +57,8 @@
</fieldset>
</div>
</form>
-
+#(/input)#
+
<script type="text/javascript">
document.getElementById("Enter").value = "search again - catch up more links";
</script>
@@ -199,14 +204,17 @@ document.getElementById("Enter").value = "search again - catch up more links";
</table>
#(/type)#
-<p class="info">
-YaCy is a GPL'ed project with the target of implementing a P2P-based global search engine.<br />
-Architecture (C) by Michael Peter Christen, <img src="/env/grafics/mcemailh.gif" alt="Mail-Adresse von Michael Peter Christen" />
-</p>
+
#(display)#
+ <p class="info">
+ YaCy is a GPL'ed project with the target of implementing a P2P-based global search engine.<br />
+ Architecture (C) by Michael Peter Christen, <img src="/env/grafics/mcemailh.gif" alt="Mail-Adresse von Michael Peter Christen" />
+ </p>
#%env/templates/simplefooter.template%#
::
#%env/templates/footer.template%#
+ ::
+ #%env/templates/embeddedfooter.template%#
#(/display)#
</body>
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<linkcount; i++)
prop.put("type_results_" + i + "_authorized", (authenticated) ? 1 : 0);
- prop.putASIS("promoteSearchPageGreeting", promoteSearchPageGreeting);
- prop.put("former", post.get("search", ""));
- prop.put("count", count);
- prop.put("order", order);
- prop.put("resource", (global) ? "global" : "local");
- prop.put("time", searchtime / 1000);
- prop.put("urlmaskfilter", urlmask);
- prop.put("prefermaskfilter", prefermask);
prop.put("display", display);
- prop.put("indexof", (indexof) ? "on" : "off");
- prop.put("constraint", constraint.exportB64());
- prop.put("contentdom", contentdomString);
- prop.put("contentdomCheckText", (contentdomCode == plasmaSearchQuery.CONTENTDOM_TEXT) ? 1 : 0);
- prop.put("contentdomCheckAudio", (contentdomCode == plasmaSearchQuery.CONTENTDOM_AUDIO) ? 1 : 0);
- prop.put("contentdomCheckVideo", (contentdomCode == plasmaSearchQuery.CONTENTDOM_VIDEO) ? 1 : 0);
- prop.put("contentdomCheckImage", (contentdomCode == plasmaSearchQuery.CONTENTDOM_IMAGE) ? 1 : 0);
- prop.put("contentdomCheckApp", (contentdomCode == plasmaSearchQuery.CONTENTDOM_APP) ? 1 : 0);
-
+ prop.putASIS("input_promoteSearchPageGreeting", promoteSearchPageGreeting);
+ prop.put("input_former", post.get("search", ""));
+ prop.put("input_count", count);
+ prop.put("input_resource", (global) ? "global" : "local");
+ prop.put("input_time", searchtime / 1000);
+ prop.put("input_urlmaskfilter", urlmask);
+ prop.put("input_prefermaskfilter", prefermask);
+ prop.put("input_indexof", (indexof) ? "on" : "off");
+ prop.put("input_constraint", constraint.exportB64());
+ prop.put("input_contentdom", contentdomString);
+ prop.put("input_contentdomCheckText", (contentdomCode == plasmaSearchQuery.CONTENTDOM_TEXT) ? 1 : 0);
+ prop.put("input_contentdomCheckAudio", (contentdomCode == plasmaSearchQuery.CONTENTDOM_AUDIO) ? 1 : 0);
+ prop.put("input_contentdomCheckVideo", (contentdomCode == plasmaSearchQuery.CONTENTDOM_VIDEO) ? 1 : 0);
+ prop.put("input_contentdomCheckImage", (contentdomCode == plasmaSearchQuery.CONTENTDOM_IMAGE) ? 1 : 0);
+ prop.put("input_contentdomCheckApp", (contentdomCode == plasmaSearchQuery.CONTENTDOM_APP) ? 1 : 0);
+ prop.put("input", input);
+
// return rewrite properties
return prop;
}