The reason for the sort order is that the filenames are displayed in whatever order PHP's readdir() function returns them. To display the filenames alphabetically, they must first be read into an array and then sorted. It's quite easy to do - in admin/index.php look for the following code (line 85)...
while(($filename=readdir($dirHandle))!==false)
...and replace that with the following block of code:
while(($filename=readdir($dirHandle))!==false)
{
$filenames[] = $filename;
}
asort($filenames);
foreach($filenames as $filename)
The line immediately following the mod should be the opening curly brace { of the main loop that displays each file.
Hi Julian,
The reason for the sort order is that the filenames are displayed in whatever order PHP's readdir() function returns them. To display the filenames alphabetically, they must first be read into an array and then sorted. It's quite easy to do - in admin/index.php look for the following code (line 85)...
while(($filename=readdir($dirHandle))!==false)
...and replace that with the following block of code:
while(($filename=readdir($dirHandle))!==false)
{
$filenames[] = $filename;
}
asort($filenames);
foreach($filenames as $filename)
The line immediately following the mod should be the opening curly brace { of the main loop that displays each file.
Hope this helps,
Cheers,
David.