Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
added custom targets for media search
orbiter0dfb1ef7d217
diff --git a/htroot/yacysearchitem.html b/htroot/yacysearchitem.htmlindex 59d8c727c..4b43e8f1b 100644--- a/htroot/yacysearchitem.html+++ b/htroot/yacysearchitem.html@@ -35,15 +35,15 @@</div>#(/item)#::#{items}#- <tr class="#(col)#TableCellLight::TableCellDark#(/col)#"><td>#[name]#</td><td><a href="#[href]#">#[hrefshort]#</a></tr>+ <tr class="#(col)#TableCellLight::TableCellDark#(/col)#"><td>#[name]#</td><td><a href="#[href]#" target="#[target]#">#[hrefshort]#</a></tr>#{/items}#::#{items}#- <tr class="#(col)#TableCellLight::TableCellDark#(/col)#"><td>#[name]#</td><td><a href="#[href]#">#[hrefshort]#</a></tr>+ <tr class="#(col)#TableCellLight::TableCellDark#(/col)#"><td>#[name]#</td><td><a href="#[href]#" target="#[target]#">#[hrefshort]#</a></tr>#{/items}#::#{items}#- <tr class="#(col)#TableCellLight::TableCellDark#(/col)#"><td>#[name]#</td><td><a href="#[href]#">#[hrefshort]#</a></tr>+ <tr class="#(col)#TableCellLight::TableCellDark#(/col)#"><td>#[name]#</td><td><a href="#[href]#" target="#[target]#">#[hrefshort]#</a></tr>#{/items}##(/content)#diff --git a/htroot/yacysearchitem.java b/htroot/yacysearchitem.javaindex 231c0811e..2d516c3ac 100644--- a/htroot/yacysearchitem.java+++ b/htroot/yacysearchitem.java@@ -97,6 +97,7 @@ public class yacysearchitem {prop.put("remoteIndexCount", Formatter.number(theSearch.getRankingResult().getRemoteIndexCount(), true));prop.put("remotePeerCount", Formatter.number(theSearch.getRankingResult().getRemotePeerCount(), true));+ String target = sb.getConfig(SwitchboardConstants.SEARCH_TARGET, "_self");if (theQuery.contentdom == ContentDomain.TEXT) {// text search@@ -125,7 +126,7 @@ public class yacysearchitem {prop.putXML("content_title-xml", result.title());prop.putJSON("content_title-json", result.title());prop.putHTML("content_link", result.urlstring());- prop.putHTML("content_target", sb.getConfig(SwitchboardConstants.SEARCH_TARGET, "_self"));+ prop.putHTML("content_target", target);if (faviconURL != null && isHtml) sb.loader.loadIfNotExistBackground(faviconURL.toNormalform(true, false), 1024 * 1024 * 10);prop.putHTML("content_faviconCode", sb.licensedURLs.aquireLicense(faviconURL)); // acquire license for favicon url loadingprop.put("content_urlhash", resulthashString);@@ -224,6 +225,7 @@ public class yacysearchitem {for (final MediaSnippet ms : media) {prop.putHTML("content_items_" + c + "_href", ms.href.toNormalform(true, false));prop.putHTML("content_items_" + c + "_hrefshort", nxTools.shortenURLString(ms.href.toNormalform(true, false), urllength));+ prop.putHTML("content_items_" + c + "_target", target);prop.putHTML("content_items_" + c + "_name", shorten(ms.name, namelength));prop.put("content_items_" + c + "_col", (col) ? "0" : "1");c++;