Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: [Solved]: Categories in alpabetical order on index.php  (Read 3635 times)

0 Members and 1 Guest are viewing this topic.

holdika

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
[Solved]: Categories in alpabetical order on index.php
« on: April 03, 2004, 09:57:24 pm »

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.
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
[Solved]: Categories in alpabetical order on index.php
« Reply #1 on: April 04, 2004, 12:04:41 pm »

Do you mean categories, or albums.

If albums, see this thread, http://forum.coppermine-gallery.net/index.php?topic=29
If categories, you will have to do it in the category manager.
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
[Solved]: Categories in alpabetical order on index.php
« Reply #2 on: April 04, 2004, 03:43:04 pm »

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
Logged

Nibbler

  • Guest
[Solved]: Categories in alpabetical order on index.php
« Reply #3 on: April 04, 2004, 06:15:13 pm »

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

Code: [Select]

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


and change it to:

Code: [Select]

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

holdika

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
[Solved]: Categories in alpabetical order on index.php
« Reply #4 on: April 04, 2004, 06:58:26 pm »

Thanks I will give it a try
Logged

holdika

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
[Solved]: Categories in alpabetical order on index.php
« Reply #5 on: April 04, 2004, 07:02:08 pm »

Great! It worked!
Thanks so much!~ :wink:
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 20 queries.