There may be a way to do this already (if so, sorry). I'm simply looking for a way to not display subdirectories when embedding the content of a directory in a node (it could just be a snippet to include in the body of the node).

Any ideas?

Thanks.

CommentFileSizeAuthor
#10 filebrowser_extensions_config.htm.txt6.81 KBdman

Comments

dman’s picture

Not at all?
I'm remodelling the configuration a lot. This is a fair request.
I'll be adding filename filters as whitelists (eg *.jpg) or blacklists (eg CVS)
Didn't think about dirs on or off.

Need to test my latest version with snippets, I guess.

bomarmonk’s picture

Thanks for the positive response to my feature request. I'll keep my eyes peeled for the appearance of this... is this going to turn into a more developed stand-alone version of the filebrowser module? Or is the other filebrowser actually going to be updated with your hooks? Just curious.

dman’s picture

I've had to branch totally from the original :-}

I developed the need to have different instances rooted at different places, and doing so ripped out the last useful ties I had with the other version.
My current version is now stand-alone. And a bit trickier to configure (but more configurable - layers of authentication are now possible. Not implimented, but possible)

The howto for embedded snippets has changed drastically (and not documented right any more) and it may have a dependancy issue or two (I gotta rebuild a machine or two before I try a fresh install) but I'll upload the latest to CVS nowish... just for fun.

Additions include - Support for out-of-webroot 'files' directory (lacking in original)
- support for 'private' file service (required for #1)
- support for multiple ways and means of viewing multiple places, but configurable only via admin panel (not request string) for security reasons.
- support for filename filtering to select or restrict which files get shown - but no filtering of directories yet sorry.

dman’s picture

Status: Active » Fixed

Current CVS now has this feature. Configured via the admin/settings/filebrowser_extensions page.

Um, in-page embeds still need re-documenting...

bomarmonk’s picture

Does the CVS version work with 4.7? Also, any idea on how to embed that filebrowser page? Same as before? And finally, is the CVS version a stand alone module?

Thanks for any information.

dman’s picture

This module is now stand-alone, yes.
The CVS currently published is built against Drupal 4.7 - I'm not trying to catch up to Drupal HEAD.

Embedding can be done, but I'm not sure how yet. The doc needs to be rewritten to update the examples. That;ll happen soonish.

Anonymous’s picture

Status: Fixed » Closed (fixed)
bomarmonk’s picture

Title: Option to hide subdirectories or display only certain file types » Documentation on hiding subdirectories or displaying only certain file types
Category: feature » support

I'm changing the title, category, and reopening. I still don't see any explanation of how to do this with this module. Can the readme be updated with an explanation? Thanks for any help.

bomarmonk’s picture

Status: Closed (fixed) » Active
dman’s picture

StatusFileSize
new6.81 KB

You can open a seperate ticket for this, y'know :)

On testing, it seems that due to the way file_scan_directory() does its matching and masking, trying to set the glob pattern isn't working as expected.
First, it's not really a glob pattern, it's an eregexp.
Second, it doesn't make allowances for directories, so asking for .*\.jpg will list the jpgs, but not the directories in the same place, which makes browsing not a happening thing.

The interface at /admin/settings/filebrowser_extensions looks like: ... um I'll attach a dump

I think it's fair to say the "which files to show" field does NOT work properly.

I may have to build my own version of file_scan_directory() to get more control over it.

deepak.sathya’s picture

If you just want to hide all the subfolders, just add the below line to the profile. I have not tried (dont know if any option is there) selective hiding though.

'hide_directories' => TRUE,

This worked when I tested it:

<?php
  $folder = 'foldername';
  
  $profile = array(
  	'cols' => 'expander;icon;name',// also used as headers. (no tablesort)
  	'render' => 'table',
        'root' => 'browserroot', //default -> http://site.com/files
        'rel_url' => 'http://site.com/browserroot', 
        'hide_directories' => TRUE,
        //'recursive' => TRUE, or FALSE
  );
	print filebrowser_embed($folder,$profile);

?>
bomarmonk’s picture

Thank you! I'll give it a try.

bomarmonk’s picture

I still can't get an embedded file list to display without the subdirectories. Any ideas on what little PHp snippet I need to include in the body of a node? Thanks for any help.

dman’s picture

Status: Active » Closed (fixed)

This module is retired