It would be great to have a multifunction embed field in the CCK. This CCK field would allow video, picture, or audio links to be placed in it. This is great for Digg or Reddit style websites where users are submitting content of different types and you dont want to create seperate drupal content types.

CommentFileSizeAuthor
#15 emfield_generic.patch336.13 KB-enzo-
#15 emfield.zip102.05 KB-enzo-
#35 emfield.patch349.88 KB-enzo-
#32 emfield.patch315.36 KB-enzo-
#32 emfield.zip102.05 KB-enzo-
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

danielnolde’s picture

Absolutely! Unified media-field would be a great thing!
A unified media/embed CCK-field would be a significant usability improvement - the user could just enter the url/embed-code and happily list different media.
The current seperation of media-types with several distinct cck-fields is a way outdated concept and severely limits the benefit of this great module - and a unified interface is one of this module's goals, isn't it?!

aaron’s picture

Status: Active » Postponed

i think this is a duplicate feature, but leaving open just in case it's not. postponing until after d6 version release at the earliest.

SeanBannister’s picture

Title: Multifunction Embed Field (CCK) » ONE field for Video, Images, Audio (Unified Media Field)
Version: 5.x-1.x-dev » 6.x-1.x-dev
Status: Postponed » Active

Now that a Drupal 6 release is near I wanted to rally support for this feature, I plan to look at it as soon as there's a working Drupal 6 version.

Alex UA’s picture

Status: Active » Postponed

Please don't mark things as active when the maintainer of the module has marked it "postponed", unless of course you are willing to do the active development to make it happen.

Given all the work being done on file handling in Drupal 7 this is postponed until at least then...

SeanBannister’s picture

Status: Postponed » Active

Yes, I intend to do active development, I need the feature and I think there's a heap of people who would find this really useful. As soon as there's a Drupal 6 release (what looks to be very soon) I'm going to submit a patch, however I'm not up to speed on Emfield code so was hoping there would be a few people willing to help out.

Alex UA’s picture

Looking forward to checking out your patches!

SeanBannister’s picture

I've just started to look at this and will release patch to the alpha when it's released.

SeanBannister’s picture

I've been really busy and haven't had a chance to start on this. I do think it's good time to start though as emvideo has been ported and emaudio and emimage are on their way. Because I think this is so useful for the community I will put up $150 for any one interested in developing this, I've posted a job at http://groups.drupal.org/node/16878 just in case someone was interested in a little incentive to do this.

Alex UA’s picture

This is definitely the way we're heading with this module, and we're going to start tying into filefield for the thumbnail functions, so we're working towards it, but it's still a long ways off.

Sean- I know you mean well with your offer, and I'm sure it's generous for what you can afford, but any developer who could do this would be insulted by your offer (since most charge that much for one hour of work and this will tens, if not hundreds, of hours of work).

SeanBannister’s picture

Yeah I totally understand that it's not a lot but lets face it we all work on Drupal issues and most people don't get paid for it. This is more of an incentive to anyone wanting to work on this. I actually wish more people would cough up a few 100 cash for feature requests.

I was having a look at the code today, getting my head around emfield and thinking about starting this myself and really didn't think it would take 100's of hours but maybe I missed something. I'm really not up to speed on the emfield code.

aaron’s picture

if one were to go about doing this, it would probably be simply a module that provides its own field type, displayed as a text field, with all the emfield types and providers, and calls the correct elements from the respective modules as needed. i estimate 10s of hours, certainly not 100s.

a bonus might be to also provide a jquery switcher to integrate with filefield as well.

SeanBannister’s picture

Yes that's how I was planning to do it. Do you think eventually the individual image, video, audio CCK fields will be removed and it will just be one field? As long as there's an option to limit a field to a certain media type.

I like the idea of a jquery switcher, possibly has other use cases outside of emfield so might be useful as a separate module. Better control over the layout and functionality of CCK fields is much needed.

SeanBannister’s picture

I've been working with -Enzo- on this and it's working really well, we'll post a patch soon. It's currently called emfield_generic, anyone got any better ideas? If we remove emvideo, emimage and emaudio this new field technically would be the emfield.

