Extension talk:FileSystemListing

Latest comment: 13 years ago by JackPotte in topic Help - not working
The following discussion has been transferred from Meta-Wiki.
Any user names refer to users of that site, who are not necessarily users of MediaWiki.org (even if they share the same username).

This looks really cool, can I see an example?

Installation Instructions

edit

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:
<dirlist dir="/var/www/html/downloads"></dirlist>
Voila... the files & directories under /var/www/html/downloads are now displayed. --203.130.233.55 14:10, 29 July 2006 (UTC) by semutReply

UNC Addresses

edit

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 - tryReply

   <dirlist dir="d:\\inbox"></dirlist>

Sub directories

edit

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

Security Concern

edit

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)Reply

Help - not working

edit

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: white page. JackPotte 17:10, 3 July 2011 (UTC) (MediaWiki 1.16.5, PHP 5.3.2-1ubuntu4.9 (apache2handler), MySQL 5.1.41-3ubuntu12.10)Reply
Either if $wgRawHtml is true or false. JackPotte 12:14, 9 July 2011 (UTC)Reply

Arranging

edit

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)Reply

Usage fileprefix

edit
<DirList name="/var/www/html/downloads" fileprefix="/html/downloads/">

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

Return to "FileSystemListing" page.