Closed (fixed)
Project:
Embedded Media Field
Version:
6.x-1.24
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
14 Mar 2008 at 12:52 UTC
Updated:
17 Sep 2010 at 19:00 UTC
Great module! I concur with others that this is great for those non-programmers among us.
I am filtering two different node types in a table view. Each one of these node types has a thumbnail, I would like to set up in the View a field (or two) to show one thumbnail or the other. So if it is node type:A we only see thumbnail A or node type:b we only see thumbnail B.
Is this possible?
Comments
Comment #1
catchBy thumbnail do you mean cck imagefield or something else?
Comment #2
catchoops.
Comment #3
michellepurestock commentedHi,
I am using two modules to create video. One for flash upload video and one for embed media field gets the thumbnail from other video sharing sites. Each module has a different way of generating a thumbnail. Flash Upload Video generates a thumbnail from the module, embed media field gets it from the original external sites code.
The upload video comes with a placeholder thumbnail that shows until one has been converted during the conversion to flash process.
I can add both of these fields of the thumbnail to a view when using a table but when the table row is showing an embed media field it shows both the embed media field thumbnail and the placeholder thumbnail from flash upload video.
Interestingly this does not happen the other way around, if the table row is showing the flash upload video node type the thumbnail field only shows the one generated for flash upload video.
Comment #4
sunSorry, this issue cannot be solved within Views.
Comment #5
BeaPower commentedCan this still be solved with any recent modules? I too am wondering how this can be done.
Comment #6
aaron commentedThis is now possible with a combination of Styles and Node Reference / Embed Media Browser (nrembrowser). The Styles module creates Styles presets, which allow fields in CCK & Views to be displayed according to a class defined by a filter callback, allowing, for instance, the display to be dependent on node type or filefield mimetype. Nrembrowser implements some basic functionality for node references, filtering by node type. It also adds a nifty 'media'-like widget browser for editors to insert photos, videos, blog posts, etc. into content field or inline to WYSIWYG.
Note that Styles UI doesn't work yet, which means until it does that new styles (such as for video) need to be created programatically, by extending the NrembrowsersStyles class, which is a pita:
in includes/my_video.styles.inc:
and then in my_video.module
and technically all of it other than my_video_styles_register could live in /includes/my_video.styles.inc, and should be automatically called as needed by the Styles module.
I'll finish up the Styles UI soon enough, but for early adopters, this solution already works.
Hope this helps!
Comment #7
aaron commentedNote that after doing this, you'll see a new formatter when you display your node reference field, titled 'Nodereference style: Video'.
Comment #8
aaron commentedalso, it precludes that your video content type is called 'video', with a 'field_video'. otherwise, all of the
and
references should be:
and
should be
Like I said, a pita right now...
Comment #9
aaron commentedFinally, to change the thumbnail width/height, you'll also need to alter or add the existing Thumbnail preset. I leave that as an exercise for the reader; you'll need to dig through the code.
Comment #10
aaron commentedAnd finally, I just noticed the version. This is for Drupal 6, unfortunately.
Comment #11
aaron commentedAnd I read the original post again, and saw my solution isn't exactly what was wanted; however, it could fairly easily be modified to do what's wanted, by using theme('emvideo_video_thumbnail') instead. Except you don't even need most of that, as emfield thumbnails are automatically generated with the module. But it might need handling for the Flash Upload Video module; I'm not familiar with that module.
Comment #12
aaron commentedto be honest, you can probably implement what you want with views simply by displaying both relevant fields; if the field doesn't exist in one type, it will be empty. however, be forewarned that (i believe) you will end up with an empty div, which might cause problems in css, depending on how you're using the wrappers.
Comment #13
alex ua commentedI'm marking this one as fixed given the comments in #11 & #12