Default thumbnail if video thumbnail doesn't exist

XBleed - December 13, 2007 - 03:46
Project:Embedded Media Field
Version:5.x-1.x-dev
Component:Embedded Video Field
Category:feature request
Priority:normal
Assigned:aaron
Status:closed
Description

Hello,

Are there any steps that I can take to achieve a default video picture if one can not be created? Right now it looks funky and breaks the page layout on videos that are unable to load a thumbnail image.

Thanks,

#1

aaron - December 13, 2007 - 14:00
Assigned to:Anonymous» aaron

working out a general idea of the UI for this. currently, i have a site that does this -- using an imagefield. the tpl file then sniffs for a custom image. if there is one, it displays that rather than the provider's. i think the best way to do this would be to provide an upload textfield for that, although i hate duplicating code.

#2

vsnguyen - December 13, 2007 - 17:23

For provider that doesn't support thumbnail, I did a return 'http://custome-url-thumbnail' in the .inc file for the time being.

I'm currently working the UI for my site at the moment. I have the default upload form, now I'm working on the custom thumbnail for each provider.

#3

jhedstrom - December 19, 2007 - 00:57
Status:active» patch (code needs review)

Attached is a patch that adds this as a configuration option (while setting thumbnail height and width, you can define a path to the default image). It works off local path, so the image would need to be stored locally.

AttachmentSize
emfield.default_thumbnail.patch2.81 KB

#4

kdebaas - December 30, 2007 - 20:09

I applied the patch to emfield on Drupal 5.5. It works. Thanks.

#5

droople - January 4, 2008 - 02:27

how do I apply the patch?

cheers

#6

Alex UA - January 4, 2008 - 14:06

Please see the following section of the Drupal Handbook:
Applying Patches

#7

aaron - January 4, 2008 - 18:34

i'll take a look at this patch; thanks jhedstrom. meanwhile, i just committed emthumb to the contrib folder, which will allow editors to override thumbnails on a per node basis.

#8

aaron - January 6, 2008 - 18:36
Status:patch (code needs review)» fixed

committed the patch (with a few minor modifications). thanks jhedstrom!

#9

Anonymous (not verified) - January 20, 2008 - 18:41
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.