[RESOLVED] Help with default link sorting

Support for IntegraMOD 140

Moderator: Integra Moderator

[RESOLVED] Help with default link sorting

PostAuthor: hornakapopolis » Wed May 24, 2006 7:15 am

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!
Last edited by hornakapopolis on Thu May 25, 2006 6:03 pm, edited 1 time in total.

hornakapopolis
Members
Members
 
Posts: 45
Likes: 0 post
Liked in: 0 post
Joined: Fri Apr 14, 2006 7:03 pm
Cash on hand: 0.00

PostAuthor: Adrian Rea » Wed May 24, 2006 12:15 pm

I too have limited knowledge, but you may find it in ./links.php

A
Last edited by Adrian Rea on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Adrian Rea
Sr Integra Member
Sr Integra Member
 
Posts: 1263
Likes: 0 post
Liked in: 0 post
Joined: Sun Mar 12, 2006 12:59 am
Cash on hand: 0.00

PostAuthor: hornakapopolis » Thu May 25, 2006 6:02 pm

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!
Last edited by hornakapopolis on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

hornakapopolis
Members
Members
 
Posts: 45
Likes: 0 post
Liked in: 0 post
Joined: Fri Apr 14, 2006 7:03 pm
Cash on hand: 0.00

PostAuthor: Adrian Rea » Thu May 25, 2006 11:57 pm

Kewl :)

A
Last edited by Adrian Rea on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Adrian Rea
Sr Integra Member
Sr Integra Member
 
Posts: 1263
Likes: 0 post
Liked in: 0 post
Joined: Sun Mar 12, 2006 12:59 am
Cash on hand: 0.00

Re: [RESOLVED] Help with default link sorting

PostAuthor: Master Dwarf » Fri May 26, 2006 12:16 pm

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]
Last edited by Master Dwarf on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
Sean Kelley
http://www.GrumblingDwarf.com
Wisconsin Region Game Site
User avatar
Master Dwarf
Integra Supporter
Integra Supporter
 
Posts: 102
Likes: 0 post
Liked in: 0 post
Joined: Sun Apr 09, 2006 9:26 am
Cash on hand: 0.00
Location: Madison, WI

PostAuthor: hornakapopolis » Sun May 28, 2006 4:54 am

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.
Last edited by hornakapopolis on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

hornakapopolis
Members
Members
 
Posts: 45
Likes: 0 post
Liked in: 0 post
Joined: Fri Apr 14, 2006 7:03 pm
Cash on hand: 0.00

PostAuthor: Master Dwarf » Sun May 28, 2006 12:01 pm

Yes, it is referring to what you are talking about. Basically our changes change the default appearcance when checking out a link category.
Last edited by Master Dwarf on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
Sean Kelley
http://www.GrumblingDwarf.com
Wisconsin Region Game Site
User avatar
Master Dwarf
Integra Supporter
Integra Supporter
 
Posts: 102
Likes: 0 post
Liked in: 0 post
Joined: Sun Apr 09, 2006 9:26 am
Cash on hand: 0.00
Location: Madison, WI


Return to IntegraMOD 140

Who is online

Registered users: App360MonitorBot, Bing [Bot], Google [Bot]