Extension talk:FileSystemListing

This looks really cool, can I see an example?

Installation Instructions
How do I install this extension?
 * Open some file editor of your choice, then copy the code and paste on it. Then save it in your extension directory under filename Filedir.php or whatever you choose. Edit LocalSettings.php and add this line below.

require_once( 'extensions/Filedir.php' );
 * Create any page and type:


 * Voila... the files & directories under /var/www/html/downloads are now displayed. --203.130.233.55 14:10, 29 July 2006 (UTC) by semut

UNC Addresses
I'm looking at your code and (correct me if I'm wrong) it doesn't look like it supports UNC, or even Windows at all for that matter, though that wouldn't be hard to change. *nix style paths are ok but the vast majority of the real world still uses Windows and Windows Filesharing.

--193.24.32.37 13:52, 5 January 2007 (UTC) For me it works with windows - try 

Sub directories
Neat script but what about listing subdirectories ? Or the possibility of filtering the list ?

Security Concern
A useful extension. However, it seems to me that this allows any user to display the contents of any directory in any file system visible to the webserver. Even though this does not imply that any file can be downloaded, this might be undesired. RV1971 14:36, 6 June 2007 (UTC)

Help - not working
It looks just like what i need, but i can't seem to get it to work. I need it to display the shared folders on our server, but I can't even get it to display my local folders such as d:\\Temp. I followed the instructions and copied the code into filedir.php, copied it to MediaWiki/extensions dir on server and added the line require_once(...) to LocalSettings.php. Any suggestions ? The wiki is located on a server that runs Debian OS, and the client computers run WinXP. If i get it to display the contents of local folders i am sure i'll get it to work on server as well. Anyone actually using it ? Does it work for you ? Ty in advance
 * Me too, but with Firefox 3.6.18 on Ubuntu 10.04. The special:version is correct, the FsDateTime tag works, but as soon as I post any dirlist tag the submission is refused: internal error

Detected bug in an extension! Hook ConfirmEditHooks::confirmEditMerged failed to return a value; should return true to continue hook processing or false to abort.

Backtrace:

JackPotte 17:10, 3 July 2011 (UTC) (MediaWiki 1.16.5, PHP 	5.3.2-1ubuntu4.9 (apache2handler), MySQL 5.1.41-3ubuntu12.10)
 * 1) 0 /var/www/Wiki/includes/EditPage.php(878): wfRunHooks('EditFilterMerge...', Array)
 * 2) 1 /var/www/Wiki/includes/EditPage.php(2552): EditPage->internalAttemptSave(false, false)
 * 3) 2 /var/www/Wiki/includes/EditPage.php(389): EditPage->attemptSave
 * 4) 3 /var/www/Wiki/includes/EditPage.php(271): EditPage->edit
 * 5) 4 /var/www/Wiki/includes/Wiki.php(553): EditPage->submit
 * 6) 5 /var/www/Wiki/includes/Wiki.php(70): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
 * 7) 6 /var/www/Wiki/index.php(117): MediaWiki->performRequestForTitle(Object(Title), Object(Article), Object(OutputPage), Object(User), Object(WebRequest))
 * 8) 7 {main}

Arranging
How to arrange the folder's files by reversed order?

in Filedir.php

change: foreach ($dirArray as $value)

to: foreach (array_reverse($dirArray) as $value)

--Cety 04:21, 17 June 2009 (UTC)

Usage fileprefix


--Cety 04:21, 17 June 2009 (UTC)