coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: zom on December 10, 2006, 07:23:33 PM

Title: sort album order by name
Post by: zom on December 10, 2006, 07:23:33 PM
I know there was a topic about sorting albums but I can't find it anymore.

I would like the albums to be order by name. what mod to apply ?

thanks

Title: Re: sort album order by name
Post by: Gizmo on December 10, 2006, 07:28:07 PM
http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#admin_album_list (http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#admin_album_list)

[EDIT] The above is for sorting categories which is not what you meant (I think). At this time, the only way I know to sort albums is manually in the album config - http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#albmgr_order (http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#albmgr_order).
Title: Re: sort album order by name
Post by: zom on December 11, 2006, 08:59:39 PM
in older version of copermine ther was a little mod to insert in the index file, something like "sort order by name", (I did apply this mod stored on one of my hard drive but thisone has crashed and now I can't find this php line to modify).

Thanks for help.
Title: Re: sort album order by name
Post by: Nibbler on December 11, 2006, 09:16:27 PM
http://forum.coppermine-gallery.net/index.php?topic=1379.0 (for 1.3)
Title: I FOUND IT: sort album order by name
Post by: zom on December 12, 2006, 09:57:24 PM
 ;D OK thanks

I have found it in v1.4 for the ones interested to order your albums by alphabetical order (by name) you must replace in the index file:

'WHERE category=' . $cat . $album_filter . ' ORDER BY a.pos ' . $limit;

by


'WHERE category=' . $cat . $album_filter . ' ORDER BY TITLE ' . $limit;

;)
Title: Re: sort album order by name
Post by: hasemann on December 28, 2006, 09:46:34 PM
I have no knowledge about php, but isn't it possible to define a certain category to be sorted in a different way?
e.g.

if ( ... 'WHERE category='MY_CATEGORY_NUMBER' . $album_filter . ' ORDER BY a.pos ' . $limit; )
else
('WHERE category=' . $cat . $album_filter . ' ORDER BY TITLE ' . $limit;)


???