Gossamer Forum
Home : Products : Links 2.0 : Customization :

Re: Sorting Links (Yes I know...Not again!!) :-D

Quote Reply
Re: Sorting Links (Yes I know...Not again!!) :-D In reply to
OK, I have searched and I have looked for the priority logo in the resources section (file not found error). I found this thread and I am trying to make it work, but....

So far I added the priority line to links.def

I also added VickieB's code with Alex's changes. When I went to my admin panel I had the blank block for the priority section. What do I need to enter into the block to make it sort to the top of a list. Itried to enter priority, but it was to big. I entered "Yes" ,but it seemed to not get the site to the top either. The only thing I have succeded in doing is loosing my cool links sort and gain a random sort.

I replaced this

($priority{$b} and !$priority{$a}) and return 1;
($priority{$a} and !$priority{$b}) and return -1;
($isnew{$b} and !$isnew{$a}) and return 1;
($isnew{$a} and !$isnew{$b}) and return -1;
($priority{$a} and $priority{$b}) and return (rand > 0.5) ? 1 : -1;
($isnew{$a} and $isnew{$b}) and return (rand > 0.5) ? 1 : -1;

return (rand > 0.5) ? 1 : -1;

with this

($priority{$b} and !$priority{$a}) and return 1;
($priority{$a} and !$priority{$b}) and return -1;
($isnew{$b} and !$isnew{$a}) and return 1;
($isnew{$a} and !$isnew{$b}) and return -1;
($iscool{$b} and !$iscool{$a}) and return 1;
($iscool{$a} and !$iscool{$b}) and return -1;
($priority{$a} and $priority{$b}) and return (rand > 0.5) ? 1 : -1;
($isnew{$a} and $isnew{$b}) and return (rand > 0.5) ? 1 : -1;
($iscool{$a} and $iscool{$b}) and return (rand > 0.5) ? 1 : -1;
return (rand > 0.5) ? 1 : -1;

Any Help would be appreciated.
Dale
Subject Author Views Date
Thread Sorting Links (Yes I know...Not again!!) :-D VickieB 7907 Apr 11, 1999, 4:32 PM
Post Re: Sorting Links (Yes I know...Not again!!) :-D
phoenix 7750 Apr 11, 1999, 4:48 PM
Post Re: Sorting Links (Yes I know...Not again!!) :-D
Alex 7767 Apr 11, 1999, 9:28 PM
Post Re: Sorting Links (Yes I know...Not again!!) :-D
VickieB 7776 Apr 11, 1999, 9:57 PM
Post Re: Sorting Links (Yes I know...Not again!!) :-D
Bobsie 7798 Apr 11, 1999, 10:57 PM
Post Re: Sorting Links (Yes I know...Not again!!) :-D
VickieB 7788 Apr 12, 1999, 1:37 AM
Thread Re: Sorting Links (Yes I know...Not again!!) :-D
Alex 7770 Apr 12, 1999, 1:55 PM
Thread Re: [Alex] Sorting Links (Yes I know...Not again!!) :-D
Coffee 5752 Jan 8, 2005, 9:04 AM
Post Re: [Coffee] Sorting Links (Yes I know...Not again!!) :-D
bugsie 5369 Jun 27, 2006, 4:53 PM
Post Re: Sorting Links (Yes I know...Not again!!) :-D
VickieB 7762 Apr 12, 1999, 2:46 PM
Post Re: Sorting Links (Yes I know...Not again!!) :-D
kiel1 7758 Nov 24, 1999, 4:31 PM
Post Re: Sorting Links (Yes I know...Not again!!) :-D
Tiny Giants 7750 Nov 28, 1999, 2:40 PM
Post Re: Sorting Links (Yes I know...Not again!!) :-D
Tj2000 7750 Nov 29, 1999, 6:19 AM
Post Re: Sorting Links (Yes I know...Not again!!) :-D
doolittle 7778 Apr 19, 2000, 7:58 PM
Thread Re: Sorting Links (Yes I know...Not again!!) :-D
doolittle 7755 Apr 20, 2000, 4:41 AM
Thread Re: [doolittle] Sorting Links (Yes I know...Not again!!) :-D
Lex 6294 May 26, 2003, 5:53 AM
Thread Re: [Lex] Sorting Links (Yes I know...Not again!!) :-D
Lex 6246 Jun 10, 2003, 2:04 PM
Post Re: [Lex] Sorting Links (Yes I know...Not again!!) :-D
poscon 5841 Aug 24, 2004, 10:51 AM