Gossamer Forum
Home : Products : Links 2.0 : Customization :

Customizing Search Results.

Quote Reply
Customizing Search Results.
Can some one please tell me how can I add numbers to my search results

so it would be:



1 link



2 link

and so on, so if there are 20 links found it would show the link number



thanks
Quote Reply
Re: [intellie] Customizing Search Results. In reply to
In search.cgi, try replacing;

Code:
# Check to see if the link matches.
$match = 0; $andmatch = 1;
if ($regexp) {
FIELD: foreach $field (@search_fields) {
$_ = $values[$field];
$or_match ?
($match = $match || &{$regexp}) :
($match = &{$regexp});
last FIELD if ($match);
}
}

to;

Code:
# Check to see if the link matches.
$match = 0; $andmatch = 1; $count = 0;
if ($regexp) {
FIELD: foreach $field (@search_fields) {
$_ = $values[$field];
$count++; # mod to count the links...
$or_match ?
($match = $match || &{$regexp}) :
($match = &{$regexp});
last FIELD if ($match);
}
}

See how/if that works (untested)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [intellie] Customizing Search Results. In reply to
Here's a thread that might help, too:

http://www.gossamer-threads.com/...ory%20results;#86368


Leonard
aka PerlFlunkie