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


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
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