small update to search interface

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2020 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 19 years ago
parent 14d6e476c9
commit 41afccaf34

@ -12,7 +12,7 @@
#%env/templates/header.template%#
#(/display)#
<br>
<center><span style="font-size=12pt; font-family:Helvetica, Arial; color:#212942"><img src="/env/grafics/kaskelix.png" align="middle" alt="Kaskelix - the YaCy logo"><br>P2P WEB SEARCH</span></center><br>
<center><img src="/env/grafics/kaskelix.png" align="middle" alt="Kaskelix - the YaCy logo"></center><br>
<center>#[promoteSearchPageGreeting]#</center><br>
<form action="yacysearch.html" method="get">

@ -93,7 +93,9 @@ public class index {
// we create empty entries for template strings
final serverObjects prop = new serverObjects();
prop.put("promoteSearchPageGreeting", env.getConfig("promoteSearchPageGreeting", ""));
String promoteSearchPageGreeting = env.getConfig("promoteSearchPageGreeting", "");
if (promoteSearchPageGreeting.length() == 0) promoteSearchPageGreeting = "P2P WEB SEARCH";
prop.put("promoteSearchPageGreeting", promoteSearchPageGreeting);
prop.put("former", "");
prop.put("num-results", 0);
prop.put("excluded", 0);

@ -32,10 +32,10 @@ picPlus.src = "/env/grafics/plus.gif";
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td rowspan="2">
<img border="0" src="/env/grafics/yacy.png" align="top">
<a href="http://yacy.net/yacy/"><img border="0" src="/env/grafics/yacy.png" align="top"></a>
</td>
<td rowspan="2" width="5px"></td>
<td align="center"><h2><font color="#212942" face="Helvetica, Arial" size="2">P2P WEB SEARCH</font></h2></td>
<td align="center"><h2><font color="#212942" face="Helvetica, Arial" size="2">#[promoteSearchPageGreeting]#</font></h2></td>
<td rowspan="2" width="5px">
</td>
<td>&nbsp;</td>

@ -78,6 +78,8 @@ public class yacysearch {
boolean authenticated = sb.adminAuthenticated(header) >= 2;
int display = ((post == null) || (!authenticated)) ? 0 : post.getInt("display", 0);
String promoteSearchPageGreeting = env.getConfig("promoteSearchPageGreeting", "");
if (promoteSearchPageGreeting.length() == 0) promoteSearchPageGreeting = "P2P WEB SEARCH";
// case if no values are requested
final String referer = (String) header.get("Referer");
@ -100,6 +102,7 @@ public class yacysearch {
// we create empty entries for template strings
final serverObjects prop = new serverObjects();
prop.put("promoteSearchPageGreeting", promoteSearchPageGreeting);
prop.put("former", "");
prop.put("count", 10);
prop.put("order", plasmaSearchPreOrder.canUseYBR() ? "YBR-Date-Quality" : "Date-Quality-YBR");
@ -128,8 +131,6 @@ public class yacysearch {
}
if (sb.facilityDB != null) try { sb.facilityDB.update("zeitgeist", querystring, post); } catch (Exception e) {}
serverObjects prop = new serverObjects();
final 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");
@ -145,8 +146,9 @@ public class yacysearch {
}
String prefer = post.get("prefer", ".*");
serverObjects prop = new serverObjects();
if (post.get("cat", "href").equals("href")) {
prop.put("type", 0); // set type of result: normal link list
final TreeSet query = plasmaSearchQuery.cleanQuery(querystring);
// filter out stopwords
@ -342,6 +344,7 @@ public class yacysearch {
prop.put("depth", depth);
}
prop.put("promoteSearchPageGreeting", promoteSearchPageGreeting);
prop.put("former", post.get("search", ""));
prop.put("count", count);
prop.put("order", order);

Loading…
Cancel
Save