Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
- fixed Cache link (below snippet) - added 'Augmented Proxy' link below snippet - added configuration options for augmented proxy
Michael Peter Christena5cdfb91de70
diff --git a/defaults/yacy.init b/defaults/yacy.initindex 9d8ceda59..0026fec69 100644--- a/defaults/yacy.init+++ b/defaults/yacy.init@@ -749,6 +749,7 @@ search.result.show.metadata = falsesearch.result.show.parser = falsesearch.result.show.pictures = falsesearch.result.show.cache = true+search.result.show.proxy = false# search navigators: comma-separated list of default values for search navigation.# can be temporary different if search string is given with differen navigation valuesdiff --git a/htroot/ConfigPortal.html b/htroot/ConfigPortal.htmlindex 4d1a80758..4f4ab4c6e 100644--- a/htroot/ConfigPortal.html+++ b/htroot/ConfigPortal.html@@ -76,6 +76,7 @@<input type="checkbox" name="search.result.show.parser" value="true" #(search.result.show.parser)#::checked="checked"#(/search.result.show.parser)# />Parser <input type="checkbox" name="search.result.show.pictures" value="true" #(search.result.show.pictures)#::checked="checked"#(/search.result.show.pictures)# />Pictures <input type="checkbox" name="search.result.show.cache" value="true" #(search.result.show.cache)#::checked="checked"#(/search.result.show.cache)# />Cache+ <input type="checkbox" name="search.result.show.proxy" value="true" #(search.result.show.proxy)#::checked="checked"#(/search.result.show.proxy)# />Augmented Proxy</dd><dt>Show Navigation on Side-Bar</dt>diff --git a/htroot/ConfigPortal.java b/htroot/ConfigPortal.javaindex 7411d4a6a..7b1822334 100644--- a/htroot/ConfigPortal.java+++ b/htroot/ConfigPortal.java@@ -93,6 +93,7 @@ public class ConfigPortal {sb.setConfig("search.result.show.parser", post.getBoolean("search.result.show.parser", false));sb.setConfig("search.result.show.pictures", post.getBoolean("search.result.show.pictures", false));sb.setConfig("search.result.show.cache", post.getBoolean("search.result.show.cache", false));+ sb.setConfig("search.result.show.proxy", post.getBoolean("search.result.show.proxy", false));sb.setConfig(SwitchboardConstants.SEARCH_VERIFY, post.get("search.verify", "ifexist"));sb.setConfig(SwitchboardConstants.SEARCH_VERIFY_DELETE, post.getBoolean("search.verify.delete", false));@@ -134,10 +135,11 @@ public class ConfigPortal {sb.setConfig("search.app", false);sb.setConfig("search.result.show.date", true);sb.setConfig("search.result.show.size", false);- sb.setConfig("search.result.show.metadata", true);- sb.setConfig("search.result.show.parser", true);+ sb.setConfig("search.result.show.metadata", false);+ sb.setConfig("search.result.show.parser", false);sb.setConfig("search.result.show.pictures", false);- sb.setConfig("search.result.show.cache", false);+ sb.setConfig("search.result.show.cache", true);+ sb.setConfig("search.result.show.proxy", false);sb.setConfig(SwitchboardConstants.SEARCH_VERIFY, "iffresh");sb.setConfig(SwitchboardConstants.SEARCH_VERIFY_DELETE, "true");sb.setConfig("about.headline", "");@@ -168,6 +170,7 @@ public class ConfigPortal {prop.put("search.result.show.parser", sb.getConfigBool("search.result.show.parser", false) ? 1 : 0);prop.put("search.result.show.pictures", sb.getConfigBool("search.result.show.pictures", false) ? 1 : 0);prop.put("search.result.show.cache", sb.getConfigBool("search.result.show.cache", false) ? 1 : 0);+ prop.put("search.result.show.proxy", sb.getConfigBool("search.result.show.proxy", false) ? 1 : 0);prop.put("search.navigation.hosts", sb.getConfig("search.navigation", "").indexOf("hosts",0) >= 0 ? 1 : 0);prop.put("search.navigation.authors", sb.getConfig("search.navigation", "").indexOf("authors",0) >= 0 ? 1 : 0);diff --git a/htroot/Vocabulary_p.java b/htroot/Vocabulary_p.javaindex b43a7249a..2cef2b425 100644--- a/htroot/Vocabulary_p.java+++ b/htroot/Vocabulary_p.java@@ -76,7 +76,7 @@ public class Vocabulary_p {File propFile = LibraryProvider.autotagging.getVocabularyFile(discovername);while (ui.hasNext()) {DigestURI u = ui.next();- String u0 = u.toNormalform(false, false);+ String u0 = u.toNormalform(true, false);String t = u0.substring(discoverobjectspace.length());if (t.indexOf('/') >= 0) continue;int p = t.indexOf('.');@@ -99,7 +99,11 @@ public class Vocabulary_p {// check if a term was addedif (post.get("add_new", "").equals("checked") && post.get("newterm", "").length() > 0) {- vocabulary.put(post.get("newterm", ""), post.get("newsynonyms", ""), post.get("newobjectlink", ""));+ String objectlink = post.get("newobjectlink", "");+ if (objectlink.length() > 0) try {+ objectlink = new MultiProtocolURI(objectlink).toNormalform(true, false);+ } catch (MalformedURLException e) {}+ vocabulary.put(post.get("newterm", ""), post.get("newsynonyms", ""), objectlink);}// check if a term was modifieddiff --git a/htroot/yacysearchitem.html b/htroot/yacysearchitem.htmlindex de0086832..f3b5d748d 100644--- a/htroot/yacysearchitem.html+++ b/htroot/yacysearchitem.html@@ -28,8 +28,10 @@#(showSize)#:: | #[sizename]##(/showSize)##(showMetadata)#:: | <a href="api/yacydoc.html?urlhash=#[urlhash]#" target="_blank" onclick="return hs.htmlExpand(this, { objectType: 'ajax'} )">Metadata</a>#(/showMetadata)##(showParser)#:: | <a href="ViewFile.html?urlHash=#[urlhash]#&words=#[words]#&" target="_blank">Parser</a>#(/showParser)#- #(showPictures)#:: | <a href="yacysearch.html?cat=image&url=#[link]#&query=#[former]#">Pictures</a></p>#(/showPictures)#- #(showCache)#:: | <a href="yacysearch.html?cat=image&url=#[link]#&query=#[former]#">Cache</a></p>#(/showCache)#+ #(showPictures)#:: | <a href="yacysearch.html?cat=image&url=#[link]#&query=#[former]#">Pictures</a>#(/showPictures)#+ #(showCache)#:: | <a href="CacheResource_p.html?url=#[link]#" target="_blank">Cache</a>#(/showCache)#+ #(showProxy)#:: | <a href="proxy.html?url=#[link]#" target="_blank">Augmented Proxy</a>#(/showProxy)#+ </p></div>::#(item)#::<div class="thumbcontainer">diff --git a/htroot/yacysearchitem.java b/htroot/yacysearchitem.javaindex a4f313b4f..4256754f3 100644--- a/htroot/yacysearchitem.java+++ b/htroot/yacysearchitem.java@@ -34,7 +34,6 @@ import net.yacy.cora.document.Classification.ContentDomain;import net.yacy.cora.protocol.HeaderFramework;import net.yacy.cora.protocol.RequestHeader;import net.yacy.cora.protocol.RequestHeader.FileType;-import net.yacy.interaction.Interaction;import net.yacy.kelondro.data.meta.DigestURI;import net.yacy.kelondro.logging.Log;import net.yacy.kelondro.util.Formatter;@@ -130,6 +129,7 @@ public class yacysearchitem {prop.put("content_showParser", sb.getConfigBool("search.result.show.parser", true) ? 1 : 0);prop.put("content_showPictures", sb.getConfigBool("search.result.show.pictures", true) ? 1 : 0);prop.put("content_showCache", sb.getConfigBool("search.result.show.cache", true) ? 1 : 0);+ prop.put("content_showProxy", sb.getConfigBool("search.result.show.proxy", true) ? 1 : 0);prop.put("content_authorized", authenticated ? "1" : "0");final String urlhash = ASCII.String(result.hash());prop.put("content_authorized_bookmark", sb.tables.bookmarks.hasBookmark("admin", urlhash) ? "0" : "1");@@ -186,6 +186,8 @@ public class yacysearchitem {prop.put("content_urlhash", resulthashString);prop.put("content_ranking", result.ranking);prop.put("content_showMetadata_urlhash", resulthashString);+ prop.put("content_showCache_link", resultUrlstring);+ prop.put("content_showProxy_link", resultUrlstring);prop.put("content_showParser_urlhash", resulthashString);prop.put("content_urlhexhash", Seed.b64Hash2hexHash(resulthashString));prop.putHTML("content_urlname", nxTools.shortenURLString(result.urlname(), MAX_URL_LENGTH));