We have a content type with an image field, that has a preset. Can we apply this module for this?
please advise.
We tried but only multimedia asset is displayed and we are unable to apply existing image styles too.
Grtz!

CommentFileSizeAuthor
#2 media-widget-1166168-2.patch1.58 KBaaron

Comments

effulgentsia’s picture

Title: Can Mediabrowser be implemented with existing imagefields? » Expose a widget for filefield and imagefield, so that media browser can be used for them
Component: Miscellaneous » Code
Category: support » feature

The dev version of Media does let you apply any image style you want to a multimedia asset field. See #1026790-22: Allow view modes to be dynamically defined. for details. It would be great to get some better documentation or screencasts demonstrating this. If you make such a screencast, please post it to that issue.

But despite that, it would still be a nice feature for the media browser to be usable on image fields and file fields, not just on media fields, so let's use this issue for tracking that. Anyone feeling inspired to write the patch for this?

aaron’s picture

StatusFileSize
new1.58 KB

here we go! image & file fields.

the only issue is that it ignores the 'display' setting on filefields. i don't think that's really an issue; we might go through later and remove it w/ form_alter() if desired later.

aaron’s picture

Status: Active » Needs review
aaron’s picture

note this patch also doesn't handle the new display formatters for media fields. though it works fine w/ styles.

WilliamV’s picture

Thank you.
Keep us informed upon the compatibility for dthe isplay formatters.

baby.hack’s picture

Works for me, but aside from previous issue(s) mentioned, it ignores the setting for file directory. I have an Image Field with the Media Widget, and the file directory set to '[current-user:name]', and this is ignored.

Of course, I expected this, considering that we can't yet set file locations for the Media Module: http://drupal.org/node/1096374

eigentor’s picture

Just wanted to give a big thumbs up for this, though this may be just a cleverly disguised subscribe post...
I was always watching out for this to be taken care of, and it is great aaron got the ball rolling.
Media FTW!

aaron’s picture

When this goes through, of course, it will make the media field obsolete. What to do with that? Should we migrate them all over in an update? Leave them for legacy? Is there a compelling reason to keep them? We need to make the decision before RC. But in another issue, so as to not hold up getting this important functionality.

g76’s picture

Hi,
I really am not trying to hijack this discussion, and my apologies ahead of time if this is out of place, but I just had a quick question regarding the current and future use of filefield/imagefield with media. Is it a safe assumption that for D7 I can go ahead and manually build images and gallery views with imagefield until the media module is more stable for production and safely assume that it can be converted over to using the media module? And is there a suggested module for video embed links, just temporarily?

thanks for all the work, it's incredible:)

Jen

WilliamV’s picture

Great implementation, thanks!
I just tested and everything seems to go well except for the custom image-field upload-path. Apparently the widget overrides this path to root?
So when uploading to a specified folder set in image-field it uploads to root instead. Any suggestion?

yareckon’s picture

sub.. seems like we need a roadmap / bikeshedding thread to give a status update generally on the strategy here.

WilliamV’s picture

@aaron, any news on this one?

aaron’s picture

Status: Needs review » Needs work

i think that the imagefield path can be taken care of at the same time as when we allow paths for the 'legacy' mediafield path. i'll see if i can dig up that issue and give it another go...

aaron’s picture

Status: Needs work » Needs review

actually, i'd like to get this patch in there; the filepath issue will cause a few minor hiccups, but i don't think it will seriously break things, and will be easier to deal w/ in another ticket.

dave reid’s picture

My concern here is that the media and file fields have different field schemas, so is it really quite as easy as just adding the new widget and it will automatically work for file and image fields?

aaron’s picture

yes, it really is that easy. a lot of work has gone into separating out the functionality; this patch just ties up the loose ends. except for the filepath issue, which is an example of core not doing it right -- http://api.drupal.org/api/drupal/modules--file--file.field.inc/function/...

dave reid’s picture

Nice! Yeah I just tested it manually and it does in fact work, although it doesn't respect any of the actual 'display', 'description' properties for file fields or the 'alt' or 'title' properties for image fields, it does at least get us down the right path. Very nice.

aaron’s picture

#2: media-widget-1166168-2.patch queued for re-testing.

aaron’s picture

Status: Needs review » Fixed

start your engines, this is in! will open related tickets in a sec...

Crell’s picture

Pocketpain’s picture

sub

Status: Fixed » Closed (fixed)

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

aaronbauman’s picture

Cross-posting this support request in hopes that someone on this thread knows the answer
#1537172: Where are the "display" and "display by default" checkboxes?