Closed (fixed)
Project:
Filebrowser
Version:
6.x-2.x-dev
Component:
Directory Listing Pages
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Jan 2011 at 01:14 UTC
Updated:
10 Aug 2011 at 13:56 UTC
I was wondering if there could be a way for the module to search the directory it is listing, and as it parses the file names, check to see if a matching file name with a graphical extension (.gif, .jpg or .png) is found, and if so, print the image (using imagecache resizing) to display in the description field. (Particuarly for ebook directories. Where it can show the book covers in the description field (or even a 'cover' field)? Perhaps even making a flag in the directory listing setup page to flag that the directory should use covers if available? I doubt many would find this useful, but I know I certainly would. Thanks.
Jim
Comments
Comment #1
greywolfsspirit commentedTo give a rough idea of how I would like the display to look:
____________________________________________________________________________________________________
[ ] | Mimetype Icon | Display Name | Book Cover graphic (100x100) thumbnail | Size of File | Description |
-----------------------------------------------------------------------------------------
and perhaps the ability to click the thumbnail, and bring up a panel showing the original image size? In theory, it should work fine, I just don't know how to code it. Even if it could be a views page created for just directory types of ebook or software or something along those lines. It could even be used for inline thumbnailing of image directories, where a preview of available clip art could be displayed on screen before downloading it and finding it isn't a graphic you wanted, saving the user time.
Jim
Comment #2
greywolfsspirit commentedCan anyone offer help with a patch to accomplish this? Basically what I need is a way to patch this to search for the filename, check if there is a matching file name with a graphic extension (jpg, gif, png), then run the image through imagecache to set the thumbnail size to like 200x200 if the thumbnail doesn't pre-exist, then insert it before the description field contents. I'm not familiar enough with coding Drupal to do this. Yes, I could just add a filefield and manually add the pictures in one by one, but if this could be automated, it would be greatly appreciated.
Comment #3
Yoran commentedNever hesitate to send me a contact form when you need something.
This can be easily be done without patching filebrowser, simply by adding a preprocess_node function in your theme like this :
After you just have to make a type specific node template (node-dir_listing.tpl.php) which will make use of the new $illustration variable.
Comment #5
johnvjust making the title clearer for later reference.