From d8951422f985d978cdb6f29208ac721e2089d93c Mon Sep 17 00:00:00 2001 From: allo Date: Fri, 8 Jun 2007 19:13:28 +0000 Subject: [PATCH] favicons ;) looks real nice git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3838 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/yacysearch.html | 2 +- htroot/yacysearch.java | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/htroot/yacysearch.html b/htroot/yacysearch.html index 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)# #(/authorized)# -

#[description]#

+

#[description]#

#(snippet)#loading snippet ...::#[text]##(/snippet)#

#[urlname]#

#[date]# | YBR-#[ybr]# | Info | Pictures

diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java index 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 ... + 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));