We modified the module code "Photo Album" Pluck CMS, to sort the albums alphabetically
modified the file "data / modules / albums / pages_site / albums_include.php. "
The modified code is as follows
/ / Open the module-folder
/ / this code was changed with tip "http://codestips.com/php-read-directory-into-array/"
$directory="data/settings/modules/albums";
// create a handler to the directory
$dirhandler = opendir($directory);
// read all the files from directory
$nofiles=0;
while ($file = readdir($dirhandler)) {
// if $file isn't this directory or its parent
//add to the $files array
if ($file != '.' && $file != '..'){
$nofiles++;
$files[$nofiles]=$file;
}
}
//close the handler
closedir($dirhandler);
$files2=sort($files);
//SerInformaticos code
for ($i=0; $i < count($files); $i++){
$ Dir = $ files [$ i];