Documentation on hiding subdirectories or displaying only certain file types

bomarmonk - September 16, 2006 - 00:47
Project:Filebrowser Extensions
Version:4.7.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

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.

#1

dman - September 16, 2006 - 17:32

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.

#2

bomarmonk - September 22, 2006 - 23:18

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.

#3

dman - September 23, 2006 - 01:07

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.

#4

dman - September 27, 2006 - 06:04
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...

#5

bomarmonk - September 28, 2006 - 15:42

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.

#6

dman - September 29, 2006 - 18:58

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.

#7

Anonymous - October 13, 2006 - 19:00
Status:fixed» closed

#8

bomarmonk - October 13, 2006 - 21:37
Title:Option to hide subdirectories or display only certain file types» Documentation on hiding subdirectories or displaying only certain file types
Category:feature request» support request

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.

#9

bomarmonk - October 13, 2006 - 21:37
Status:closed» active

#10

dman - October 14, 2006 - 15:36

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.

AttachmentSize
filebrowser_extensions_config.htm.txt 6.81 KB

#11

deepak.sathya - November 6, 2006 - 11:05

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 -> <a href="http://site.com/files
" title="http://site.com/files
" rel="nofollow">http://site.com/files
</a>        'rel_url' => 'http://site.com/browserroot',
        'hide_directories' => TRUE,
        //'recursive' => TRUE, or FALSE
  );
    print filebrowser_embed($folder,$profile);

?>

#12

bomarmonk - November 7, 2006 - 05:34

Thank you! I'll give it a try.

#13

bomarmonk - January 5, 2007 - 03:39

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.

#14

dman - October 10, 2008 - 06:22
Status:active» closed

This module is retired

 
 

Drupal is a registered trademark of Dries Buytaert.