Skip to content

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

*) further propagation of display value (see http://forum.yacy-websuche.de/viewtopic.php?f=5&t=1536) *) removed another depreciated parameter "time" which led to ugly -UNRESOLVED_PATTERN- in URL

low01277e41da7d212
diff --git a/htroot/ViewFile.html b/htroot/ViewFile.html
index 76e30e53c..858186e6b 100644
--- a/htroot/ViewFile.html
+++ b/htroot/ViewFile.html
@@ -5,7 +5,13 @@
#%env/templates/metas.template%#
</head>
<body>
+ #(display)#
+ #%env/templates/simpleheader.template%#
+ ::
#%env/templates/header.template%#
+ ::
+ #%env/templates/embeddedheader.template%#
+ #(/display)#
<h2>View URL Content</h2>
#(error)#
@@ -32,6 +38,7 @@
</dl>
<input type="hidden" name="words" value="#[words]#" />
<input type="hidden" name="urlHash" value="#[hash]#" />
+ <input type="hidden" name="display" value="#[display]#" />
</fieldset>
</form>
:: <!-- 1 -->
diff --git a/htroot/ViewFile.java b/htroot/ViewFile.java
index a53b2b126..521ca5f4c 100644
--- a/htroot/ViewFile.java
+++ b/htroot/ViewFile.java
@@ -66,7 +66,12 @@ public class ViewFile {
public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
final serverObjects prop = new serverObjects();
- final plasmaSwitchboard sb = (plasmaSwitchboard)env;
+ final plasmaSwitchboard sb = (plasmaSwitchboard)env;
+
+ final int display = (post == null) ? 0 : post.getInt("display", 0);
+
+ prop.put("display", display);
+ prop.put("error_display", display);
if (post != null && post.containsKey("words"))
prop.putHTML("error_words", post.get("words"));
diff --git a/htroot/index.java b/htroot/index.java
index 3c9596d1b..141bd1c1f 100644
--- a/htroot/index.java
+++ b/htroot/index.java
@@ -56,7 +56,8 @@ public class index {
final boolean global = (post == null) ? true : post.get("resource", "global").equals("global");
final boolean authenticated = sb.adminAuthenticated(header) >= 2;
- final int display = (post == null) ? 0 : post.getInt("display", 0);
+ int display = (post == null) ? 0 : post.getInt("display", 0);
+ if ((display == 1) && (!authenticated)) display = 0;
final int searchoptions = (post == null) ? 0 : post.getInt("searchoptions", 0);
final String former = (post == null) ? "" : post.get("former", "");
final int count = Math.min(100, (post == null) ? 10 : post.getInt("count", 10));
diff --git a/htroot/yacysearch.html b/htroot/yacysearch.html
index f5531e650..cade54c3f 100644
--- a/htroot/yacysearch.html
+++ b/htroot/yacysearch.html
@@ -116,11 +116,11 @@ var progressbar = new Progressbar(#[results]#, document.getElementById("results"
<!-- linklist begin -->
#(resultTable)#::<table width="100%"><tr class="TableHeader"><td width="30%">Media</td><td width="70%">URL</tr>#(/resultTable)#
#{results}#
-<!--#include virtual="yacysearchitem.html?rss=false&item=#[item]#&eventID=#[eventID]#" -->
+<!--#include virtual="yacysearchitem.html?rss=false&item=#[item]#&eventID=#[eventID]#&display=#[display]#" -->
#{/results}#
#(resultTable)#::</table>#(/resultTable)#
<!-- linklist end -->
<!-- attach the bottomline -->
-<!--#include virtual="yacysearchitem.html?bottomline=true&eventID=#[eventID]#" -->
+<!--#include virtual="yacysearchitem.html?bottomline=true&eventID=#[eventID]#&display=#[display]#" -->
</body>
</html>
diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java
index 4baca3c8f..25b5b98b8 100644
--- a/htroot/yacysearch.java
+++ b/htroot/yacysearch.java
@@ -383,6 +383,7 @@ public class yacysearch {
for (int i = 0; i < theQuery.displayResults(); i++) {
prop.put("results_" + i + "_item", offset + i);
prop.put("results_" + i + "_eventID", theQuery.id(false));
+ prop.put("results_" + i + "_display", display);
}
prop.put("results", theQuery.displayResults());
prop.put("resultTable", (contentdomCode <= 1) ? "0" : "1");
diff --git a/htroot/yacysearchitem.html b/htroot/yacysearchitem.html
index 13d3f0ebd..0bb3afb1f 100644
--- a/htroot/yacysearchitem.html
+++ b/htroot/yacysearchitem.html
@@ -17,7 +17,7 @@
#(/authorized)#
<p class="snippet"><span class="snippetLoaded" id="h#[urlhash]#">#[snippet]#</span></p>
<p class="url"><a href="#[url]#" id="url#[urlhash]#" target="_parent">#[urlname]#</a></p>
- <p class="urlinfo">#[date]# | YBR-#[ybr]# | <a href="ViewFile.html?urlHash=#[urlhash]#&amp;words=#[words]#">Info</a> | <a href="yacysearch.html?cat=image&amp;url=#[url]#&amp;search=#[former]#">Pictures</a></p>
+ <p class="urlinfo">#[date]# | YBR-#[ybr]# | <a href="ViewFile.html?urlHash=#[urlhash]#&amp;words=#[words]#&amp;display=#[display]#">Info</a> | <a href="yacysearch.html?cat=image&amp;url=#[url]#&amp;search=#[former]#&amp;display=#[display]#">Pictures</a></p>
</div>
::
#{items}#
@@ -53,7 +53,7 @@
#(/rss)#
#(references)#::
<p><strong>Topwords</strong>:
-#{words}#&nbsp;<a href="yacysearch.html?search=#[newsearch]#&amp;Enter=Search&amp;count=#[count]#&amp;offset=#[offset]#&amp;resource=#[resource]#&amp;contentdom=#[contentdom]#&amp;time=#[time]#">#[word]#</a>&nbsp;|#{/words}#
+#{words}#&nbsp;<a href="yacysearch.html?search=#[newsearch]#&amp;Enter=Search&amp;count=#[count]#&amp;offset=#[offset]#&amp;resource=#[resource]#&amp;contentdom=#[contentdom]#">#[word]#</a>&nbsp;|#{/words}#
</p>
#(/references)#
#(rssreferences)#::
diff --git a/htroot/yacysearchitem.java b/htroot/yacysearchitem.java
index 98006f0e8..f1719f7f3 100644
--- a/htroot/yacysearchitem.java
+++ b/htroot/yacysearchitem.java
@@ -69,6 +69,7 @@ public class yacysearchitem {
final boolean authenticated = sb.adminAuthenticated(header) >= 2;
final int item = post.getInt("item", -1);
final boolean auth = ((String) header.get(httpRequestHeader.CONNECTION_PROP_CLIENTIP, "")).equals("localhost") || sb.verifyAuthentication(header, true);
+ final int display = (post == null) ? 0 : post.getInt("display", 0);
// default settings for blank item
prop.put("content", "0");
@@ -198,6 +199,7 @@ public class yacysearchitem {
prop.put("content_authorized_urlhash", result.hash());
prop.putHTML("content_description", result.title());
prop.putHTML("content_url", result.urlstring());
+ prop.put("content_display", display);
final int port=result.url().getPort();
yacyURL faviconURL;