Re: [greenstone-users] -nolinks

From Michael Dewsnip
DateWed, 05 May 2004 15:13:08 +1200
Subject Re: [greenstone-users] -nolinks
In-Reply-To (20040504040933-56044-qmail-web40508-mail-yahoo-com)

What does the source of one of your raw HTML files (ie. as viewed from a web-browser) look like?

Does it have links to images like:
    <a href="image.jpg">This is a link to an image</a>

Or thumbnail type links like:
    <a href="image.jpg"><img src="image-small.jpg"></a>

If you've got the first case then you should be fine, provided that when you save the HTML file the relative links are converted to absolute links (ie. <a href="http://.../image.jpg">).

If you've got the second case, it turns out there is a bug in HTMLPlug which causes the links to the images to be invalid. With the "-nolinks" option on, instead of getting
    <a href="http://.../image.jpg"><img src=".../image-small.jpg"></a>

you get
    <a href="http://.../image.jpg"><a name="image.jpg"><img src=".../image-small.jpg"></a>

The anchor <a name="image.jpg"> causes the HTML to be invalid and you won't get a link in the web browser. You can easily hack a fix by editing At the end of the replace_images function (approx line 350) it says
    return $anchor_name . $front . $img_file . $back;

Change this to
    return $front . $img_file . $back;

and re-import and re-build your collection.

I'm not entirely sure that this will solve your problem (your description doesn't quite fit), but this was what stopped me from doing what I think you're describing. Please get back to me if you still have problems.



Phu Nguyen wrote:

Hi. I'd like to include webpages with links to images that reside on the web. I searched through the archives and found that I would have to set -nolinks for the htmlplug in order to do this. Instead of a link to the image, the build process produced this: <img src="/collect/d/index/assoc/HASHecfd.dir/photo2.jpg" width="448" height="336"> Any help would be apprecciated.

Phu Nguyen, MLIS student
University of South Carolina

Do you Yahoo!?
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "' type='text/javascript'%3E%3C/script%3E")); textlink/evt=23983/*">Win a $20,000 Career Makeover at Yahoo! HotJobs

_______________________________________________ greenstone-users mailing list