We've moved the providers to :
emfield/contrib/emfield_generic/providers/video
emfield/contrib/emfield_generic/providers/image
emfield/contrib/emfield_generic/providers/audio

But we kept the current providers in place so we make a decision on the future of emvideo, emimage and emaudio.

Really need some feedback :)

bonobo’s picture

Subscribing --

-enzo-’s picture

Status: Needs review » Active
FileSize
102.05 KB
336.13 KB

Hello folks

Sponsored by Anexus IT I created a emfield generic

Attached could you check my patch created using the head in cvs repository or the complete emfield module in a zipped file.

Please check and give me any feedback or recommendations

Best regards

enzo

SeanBannister’s picture

The patch is huge due to the providers been moved. I think we need to talk about the future of emfield and if we're going to keep the other 3 modules (emaudio, emvideo, emimage) so we know where these provider modules will be. I see no reason to keep these 3, but I'm unsure if the current directory structure is ideal.

OptimusPrime23’s picture

I think you could use the file field module for this.(http://drupal.org/project/filefield )Which adds a type called "file" in your CCK and in the configuration u can specify the extensions of file that the field should accept eg: jpg,wmv,mp3 etc
I think this could resolve your issue

SeanBannister’s picture

The ability to control what content goes into a field audio/video/image is possible by just selecting those providers when you add the field to the content type.

aaron’s picture

wow, wow, wow! great job folks! i'm going to spend some time today reviewing this.

without having looked at the patch yet, i think it's still important to be able to allow admins to decide whether to allow video, images, audio as groups. not sure if doing that with the separate modules is the way to go, or whatever method you're using in the patch.

again, thanks for the hard work. i'll post any new thoughts after trying out the new functionality later today.

aaron’s picture

sorry i hadn't seen your message from last week asking for feedback. my dream ui would have something like a checkbox from the main admin screen that says something like 'Allow Video', that when checked, slides open a fieldset with allowable video providers, and slides it closed (or grays it out) when not checked. The same for audio and images.

if your patch doesn't do that, we can always add that in the future.

aaron’s picture

we could probably implement hook_elements and create a new form theme for that ui functionality.

aaron’s picture

one thought is that before removing the other modules, we'd also need to create an upgrade/migration path for folks. i have a feeling in either case we'll need to branch development into a version 2 of the module. i'm sure there are other improvements we can make along the way with such a drastic change.

aaron’s picture

also, i don't want to commit a d5 version until we've ported this patch to d6. it would get very messy for people upgrading otherwise.

-enzo-’s picture

Hello Aaron

In our approach, from emfield settings, the administrator decided what provider will be enable to use in each cck field,

For instance:
*If the administrator only enable 10 providers from 30 available

*When some user create a new emfield generic only will have 10 providers listed and again the creator or cck field only could select a subset like 4 providers from 10 available

*when someone will introduce and embed field only will be valid for four providers selected for this specific cck field.

Best regards

enzo

SeanBannister’s picture

Status: Active » Needs review

Wasn't sure what you meant by

also, i don't want to commit a d5 version until we've ported this patch to d6. it would get very messy for people upgrading otherwise.

Because this patch is for Drupal 6, do you mean it needs backporting to Drupal 5?

aaron’s picture

Oh, noes! Just saw that. HEAD is not for the d6 version, that's at DRUPAL-6--1. Sorry for the confusion. Hopefully the patch will still apply. And no, I'm not interested in backporting this; I'm hoping to close d5 from active development (unless someone else wants to backport it).

Thanks,
Aaron

SeanBannister’s picture

Ok that sounds good, let me know if you get a chance to test out the patch to give us some direction and let us know of any problems or improvements.

aaron’s picture

The patch completely fails against the DRUPAL-6--1 branch. HEAD is the d5 branch. We'll have to diff the zip files to see what's different.

SeanBannister’s picture

That's strange I haven't looked at the patch but I ran the emfield.zip on my Drupal 6 install. Could you let us know -enzo-.

-enzo-’s picture

Hello Aaron

Could you provide the complete path in cvs, because I can't find to generate the correct path.

Best regards

enzo

aaron’s picture

The d6 dev branch is DRUPAL-6--1. The quickstart guide to CVS is at http://drupal.org/handbook/cvs/quickstart. You'll probably want to do something similar to

cd contributions/modules/emfield
cvs update -dP -r DRUPAL-6--1

If that doesn't help, it may be easier to grab the release package at http://drupal.org/node/265251, which is good up to November 20, the date of the last commit.

-enzo-’s picture

FileSize
102.05 KB
315.36 KB

Hello guys

This is my new path

I create this patch downloading from cvs and with diff

diff -urpN emfield emfield_new > emfield.patch

Please check and let me know if it is working

Sponsored by Anexus IT

Best regards

enzo

SeanBannister’s picture

Just tried out the zip of this version and I can't post content, it's just doesn't display on the nodes page once submitted.

SeanBannister’s picture

Ok my fault, I just did a fresh install and it works fine, guess I had left over crap from all the tests i'd been doing.

-enzo-’s picture

FileSize
349.88 KB

Hello People

Today I update my cvs working copy to generate a new patch, just in case my last patch will be used with and oldest copy of dev, besides I replace the paths in patch in order to simplify the patching process.

Alex report a issue with configuration http://drupal.org/node/344581 Alex you could try again with any youtube video, or please provide me the code you use to test, maybe could an error in provider code

Please check the new patch.

Best regards

Sponsored by Anexus IT

enzo

danielnolde’s picture

Status: Active » Needs review

Hey, great, -enzo- and Sean for the effort and the great idea!
Honestly, i ruled out emfield at first, but your work made it a good fit for my purpos - emfield_generic is really working well and is definitely the way emfield should be.
@aaron / Alex UA: Is this going to be commited in this way? Would be great if we could start using this now based on this patch and then just continue with it when the new official versions are ready...!

danielnolde’s picture

Wow, great, -enzo- and Sean! Thanks for the effort and the great idea!
Honestly, i ruled out emfield at first, but your work made it a good fit for my purpos - emfield_generic is really working well and is definitely the way emfield should be.
@aaron / Alex UA: Is this going to be commited in this way? Would be great if we could start using this now based on this patch and then just continue with it when the new official versions are ready...!

aaron’s picture

We're going to have to revisit this for version 2 of the module, which I'll be starting soon. The Media module is going to transform how files are stored and accessed, and third party providers will be accessed using PHP stream wrappers. Embedded Media Field will tap into that, and the idea of separating functionality between media types is going to be made obsolete. But I'm not sure of the particulars quite yet.

-enzo-’s picture

Hello aaron and danielnolde

Sound great. Just let me know if you need any clarification about my logic or maybe if you need help for few lines of code.

Best regards

enzo

danielnolde’s picture

thanks, -enzo-, for me, emfield_generic (using your latest emfield.zip) is working great and just as expected!
can't wait to see it CVS-committed to regular emfield.module!

SeanBannister’s picture

Media Module looks awesome and can't wait to use it, I still think this patch is relevant however.
My understanding of Media Module is it creates an interface for a number of CCK fields by placing them on tabs. However this would still mean we'd need an Emfield Image/Video/Audio tab. Is this correct?

It makes sense to have one customizable field that can be added multiple times, if need be, with specific providers.

danielnolde’s picture

yeah, i think media.module and emfield_generic have both sense and reason for existence.
emfield_generic is what emfield should really look like!
It's there, it works, so let's get it commited, .. or at least keep working to get it into emfield, right?!

-enzo-’s picture

Hello People

Well

This separation could be logic, because we could create three emfield_generic called field_audio, field_video and field_image and the editor of content will be careful about what kind of content past in each field, make sense?

aaron what do you think?

Best regards

enzo.

SeanBannister’s picture

Hi Enzo,
Just trying to understand what you mean,
I don't see an advantage in having the 3 fields because you can achieve the same with one field and get the same functionality plus the advantage of having one field for all media types. From what I can see Media Module won't allow one field that accepts image, audio, video. It would create 3 tabs called Image, Audio, Video and a user would have to select.

aaron’s picture

Actually, yes, Media Module will hijack a field and have it accept image, audio, video, pdf, whatever, and local & remote files to boot. Media sprint tomorrow; one of the tasks will be continuing integration w/ emfield, which will solve all of this once and for all.

The problem with the current generic field is that we still need to take care of the upgrade path. As version 2 of the module will be far superior to any current offering, I'm hesitant to put too much dev into something that will be obsolete in a month.

SeanBannister’s picture

Wow, thats going to be awesome can't get my head around it but can't wait to see how it works.

-enzo-’s picture

Hello aaron

One question, when you said Media you refer a new module or a new version of Embedded Medial Field?

Regards

enzo

SeanBannister’s picture

Enzo : The Media Module is going to create an interface to manage media in Drupal, there's some pretty cool mockups and details at http://groups.drupal.org/node/18085

danielnolde’s picture

Hey -enzo-!

Is there any info on what the furtue of emfield_generic will be? Will it be integrated/merged with emfield? Will it be a permanent fork? We use your emfield_generic a lot an wonder what way it will be taken in the near future, whether it will be maintained, updated, etc.
Would be great if emfield_generic would be included in emfield, it simplifies the end-user interface *tremendously*, and is for many use-cases way better than the heavy-weight media.module phantom.
Thanks for your great work and keep on rocking!

cheers,

daniel

SeanBannister’s picture

Hey Daniel,
I don't think this will be maintained as Enzo was doing this update due to my need for it. I still believe this is the way to go, as you said "it simplifies the end-user interface *tremendously*" and doesn't remove any functionality. But as Aaron mentioned in #45 "The problem with the current generic field is that we still need to take care of the upgrade path. As version 2 of the module will be far superior to any current offering, I'm hesitant to put too much dev into something that will be obsolete in a month." So I'm waiting to see what happens before I start using the module as I don't want to get stuck down a dead end.

-enzo-’s picture

Hello Daniel

Well Aaron the module maintainer said two post before, he will use part of the login in new releases, I guess Aaron is wait for Media Module release to choose a decision.

I loved you use this hack, I just implement the Sean's idea, but if more people think that could be a good a idea create a fork, could be consider.

Regards

enzo

aaron’s picture

Status: Needs review » Needs work

Oh, please, let's not do a fork. The work to create a fork would be more than getting this patch suitable for release, and make things infinitely more difficult for users trying to decide how to go forward. Not to mention it would split existing efforts.

By far the largest problem with the patch as it stands is that it duplicates all the existing provider files, making literally twice as much work to maintain. To put it lightly, this is suboptimal.

Off hand, I can think of two ways to avoid doing this:

A) Scan the emfield contrib folder for provider files to include.
B) Require that at least one of emvideo/emimage/emaudio is turned on, and poll those modules for provider files to include.

Option B would be, IMHO, the better solution, as it would also automatically grab any provider files maintained outside emfield, such as at http://drupal.org/project/media_brightcove or http://drupal.org/project/media_8tracks. This also would allow us to continue the ongoing solution of moving provider files outside of the main project for better ongoing maintenance.

aaron’s picture

Option B would also make the new module more future-proof, as it would be better inline to receive the benefits of future Media development.

SeanBannister’s picture

@aaron: The duplication was only a temporary so people could test out emfield_generic without losing the old functionality. I agree with Option B it sounds good, my thought was emvideo/emimage/emaudio wouldn't provide the field this would be done separately and instead of calling it emfield_generic it could just be called emfield as their would only be one field type that could then be configured for multiple media types.

Alex UA’s picture

Status: Needs work » Postponed

I'm postponing this (indefinitely): Media module is just about there for Drupal 7, and will be backported to D6 at some point. That will handle this and so, so much more!

Alex UA’s picture

Status: Postponed » Closed (won't fix)

Marking as "Wont fix" since Media Module is the way to make this happen.