Auto arrange the categories by name Auto arrange the categories by name
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

Auto arrange the categories by name

Started by epsilon, October 23, 2003, 12:08:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

epsilon

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

DJMaze

in index.php change $result = db_query("SELECT cid, catname, description FROM {$CONFIG['TABLE_CATEGORIES']} WHERE parent = '$parent'  ORDER BY pos");
into $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
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

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

DJMaze

oops it must be

ORDER BY pos AND name
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