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: Auto arrange the categories by name  (Read 4385 times)

0 Members and 1 Guest are viewing this topic.

epsilon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 95
    • http://www.cremita.com
Auto arrange the categories by name
« on: October 23, 2003, 12:08:40 am »

It will be cool that the categories will be arrange by name automatically because i have 40 categories and when i want create a new category i must up it 40 times, its too boring...
Logged

DJMaze

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 831
    • Dragonfly CMS
Auto arrange the categories by name
« Reply #1 on: October 23, 2003, 02:38:06 am »

in index.php change
Code: [Select]
$result = db_query("SELECT cid, catname, description FROM {$CONFIG['TABLE_CATEGORIES']} WHERE parent = '$parent'  ORDER BY pos");
into
Code: [Select]
$result = db_query("SELECT cid, catname, description FROM {$CONFIG['TABLE_CATEGORIES']} WHERE parent = '$parent'  ORDER BY pos, name");

didn't test this. but it should work
Logged
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

epsilon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 95
    • http://www.cremita.com
No it doesent go...
« Reply #2 on: October 23, 2003, 08:27:20 pm »

When i create the new category (for example Amber) i the last, no the first by name.
Logged

DJMaze

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 831
    • Dragonfly CMS
Auto arrange the categories by name
« Reply #3 on: October 27, 2003, 09:55:53 pm »

oops it must be

ORDER BY pos AND name
Logged
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 20 queries.