Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
Display full size preview using ViewImage Servlet.
luce2d00585e245
diff --git a/htroot/yacysearchitem.html b/htroot/yacysearchitem.htmlindex 21cc9b4a2..416b63044 100644--- a/htroot/yacysearchitem.html+++ b/htroot/yacysearchitem.html@@ -40,14 +40,10 @@</div>::#(item)#::<div class="thumbcontainer">- <a href="#[href]#" target="#[target]#" class="thumblink" onclick="return hs.expand(this)">- <!-- <img src="ViewImage.png?maxwidth=128&maxheight=128&code=#[code]#&isStatic=true" alt="#[name]#" /> -->+ <a href="#[hrefFullPreview]#" target="#[target]#" class="thumblink" onclick="return hs.expand(this)"><img src="#[hrefCache]#" width="128" height="128" alt="#[name]#" /></a><div class="highslide-caption"><a href="#[href]#" target="#[target]#">#[name]#</a><br /><a href="#[source]#" target="#[target]#">#[sourcedom]#</a></div>- <!--- <div class="TableCellDark"><a href="#[href]#">#[name]#</a><br />#[attr]#</div>- --></div>#(/item)#::#(item)#::<tr class="#(col)#TableCellLight::TableCellDark#(/col)#"><td>#[name]#</td><td><a href="#[href]#" target="#[target]#">#[hrefshort]#</a></tr>#(/item)#diff --git a/htroot/yacysearchitem.java b/htroot/yacysearchitem.javaindex a38cc523c..492e4e314 100644--- a/htroot/yacysearchitem.java+++ b/htroot/yacysearchitem.java@@ -315,8 +315,12 @@ public class yacysearchitem {final String target = sb.getConfig(imageUrlstring.matches(target_special_pattern) ? SwitchboardConstants.SEARCH_TARGET_SPECIAL : SwitchboardConstants.SEARCH_TARGET_DEFAULT, "_self");final String license = URLLicense.aquireLicense(image.imageUrl); // this is just the license key to get the image forwarded through the YaCy thumbnail viewer, not an actual lawful license- //sb.loader.loadIfNotExistBackground(image.imageUrl, 1024 * 1024 * 10, null, ClientIdentification.yacyIntranetCrawlerAgent);- prop.putHTML("content_item_hrefCache", "ViewImage." + (!imageUrlExt.isEmpty() && "gif.png.svg".contains(imageUrlExt) ? imageUrlExt : "png") + "?maxwidth=128&maxheight=128&code="+license+"&isStatic=true&quadratic=&url=" + imageUrlstring);+ /* Image format ouput for ViewImage servlet : default is png, except with gif and svg images */+ final String viewImageExt = !imageUrlExt.isEmpty() && "gif.png.svg".contains(imageUrlExt) ? imageUrlExt : "png";+ /* Thumb URL */+ prop.putHTML("content_item_hrefCache", "ViewImage." + viewImageExt + "?maxwidth=128&maxheight=128&code="+license+"&isStatic=true&quadratic=&url=" + imageUrlstring);+ /* Full size preview URL */+ prop.putHTML("content_item_hrefFullPreview", "ViewImage." + viewImageExt + "?code="+license+"&isStatic=true&url=" + imageUrlstring);prop.putHTML("content_item_href", imageUrlstring);prop.putHTML("content_item_target", target);prop.put("content_item_code", license);