You are here:  » Sort - Feed Registration Page


Sort - Feed Registration Page

Submitted by Julian on Thu, 2006-10-26 18:48 in

how can i sort the feed registation page alpabeticaly.
once there are a lot of feeds i have to jump around to double check whats imported.

Submitted by support on Fri, 2006-10-27 07:46

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.