Albums not sort by updated time.

leonrhlu
leonrhlu's picture

Joined: 2012-05-08
Posts: 17
Posted: Mon, 2012-05-21 04:07

Hi,everyone, I got a problem. When I click a tag, the website shows all the albums and photos that have this tag, but they were not sorted by their updating time. How can I make the right setting? I want the user to see the latest albums and photos first. Thanks for your help.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25956
Posted: Mon, 2012-05-21 05:25

tag albums are ordered by the id:
->order_by("items.id")
I guess you could change the order to creation.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
leonrhlu
leonrhlu's picture

Joined: 2012-05-08
Posts: 17
Posted: Mon, 2012-05-21 07:41

Thanks a lot. But how can I set function "order_by" to sort tag albums by updated time? So the latest modified album will be in the first place.

I can only find parameter items.id, items.title, but don't the parameter for updated time:). Thanks.

 
leonrhlu
leonrhlu's picture

Joined: 2012-05-08
Posts: 17
Posted: Mon, 2012-05-21 08:19
Quote:
Dave, already find a way to solve it, thanks for your help:)

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25956
Posted: Mon, 2012-05-21 17:57

And for the benefit of others, what did you do?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
leonrhlu
leonrhlu's picture

Joined: 2012-05-08
Posts: 17
Posted: Wed, 2012-05-23 16:00

Sorry to reply late.I'm not a programmer, but I searched Google and tried this in the file "tag.php":
// ->order_by("items.id")
->order_by("created",DESC)
Then I click one tag, the albums are sorted by the created time of the album. It worked well till now:)