favicons ;)

looks real nice

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3838 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
allo 18 years ago
parent 7921f07c9d
commit d8951422f9

@ -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]#&amp;words=#[words]#">Info</a> | <a href="yacysearch.html?cat=image&amp;url=#[url]#&amp;search=#[former]#">Pictures</a></p>

@ -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));

Loading…
Cancel
Save