Gossamer Forum
Home : Products : DBMan : Discussions :

URL bolding problem - www.<b>keyword</b>.com

Quote Reply
URL bolding problem - www.<b>keyword</b>.com
I just found that if the keyword is in the URL, bolding is being applied to the URL as well as the title/description which makes the URL invalid. I am searching by keywords, and if someone searches for kayak for example, if a site www.kayakboats.com exists, the URL being returned is www.<b>kayak</b>boats.com which obviously is wrong...

Quote Reply
Re: URL bolding problem - www.<b>keyword</b>.com In reply to
In html.pl, in sub html_record, add the following lines after my (%rec) = @_;:

$rec{'URL'} =~ s/<B>//;
$rec{'URL'} =~ s/<\/B>//;

(assuming the field name is called "URL")

- Mark

Astro-Boy!!
http://www.zip.com.au/~astroboy/
Quote Reply
Re: URL bolding problem - www.<b>keyword</b>.com In reply to
I'm not absolutely certain on this, please backup your file just in case :-)

It looks like the bolding is being called in this line (about line 377) in db.cgi

($in{'ww'}) and ($tmpreg = "\\b$tmpreg\\b");

Try changing it to
($in{'ww'}) and ($tmpreg = "\\$tmpreg\\");
and see if that corrects your record display.

Mark beat me - by a long shot! Looks like his fix is a whole lot better than my suggestion too :-) Better use his.
Quote Reply
Re: URL bolding problem - www.<b>keyword</b>.com In reply to
Thanks again! Works like a charm Smile

Quote Reply
Re: URL bolding problem - www.<b>keyword</b>.com In reply to
What if the url is not a field but just is a part of text in let say the field Discription?

Foxx

Quote Reply
Re: URL bolding problem - www.<b>keyword</b>.com In reply to
Hello Foxx, you might try reviewing a mod which is listed in the Resources area, Resources >>> DBMan >>> Modifications I believe the AutoURL 2.0 mod may do what you need.