Gossamer Forum
Home : Products : Links 2.0 : Customization :

Re: [allthingsfree] priority links mod

Quote Reply
Re: [allthingsfree] priority links mod In reply to
In Reply To:
Hello, I searched the forum and need something that will allow me to make designated links show up at the tops of their respective categories. A mod called Priority Links seems to be just what I need. However, it's not in the resource section and all forum links to it seem to be 404s. Can anyone tell me where to find it, or post the code here?



Thanks


I just went a little simpler. You could make Priorirty numeric is you want. Just change the values assigned to it. I assigned a default value of 005 just in case someone ticked me off in which case they got '000' Sly

Priority => [17, 'alpha', 3, 3, 0, '005', ''],

-------------------------------------------------------

$db_priority = 17;

-------------------------------------------------------

Priority => '005',

-------------------------------------------------------

sub build_sorthit {
# just priority
my (@unsorted) = @_;
my ($num) = ($#unsorted+1) / ($#db_cols+1);
my (%sortby, $hit, $i, @sorted, $column, $type);
for ($i = 0; $i < $num; $i++) {
$sortby{$i} = $unsorted[$db_sort_links + ($i * ($#db_cols+1))];
}
foreach $hit ( sort {
$sortby{$b} cmp $sortby{$a};
} (keys %sortby)) {
$first = ($hit * $#db_cols) + $hit;
$last = ($hit * $#db_cols) + $#db_cols + $hit;
push (@sorted, @unsorted[$first .. $last]);
}
return @sorted;
}


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
Subject Author Views Date
Thread priority links mod allthingsfree 5062 Oct 27, 2003, 6:46 AM
Post Re: [allthingsfree] priority links mod
PerlFlunkie 4981 Oct 27, 2003, 10:08 AM
Thread Re: [allthingsfree] priority links mod
esm 4986 Oct 27, 2003, 11:02 AM
Thread Re: [esm] priority links mod
allthingsfree 4973 Oct 29, 2003, 11:12 AM
Thread Re: [allthingsfree] priority links mod
esm 4997 Oct 29, 2003, 12:07 PM
Thread Re: [esm] priority links mod
allthingsfree 4959 Oct 31, 2003, 2:10 PM
Post Re: [allthingsfree] priority links mod
esm 4948 Oct 31, 2003, 2:44 PM
Post Re: [allthingsfree] priority links mod
MadridMan 4810 Feb 26, 2004, 4:24 PM