View Full Version : Images in search results
warmtoast
02-21-2005, 02:51 PM
Hi,
I am thinking of using zoom for an artists website that eventually will include a large amount of photographs, illustrations and desktop wallpapers.
I would like to be able to use the search engine to search all the picture files on my site but am wondering if it would be possible to tell the script to bring up a thumbnail to go with the search result.
For example if someone searches for photographs of flowers then when the search result comes up, it is accompanied by a thumbnail of that picture (i.e. a thumbnail of a rose)
many thanks for your help in advance :D
Josie
The current version of Zoom V4 does not have any support for displaying thumbnails or images with search results.
If you are familiar with scripting (or know someone who is), you can modify either the PHP, ASP or JS scripts to do this. You would have to specify a list of images to represent each page, and display them with their corresponding search results in the list.
We also provide custom development. If you are interested in this, email us (see our Contact Us page) with your specific requirements and we can give you a quote.
UPDATE: 15/Sept/06: Version 5 of Zoom will have support for image searching and thumbnails (http://www.wrensoft.com/forum/showthread.php?t=1029).
wnoordhoek
02-23-2005, 06:29 AM
couldnt this be solved by putting .desc files in the same dir as the pictures
(didnt look into the .desc facility so maybe zoom explicitly uses them for pdf's?)
".desc" files can only be used for file formats which you have plugin support for. This includes PDF, DOC, PPT, XLS, etc. Images do not currently have plugin support. However, even if it did, this would only allow you to search images by some additional criteria (keywords, description, etc.). It would not be able to display thumbnails in the search result listing.
Anonymous
04-07-2005, 01:55 PM
Can someone specify the location where to put the thumbnail information for the result.
Example,
If its a word document it should show a thumbnail of Word....
pdf... xls... ppt... etc...
I'm using the asp script.
Thanks
Harry
wrensoft
04-07-2005, 08:42 PM
The current version of Zoom (Version 4.0) doesn't display thumbnails. You would need to add some additional code in the ASP script to do this yourself.
-----
David
Anonymous
04-08-2005, 12:00 PM
Isn't it easy to create a addon for this so the company who have a professional version can use it.
soatley
04-08-2005, 04:26 PM
This is just a thought, but what if you were to include a html tag in the meta description in the .desc file?
<meta type="description" content="<a href='www.theurl.com'>">
Then (maybe) when Zoom reads the description and displays it in the search results, the browser should render it as HTML.
This is just air-code but it might possibly work.
Shawn
wrensoft
04-08-2005, 10:36 PM
Doing true thumbnails of the pages indexed would take a lot of work and would have other side effects, like
1) Vastly increasing the size of the index files (becuase the thumbnail images need to be stored somewhere)
2) Slowing down the indexing process becuase you need to render the image, resize it and store it. In additional we would need to download all the image files on a page in order to fully render the page. Slowing the indexing still further. At the moment Zoom doesn't download images file, meaning the text is indexed more quickly.
3) Slowing down the display of the result pages. If you had 10 results per page, this would be 10 additional images to download per page.
However there are several intermediate solutions that require less work. Like having only half a dozen icons (not thumnails) that correspond to a particaular document type (e.g. a Word icon, PDF icon, etc).
We will probably implement one of these simpler options in V4.1 or V5.
In the meantime the only other solution is to write your own code, or pay us some $$ to create some custom software to exact match your requirements.
-------
David
Anonymous
11-10-2005, 05:56 PM
around line 1279 in the search.php file replace line
print "<div class=\"result_title\">";
with
// !!changed print "<div class=\"result_title\">";
preg_match("/\.[^\.\/]+$/", strtolower($urls[$ipage]), $my_filetype);
if (trim($my_filetype[0])=='.pdf') {
print "<div class=\"result_title\"><img src=\"/orgdirs/hr/images/icon_pdf.gif\" align=\"absmiddle\">";
} else if (trim($my_filetype[0])=='.doc') {
print "<div class=\"result_title\"><img src=\"/orgdirs/hr/images/icon_word.gif\" align=\"absmiddle\">";
} else {
print "<div class=\"result_title\">";
}
wrensoft
11-10-2005, 06:53 PM
Thanks for the post.
For other readers. This will only work PDF & Word docs and will only display an icon. (Not a thumbnail).
It will also only work in PHP, (not ASP, Javascript nor CGI) and you need to careful about the line number as it will change from one software release to the next.
You'll also need to customise the suggested customisation to insert correct URLs to your own images.
-----
David
baker_9900
05-19-2006, 05:25 PM
Or paste this bit of code over what you see in the line of code in search .asp
if (DisplayMetaDesc = 1) then
' print meta description
if (Len(descriptions(ipage)) > 2) then
Response.Write("<div class=""description""><img src='http://www.yoururl.com/")
if (Highlighting = 1) then
PrintHighlightDescription(descriptions(ipage))
else
Response.Write(descriptions(ipage))
end if
Response.Write("'></div>") & VbCrlf
end if
end if
then in your description meta tag, or the 'subject line' of the properties of the word document, as i am using, place a file name of your choice such as my.name.jpg. save the jpg in the same directory and you are good to go.
The problem with this is you need to copy and paste that code AFTER EVERY time zoom indexes. I am not smart enough to figure out how to automate this...(help?)
wrensoft
05-19-2006, 11:59 PM
We are going to include some support for images in V5 of Zoom.
E-mail us if you want to try an early beta release.
This will hopefully avoid the customisation work as described above.
If you do really need to customise the script then you can set the location of your own script from the Advanced tab in the Zoom configuration window.
----
David
Powered by vBulletin® Version 4.1.12 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.