JX List Files

A native Joomla 1.5 module to list the files of a directory on your web server.
Main features:
* List files from a directory on your web server.
* Can add links to the files.
* Translatable, delivered with English and Swedish
* Icons to display the type of file.
* View template to change the html.
* CSS file to manage the look.
* Hide specific files from the list.
* Sort by filename, file size or date either ascending or descending.
* Group files by sub-directory.
* Files can be opened in new window.
But which file do you change the date format?
24-12-2011 instead of 2011-12-24, for example.
Thank you.
No need to edit any file to change from the default date format for the current Joomla language. The date format is configurable from the module parameters.
Go to Joomla Administrator -> Extensions -> JX List Files and enter "%d-%m-%Y %T" in the "Date Format" box to the right.
More information about the date format options can be found here:
http://www.php.net/manual/en/function.strftime.php
Other than that, it does what it says. WELL.
Thank you for informing about this inadequacy.
The latest version now displays file sizes in a more human readable format.
An option I would have wanted:
Output files grouped by their parent folder when recursive=yes. No need to link the folders, just visually split the list by subfolder instead of ignoring them. This would let the admin maintain a directory structure which is replicated automatically. I only needed one level of subdirs, but nested ul-lists would work for unlimited levels so I'm putting the request out there. If you want to try to grant my wish, I have a recursive php function for converting an array into nested ul's with css styling, let me know.
Technical rant:
I was a bit annoyed that I couldn't exclude "index.html" (which Joomla puts in all created folders) when using recursive listing, but I quickly found out this is a shortcoming of the JFolder::files method (When writing a recursive function, why not call the same parameters on the recursive calls..?). I solved this for myself, so not asking for a change, I just wanted to rant ;)
I just added in helper.php:99
$file =& $filelist[$i];
$filename = JFile::getName($file);
if(!in_array($filename, $excludefiles)){..file loop..}
Thank you for the thorough feature request.
Both of these have been added to the latest version of the extension.
A before text field where I could put some intro text before the list of files would be nice too.
Also, I may be the only one who wants this feature, but it would be nice to have a plugin as well so I could publish the file list wherever I wanted instead of just in a module position.
I'd be willing to pay a little for those additional features (in addition to being able to remove the version and link to author at the bottom). But even with only the very basic features, this is a useful module. Thank you for providing it.
All html is available in a template file, which is located here:
modules/mod_jxlistfiles/tmpl/default.php
This can also be overridden via your Joomla template.
You can change the html to add target to the anchor tag, as well as removing the link/version info.
Opening images via some preview script should also be possible to add in the html.
Unfortunately, to save files I think you would need a script to deliver the file.
To use the module as a plugin, I think there are wrapper plugins available to run any module in a page.
This module also takes all the privileges from the module you publish into. With a little imagination this is a powerful module! You can customize the display as you want to because the styles are based on external css file.




