Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Creating links to a Glossary - Magic bullet wanted

My site has over 1000 articles, and a glossary explaining many of the keywords used throughout.

Ideally each such keyword occurance should have a link to the corresponding Glossary article.    Alas, to create those links manually would be a royal pain - 5 links per article on average (conservative estimate) would net 5000 links to be defined overall...

Could this be automated... perhaps a little routine that scans the keywords defined, and adds a link whereever that keyword is used within an article... or am I dreaming?

Has anyone done something similar?

Vic
Sunday, October 05, 2003

I think I've seen some javascript/DHTML that does this, but it probably requires a lot of complex scripting... It was on a site where you pulled in their javascript, and any word they had in their library would become linked on your page back to theirs. Some sort of mega blogging site if I recall correctly.

Might be too complex for something like this to appear on hotscripts, but it might be worth a look. Then again, a .js with a 5,000 word array might take longer to load than the page itself, I really don't know how they did it.

Mark T A W .com
Sunday, October 05, 2003

Mark,


thanks, much appreciated, I'll give it a thought. 

I was thinking about a one-off routine that automatically scanned the glossary, and then inserted the required links directly into CityDesk articles. 

Perhaps that would be in CopyBoy's domain <shameless hint!>...

Vic
Monday, October 06, 2003

Maybe a regular-expression based post-processor that found any occurance of a certain word - be careful to ensure that these are outside of any HTML or CSS tags - and replaced them with a link to the glossary.

Mark T A W .com
Monday, October 06, 2003

Yes that sounds like it!

Vic
Monday, October 06, 2003

A trip to hotscripts.com turned up this:

http://www.wordscan.com/

It's ASP based but it looks like it does what you want it to do. Though it looks like for this to work your glossary should be automaticaly generated as well, though a single file with a link.htm#term style link might work as well. I don't know if the registered version will batch run on files, or if you still have to do it a page at a time.

Mark T A W .com
Monday, October 06, 2003

Mark,


thanks again.

Have skimmed the documentation available online. Looks like this software would require a list of all Glossary keywords on every page, and a "packaging up" of each pages' actual output text into a parameter (not sure whether or not this parameter is allowed to contain HTML tags) of a function call.  Not a bad idea, but perhaps not too practical for a large glossary.

Vic
Tuesday, October 07, 2003

*  Recent Topics

*  Fog Creek Home