coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: nickfzx on March 13, 2007, 11:28:42 PM

Title: sort order of user galleries
Post by: nickfzx on March 13, 2007, 11:28:42 PM
after much searching (as this is a topic that has been covered a lot) I have decided to ask for help.

I want the default sort order of user galleries to be last-updated-album is first.  At the moment user galleries are sorted by the first registered user's album is shown first.

I only found this solution which is only for 1.3...I have the latest version(1.4.10)  :

http://forum.coppermine-gallery.net/index.php?topic=21504.0

Any ideas how I might do this.

p.s.
If the above can't be done then I would like to know how to reverse the sort order so that the last registered user's gallery was shown first instead.
Title: Re: sort order of user galleries
Post by: triepsyn on April 04, 2007, 05:33:37 AM
I'm also looking into this situation, have attempted many different ideas I found in other threads to no avail.

Thanks!  :D
Title: Re: sort order of user galleries
Post by: Stramm on April 04, 2007, 08:10:18 AM
bridge/udb_base.inc.php

in the function get_user_data find 2 times
                        $sql .= "ORDER BY category ";
and replace category with the table field you want to sort. Add ASC or DESC for ascending, descending order

thumb_pid is valid or user_name
Title: Re: sort order of user galleries
Post by: triepsyn on April 05, 2007, 02:42:24 AM
Thank you for the response. I appreciate it.  8)

Unfortunately, it did not work for me. I found the get_user_data x 2 and replaced both instances with the //$sql .= "ORDER BY thumb_pid DESC ";\\ code; did not work. I also tried to put the code behind the get_user_data. I tried it a few different times but it would not work for me.

Any thoughts? I'd really like my album to be sorted by the last update. I have it organized in alphabetical order now and it took like 100 clicks to get there with the manual up and down buttons.  :D

http://www.nwaimports.com/gallery/index.php?cat=7

Thanks for any and all help.

-Kristina  ;D
Title: Re: sort order of user galleries
Post by: nickfzx on April 19, 2007, 11:25:48 PM
any ideas on how to do this anyone.

sorry, i don't really understand your instructions stramm
Title: Re: sort order of user galleries
Post by: nickfzx on April 28, 2007, 02:15:34 AM
have followed your instructions as well as i can stramm but they produce no effect at all...

all I want is for the member galleries to be ordered by when they were last updated....last updated album first.

There is surely a way this can be done...I have searched the boards and can't find a way.
Title: Re: sort order of user galleries
Post by: nickfzx on May 28, 2007, 02:32:32 AM
Quote from: Stramm on April 04, 2007, 08:10:18 AM
bridge/udb_base.inc.php

in the function get_user_data find 2 times
                        $sql .= "ORDER BY category ";
and replace category with the table field you want to sort. Add ASC or DESC for ascending, descending order

thumb_pid is valid or user_name

Stramm was in fact correct 100%, I was just using incorrect syntax, sorry for two previous posts
Title: Re: sort order of user galleries
Post by: triepsyn on September 18, 2007, 04:20:33 AM
I've tried this a number of times using different combinations and nothing appears to work for me. Any suggestion?

I'm trying to get this: http://www.nwaimports.com/gallery/index.php?cat=48 ... To have the albums ordered by the last time they were updated.

Please help. Thanks.  :D