Here's a slight modification to sort image selection dropdown boxes in the admin control panel. Quite useful for those {content_image} tags.
Just add the bold line, that's all.
File: lib/page.functions.php
------------------------------------------------------------------------
function create_file_dropdown($name,$dir,$value,$allowed_extensions,$optprefix='',$allownone=false,$extratext='',
$fileprefix='',$excludefiles=1)
{
$files = array();
$files = get_matching_files($dir,$allowed_extensions,true,true,$fileprefix,$excludefiles);
if( $files === false ) return false;
$out = "\n";
if( $allownone )
{
$txt = '';
if( empty($value) )
{
$txt = 'selected="selected"';
}
$out .= " --- ".lang('none')." ---\n";
}
sort($files);
foreach( $files as $file )
{
$txt = '';
$opt = $file;
if( !empty($optprefix) )
[1.6.6] Sorting file dropdown boxes
Re: [1.6.6] Sorting file dropdown boxes
Still does the trick in 1.7.1 
