[htdig] Re: Enhancement request (PR#991)

Subject: [htdig] Re: Enhancement request (PR#991)
From: Gilles Detillieux (grdetil@scrc.umanitoba.ca)
Date: Mon Jan 08 2001 - 10:22:41 PST

According to stephen@khoosys.net:
> Is it possible for you to add a feature to the config file to allow
> custom information in anchor urls in excerpts.
> e.g. I would like to add the "target" attribute to the anchor urls so
> that I can direct the matching url to another frame on the page.

A pretty quick and easy way of doing this would be to change this line in
htsearch/Display.cc's Display::hilight() method (line 1215 in unpatched
3.1.5 code):

            result << "<a href=\"" << urlanchor << "\">";

to something like:

            result << "<a href=\"" << urlanchor << "\" "
                   << config["urlanchor_parameters"] << ">";

Then, you could set this in your htsearch config file:

urlanchor_parameters: target="body"

I can think of other, more powerful and flexible ways of doing this but
they'd involve much more complicated changes to the code. This one should
do the job for you.

Gilles R. Detillieux              E-mail: <grdetil@scrc.umanitoba.ca>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930

------------------------------------ To unsubscribe from the htdig mailing list, send a message to htdig-unsubscribe@htdig.org You will receive a message to confirm this. List archives: <http://www.htdig.org/mail/menu.html> FAQ: <http://www.htdig.org/FAQ.html>

This archive was generated by hypermail 2b28 : Mon Jan 08 2001 - 10:35:13 PST