possible to view thumbnails on upload page?

jasonkotter - July 20, 2008 - 10:58
Project:Imagefield Import
Version:6.x-1.x-dev
Component:User interface
Category:feature request
Priority:normal
Assigned:wulff
Status:closed
Description

This module works great, but I was wondering if it is possible to view thumbnails on the upload page rather than filenames. The ability to bulk rename titles is one of the most appealing features of this module, and it would be nice if I could see thumbnails to aid in renaming the files.

Thanks . . . if this isn't possible now, perhaps it could be added in the future?

#1

jasonkotter - July 23, 2008 - 13:53
Category:support request» feature request

I've had no feedback, but I can't figure out a way to view the thumbnails on the upload page, so I'm changing this to a feature request. I would aprpeciate a comment from anyone to let me know that someone has at least looked at this.

Thanks!

#2

jasonkotter - July 23, 2008 - 20:07
Status:active» fixed

I added a new field to the form, thumb, to display a thumbnail of the photo with the following additions/changes to the code.

On line 101, changed the code to add the thumb field to my fields array:

$fields = array('filesize', 'dimensions', 'thumb', 'title', 'body');

After line 121 inserted the following code to define the new field:

$form['files']['thumb'][] = array(
          '#type' => 'item',
          '#value' => '<img width=100 src="/'. $file->filename . '" >',
        );

Finally, added the 'thumb' field to the themed form by changing line 184 to

$header = array(theme('table_select_header_cell'), t('Name'), t('Size'), t('Dimensions'), t('Photo'), t('Title'), t('Body'));

and inserted the following after $filename in line 191

drupal_render($form['files']['thumb'][$key]),

This could probably be done better, but the above method seems to work okay. Surely I'm not the only one who wants this feature--It would be great if it could be added to the module.

#3

vordude - July 28, 2008 - 22:11

Sorry-been ignoring the support queue, I'll take a look at what you propose.

Thanks.

#4

jasonkotter - July 30, 2008 - 13:53

Thanks . . . I realized that for users uploading hundreds or even dozens of photos, waiting for thumbnails to load would be prohibitively annoying. It would be best if this feature could be optional . . . I lack the expertise to code it in such a way, but perhaps you could just include the modified code in comments with instructions in the install file so that users who want to view thumbnails can easily uncomment the code.

#5

vordude - July 30, 2008 - 14:35
Version:5.x-1.1-beta» 5.x-1.2-beta
Assigned to:Anonymous» vordude
Status:fixed» active

True, I was torn on the thumbnails--They'd be great, or annoying, depending on how many photos you load. I built this for a photo blog, where we've posted 30,000 images in about 5 weeks. Thumbnails would have been bad for that one. But if you want to label each photo with a good title, you'll want thumbnails.

I hope to get going on this, perhaps it could be a "Setting" you could turn thumbnails on or off.

What do you think.

#6

jasonkotter - July 31, 2008 - 15:18

I think that a setting that could be turned on or off would be perfect! Let me know how it goes.

#7

vordude - September 18, 2008 - 16:10
Status:active» needs review

Here's a patch that will do thumbnails--

I'll put it in the module once I get the confirmation that it's working for people.

On the settings window, you have the option to use thumbnails, or not. By default they're turned off.

I have a feeling there's a cleaner way to code it--and am open to suggestions.

AttachmentSize
imagefield_import_thumbnails.patch 8.23 KB

#8

wulff - November 21, 2009 - 11:48
Version:5.x-1.2-beta» 6.x-1.x-dev
Assigned to:vordude» wulff
Status:needs review» active

This is on my wish list as well. Marking as a feature request for the Drupal 6 version.

#9

wulff - November 24, 2009 - 11:08
Status:active» fixed

This has been added to the latest development version.

#10

System Message - December 8, 2009 - 11:10
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.