Subject: Re: [htdig] Maximum url character size
Date: Tue Sep 19 2000 - 14:26:31 PDT
This is from a while back.....
On Thu, 7 Sep 2000, Geoff Hutchison wrote:
>On Thu, 7 Sep 2000, Aaron Avery wrote:
>> of the lack of spaces.) Is there currently an option in htdig that will
>> limit a length of the url displayed? ( i.e.
>No, though you can certainly edit the code in htsearch/Display.cc
I had a look at this, and was about to make the changes (it was ugly
though, it would require something like:
vars.Add("SHORTURL", new String(shorturl));
and something eqiv to:
chop shorturl, and then use $(SHORTURL) in your long.html file....
I'm still not sure if it would have worked.
my long.html file is as so:
<!-- ITEM -->
<P><SPAN CLASS="subhead"><A HREF="$(URL)">$(TITLE)</A></SPAN>
<BR><A HREF="$(URL)" CLASS="smalltype">
var DisplayedURL = '$(URL)';
if (DisplayedURL.length > 64)
DisplayedURL = DisplayedURL.substring(0,48) +
'<b><tt> ... </tt></b>' +
DisplayedURL.substring((DisplayedURL.length - 10), DisplayedURL.length);
DisplayedURL = DisplayedURL.substring(7, DisplayedURL.length);
<!-- /ITEM -->
The nice thing about this is that I have also removed the http:// from the
URL to match the style of the rest of our web pages.
To see this in action, go to http://www.mcgill.ca and perform a search
anywhere. A search for the word 'test' will find URLs that are longer than
Hope this helps.
Christopher Murtagh Webmaster / Web Communications Group McGill University Montreal, Quebec Canada
------------------------------------ To unsubscribe from the htdig mailing list, send a message to firstname.lastname@example.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 : Tue Sep 19 2000 - 14:26:58 PDT