News:

CRITICAL UPGRADE CPG RELEASE 1.6.30
Version 1.6.30 removes a serious security issue that could allow unauthorized access to modify your site. Upgrade as soon as possible.

Main Menu

[Solved]: Categories in alpabetical order on index.php

Started by holdika, April 03, 2004, 09:57:24 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

holdika

Is there a way to set the directories on the main site so it will display it in Alphabet order, instead of manually adding them? I do have a lot of od dir and I am going to have a lot more.

Casper

Do you mean categories, or albums.

If albums, see this thread, http://coppermine-gallery.com/forum/index.php?topic=29
If categories, you will have to do it in the category manager.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

holdika

It's the Categories. I was hoping may be there is a solution for that to be done automaticly. Because sorting it in the category manager takes a long time, especially when there is so many categories

Nibbler

You can do this with a simple code change. In index.php, locate


$result = db_query("SELECT cid, name, description FROM {$CONFIG['TABLE_CATEGORIES']} WHERE parent = '$parent'  ORDER BY pos");


and change it to:


$result = db_query("SELECT cid, name, description FROM {$CONFIG['TABLE_CATEGORIES']} WHERE parent = '$parent'  ORDER BY name ASC");

holdika


holdika