* extend opensearchdescription to support compare_yacy.html

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5324 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
f1ori 16 years ago
parent 7e1fe05e3c
commit ae80f3e6a5

@ -2,6 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>YaCy '#[clientname]#': Websearch Comparison</title>
<link rel="search" type="application/opensearchdescription+xml" title="Compare Yacy on '#[clientname]#'" href="opensearchdescription.xml?compare_yacy=true" />
#%env/templates/metas.template%#
</head>
<body>

@ -42,7 +42,13 @@ public class opensearchdescription {
String thisaddress = (String) header.get("Host", "localhost");
if (thisaddress.indexOf(":") == -1) thisaddress += ":" + serverCore.getPortNr(env.getConfig("port", "8080"));
int compareyacy = 0;
if(post != null && post.get("compare_yacy", "false").equals("true"))
compareyacy = 1;
final serverObjects prop = new serverObjects();
prop.put("compareyacy", compareyacy);
prop.putXML("compareyacy_thisaddress", thisaddress);
prop.putXML("thisaddress", thisaddress);
prop.putXML("SearchPageGreeting", promoteSearchPageGreeting);
prop.putXML("clientname", sb.webIndex.seedDB.mySeed().getName());

File diff suppressed because one or more lines are too long

@ -4,6 +4,7 @@
<title>YaCy '#[clientname]#': Search Page</title>
#%env/templates/metas.template%#
<link rel="alternate" type="application/rss+xml" title="Search for #[input_former]#" href="yacysearch.rss?search=#[input_former]#" />
<link rel="search" type="application/opensearchdescription+xml" title="YaCy Search on '#[clientname]#'" href="opensearchdescription.xml" />
<script type="text/javascript" src="/js/ajax.js"></script>
<script type="text/javascript" src="/js/xml.js"></script>
<script type="text/javascript" src="/js/yacysearch.js"></script>

Loading…
Cancel
Save