Newest resource on top

Newest resource on top

Postby hyedipin on Sat Sep 29, 2007 9:24 pm

Is there a change of code that can sort the resources with most recent at top, and oldest at bottom, so when I upload a new resource, I don't have to go to next page to see it (when I have more than a few pages, I have to go to last page and scroll down).

So I want the latest-uploaded one to show up at top of the list, if possible.

Thank You!
hyedipin
 
Posts: 40
Joined: Fri Oct 27, 2006 11:50 am
Location: New York, NY

Postby phunkphorce on Sun Sep 30, 2007 5:27 pm

LT 1.2.5 fixed this, so that whenever you upload a new file, you will automatically be redirected to the page where that file is.

Otherwise if you want to sort resources in reverse chronological order, you'll have to modify the code.
phunkphorce
Lifetype Expert
 
Posts: 9028
Joined: Mon Aug 25, 2003 6:34 am
Location: Suomessa

Postby hyedipin on Sun Sep 30, 2007 10:33 pm

phunkphorce wrote:LT 1.2.5 fixed this, so that whenever you upload a new file, you will automatically be redirected to the page where that file is.

Otherwise if you want to sort resources in reverse chronological order, you'll have to modify the code.


Thanks phunkphorce, I don't think I want to touch LT and upgrade it, but I would like to modify the code. Which part of the code controls the sort of the resources?
Thanks.
hyedipin
 
Posts: 40
Joined: Fri Oct 27, 2006 11:50 am
Location: New York, NY

Postby phunkphorce on Mon Oct 01, 2007 1:11 am

class/gallery/dao/galleryresources.class.php
phunkphorce
Lifetype Expert
 
Posts: 9028
Joined: Mon Aug 25, 2003 6:34 am
Location: Suomessa

Postby hyedipin on Mon Oct 01, 2007 10:10 am

phunkphorce wrote:class/gallery/dao/galleryresources.class.php


Thanks, I will try to figure this out,

I assume it is

Code: Select all
* Returns all the resources that belong to a blog
 Array( "date" => "ASC" ),


change to

Code: Select all
 Array( "date" => "DESC" ),


will it works like a charm!
Thanks for your help.
hyedipin
 
Posts: 40
Joined: Fri Oct 27, 2006 11:50 am
Location: New York, NY


Return to Requests and Suggestions

cron