Dragonfly CMS v9 ⇒ Coppermine ⇒ alphabetical sort of directories for batch upload ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum Index Modules & Blocks Coppermine

alphabetical sort of directories for batch upload Reply to topic


dusman wrote
I will give lots of monopoly money
I want the purple houses Big grin

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS


thanks

-Dustin

Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1


Make sure you back-up all files before editing.

Edited "module/coppermine/searchnew.php" to show directories in alphabetical order. This was accomplished by rewriting the "function display_dir_tree($folder, $ident)" in the searchnew.php file.
function display_dir_tree($folder, $ident) { global $CONFIG, $THEME_DIR; $dir_path = $CONFIG['fullpath'] . $folder; $d = array(); if (!is_readable($dir_path)) return; clearstatcache(); $d = glob($dir_path . "*",GLOB_ONLYDIR); foreach ($d as $file) { $start_target = substr($file,similar_text($dir_path,$file)); $dirpath = $CONFIG['fullpath'] . $start_target; $warnings = ''; if (!is_writable($file)) $warnings .= DIR_RO; if (!is_readable($file)) $warnings .= DIR_CANT_READ; if ($warnings) $warnings = ' <b>' . $warnings . '<b>'; echo '<tr><td class="tableb">' . $ident . '<img src="' . $THEME_DIR . '/images/folder.gif" alt="" /> <a href= "' . getlink("&amp;file=searchnew&amp;startdir=" . $folder . $start_target, false) . '">' . $start_target . '</a>' . $warnings . '</td></tr>'; display_dir_tree($folder . $start_target . '/', $ident . ' '); } }
Hope this works for you also.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/2.0/5.0.45/5.2.8/9.1.2.1


thanks, I'll give it a shot, hopefully it will be in the next CVS

-Dustin

Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1


can we get confirmation that this fix or similar is added to CVS so the next release will not revert back? Thanks for all the help

-Dustin

Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1


Cannot confirm but I'll try to.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS


thanks as usual Nano

-Dustin

Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1


just a friendly reminder to add this to CVS so it isn't overwritten on next update. thanks

-Dustin

Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1


in RC2 now.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS


Thanks Nano as usual

-Dustin

Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1


is this still fixed in the current build? mine are showing up in some freaky order, it's not size based, date of creation based or alphanumerically sorted...

this is the only discussion about it i can find here, and it's a couple of years old, which makes me think there's another issue... probably something silly i've done...

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Ubuntu bserver 2.6.32-28 / 2.051 / MySQL 5.1.41 / PHP 5.3.2 / Dragonfly 9.3.3


ok... answering myself again... i thought i'd used a new copy of the coppermine module when adding another instance to the site, but the searchnew.php file i was using indicated it was last edited in 2006... before this update... just copied and pasted the code provided above and all works well now...

i'll leave just this module changed for a while in case the code clashes with any of the latest updates, and if no problems, will be copying it to other instances of coppermine pretty soon...

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Ubuntu bserver 2.6.32-28 / 2.051 / MySQL 5.1.41 / PHP 5.3.2 / Dragonfly 9.3.3

All times are UTC


Jump to: