Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
favicons ;) looks real nice
allod8951422f985
diff --git a/htroot/yacysearch.html b/htroot/yacysearch.htmlindex 7d1b8acc4..b73556ef1 100644--- a/htroot/yacysearch.html+++ b/htroot/yacysearch.html@@ -150,7 +150,7 @@ document.getElementById("Enter").value = "search again - catch up more links";#(/recommend)#</div>#(/authorized)#- <h4 class="linktitle"><a href="#[url]#" target="_parent">#[description]#</a></h4>+ <h4 class="linktitle"><img src="#[favicon]#" width="16" height="16" /><a href="#[url]#" target="_parent">#[description]#</a></h4><p class="snippet"><span class="#(snippet)#snippetLoading::snippetLoaded#(/snippet)#" id="h#[urlhash]#">#(snippet)#loading snippet ...::#[text]##(/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]#&words=#[words]#">Info</a> | <a href="yacysearch.html?cat=image&url=#[url]#&search=#[former]#">Pictures</a></p>diff --git a/htroot/yacysearch.java b/htroot/yacysearch.javaindex e3a479ead..da07b861f 100644--- a/htroot/yacysearch.java+++ b/htroot/yacysearch.java@@ -323,6 +323,12 @@ public class yacysearch {prop.put("type_results_" + i + "_authorized_urlhash", result.getUrlhash());prop.put("type_results_" + i + "_description", result.getUrlentry().comp().title());prop.put("type_results_" + i + "_url", result.getUrl());+ try{+ URL url=new URL(result.getUrl());+ int port=url.getPort();+ //TODO: parse <link rel="favicon" /> ...+ prop.put("type_results_" + i + "_favicon", url.getProtocol()+"://"+url.getHost()+((port!=-1)?String.valueOf(port)+":":"")+"/favicon.ico");+ }catch(MalformedURLException e){}prop.put("type_results_" + i + "_urlhash", result.getUrlhash());prop.put("type_results_" + i + "_urlhexhash", yacySeed.b64Hash2hexHash(result.getUrlhash()));prop.put("type_results_" + i + "_urlname", nxTools.shortenURLString(result.getUrlname(), 120));