Gossamer Forum
Home : Products : Gossamer Links : Discussions :

What file deals with bolding??

Quote Reply
What file deals with bolding??
I am getting really frustrated, can anyone tell me which cgi or pm file that deals with bolding in search result?
Quote Reply
Re: [flybuzz] What file deals with bolding?? In reply to
I thought I already did tell you in your other thread dude!

SEARCH.PM in the Admin/User folder.

You're looking for this piece of code:

Code:
# If we are bolding the results, let's bold them.
if ($CFG->{search_bold}) {
my $tempquery = $args->{query};
$tempquery =~ s/[+\-"']//g;
my @terms = split /\s/, $tempquery;
foreach my $term (@terms) {
next unless ($term);
$term =~ s/^\s*|\s*$//;
if ($term =~ s/(.+)\*(.*)/$1/) {
push @terms, $2 if ($2);
$term = $1;
}
# next unless ((length $term) > 2);
$term = $IN->html_escape($term);
$link_results =~ s,(<[^>]+>)|(&[\w-]+;)|(\Q$term\E),defined($1 || $2) ? $1 || $2 : "<B>$3</B>",gie if ($
$category_results =~ s,(<[^>]+>)|(&[\w-]+;)|(\Q$term\E),defined($1 || $2) ? $1 || $2 : "<B>$3</B>",gie if ($
}
}

Last edited by:

ryel01: Aug 2, 2004, 10:15 PM