Page 1 of 1

[RESOLVED] Help with default link sorting

PostPosted: Wed May 24, 2006 7:15 am
Author: hornakapopolis
On the links page, I'd like the links to sort by name by default rather than by the date they were added. Could someone give me a hand with doing this?

I was hoping it was something I could figure out by looking at the tpl file, but I'm not having much luck with my limited knowledge. I'd appreciate the help!

PostPosted: Wed May 24, 2006 12:15 pm
Author: Adrian Rea
I too have limited knowledge, but you may find it in ./links.php

A

PostPosted: Thu May 25, 2006 6:02 pm
Author: hornakapopolis
Thanks for the suggestion. I've never admitted to knowing a lot, and that shows how much I do. I didn't even think about looking at the php file... although now i don't know why as that makes sense. <img>

I changed

Code: Select all
        $mode = 'link_joined';     }       if(isset($HTTP_POST_VARS['order']))     {         $sort_order = ($HTTP_POST_VARS['order'] == 'ASC') ? 'ASC' : 'DESC';     }     else if(isset($HTTP_GET_VARS['order']))     {         $sort_order = ($HTTP_GET_VARS['order'] == 'ASC') ? 'ASC' : 'DESC';     }     else     {         $sort_order = 'DESC';     }

to
Code: Select all
        $mode = 'link_title';     }       if(isset($HTTP_POST_VARS['order']))     {         $sort_order = ($HTTP_POST_VARS['order'] == 'ASC') ? 'ASC' : 'DESC';     }     else if(isset($HTTP_GET_VARS['order']))     {         $sort_order = ($HTTP_GET_VARS['order'] == 'ASC') ? 'ASC' : 'DESC';     }     else     {         $sort_order = 'ASC';     }

and it worked! Thanks again!

PostPosted: Thu May 25, 2006 11:57 pm
Author: Adrian Rea
Kewl :)

A

Re: [RESOLVED] Help with default link sorting

PostPosted: Fri May 26, 2006 12:16 pm
Author: Master Dwarf
A couple lines below that you can change it from descending to ascending in order to have the links go A to Z.

Find:
$sort_order = ($HTTP_GET_VARS['order'] == 'ASC') ? 'ASC' ][color=red]DESC';
}


Replace]$sort_order = ($HTTP_GET_VARS['order'] == 'ASC') ? 'ASC' ][color=red]ASC';
}[/quote]

PostPosted: Sun May 28, 2006 4:54 am
Author: hornakapopolis
Just to verify, are you talking about the same thing I have above or another location?

It is working that way I have it, but I haven't really poked around looking at other links pages.

PostPosted: Sun May 28, 2006 12:01 pm
Author: Master Dwarf
Yes, it is referring to what you are talking about. Basically our changes change the default appearcance when checking out a link category.