[Pro] Ajax File Listing

Hi,

Is there a way of specifying file types displayed. I would like this listing to only show mp3 files. This will save me loads of server space because I currently have to duplicate all of the files. 1 set for playing and another set for downloading.

Any help would be appreciated.

Thanks


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Not directly. The script lists all files in a particular folder that
are not the file lister itself. It’s certainly possible to edit the
file lister (index.php) that the Action creates, and add some rules to
the “skip this file” test.

Line 86 is the test:

	if($f != basename(__FILE__) && substr($f,0,1) != '.'){

You could add another test in there based on the filename or
extension, if you have something common about all of the files you
don’t want to have listed.

How are you marking these files that you don’t want to have visible at
the moment?

Walter

On Apr 29, 2010, at 9:54 AM, Neil wrote:

Hi,

Is there a way of specifying file types displayed. I would like
this listing to only show mp3 files. This will save me loads of
server space because I currently have to duplicate all of the files.
1 set for playing and another set for downloading.

Any help would be appreciated.

Thanks


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The folder contains several MP3 files which I would like to be listed.

There is only actually 1 files I would like to not show up and that is a .xml file

At the moment, I have the same mp3s duplicated in another folder.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Okay, well to make that test keep out xml as well, just add another test on to the end:

if($f != basename(__FILE__) && substr($f,0,1) != '.' && substr($f,-3) != 'xml'){

Use a good text editor for that. I recommend TextMate if you’re feeling like spending money, or TextWrangler if you like Free.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walter, you are fantastic !

That worked a treat. I used the text editor built into ‘Flow’

Thanks again,

Neil


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options