Emvideo allows users to embed videos from 3rd party providers, youtube, vimeo etc. This patch adds a formatter and a theme function to use the modal theme function from emvideo to render the video in a fancybox output.

I extended the javascript by adding a setting to allow users to click on the videos (if i had added it as a setting it would just clutter the admin interface, and we need this false for videos anyway) and added a selector for the emvideo modal popups.

Tested with youtube.

Comments

snufkin’s picture

StatusFileSize
new3.93 KB

Sorry I missed the theme function for the formatter when i cleaned up the code, updated patch.

hankpalan.com’s picture

Any move to implement this into the dev version?

echoz’s picture

Fancybox changes since this patch was made are not in the areas effected by the patch, so I got the latest dev (10/23) to patch with this, and it is working fine, thanks @snufkin! The only issue with the patch is it would not cleanly patch the js file in it's sub directory, I needed to tell the terminal what file to patch. I wanted to roll a new patch against the latest version (using this code) but my patch does the same thing. Any help getting this patch corrected so it's committable?

echoz’s picture

StatusFileSize
new3.52 KB

Ok, I just learned that to patch into files in a sub directory we need to add -p0 to the patch command like so: patch -p0 < example.patch
So here is the patch from #1, rerolled for 6.x-1.x-dev (from 10/23)

the patch applies cleanly to 6.x-1.x-dev (from 10/23)
It is unchanged code from the patch in #1

I have YouTube videos through emfield working with fancybox (through viewscarousel).
I hope someone else will test this and hopefully lead to a commit as a fancybox feature (or I'm in upgrade hell).

snufkin’s picture

Status: Needs review » Reviewed & tested by the community

Well if all else fails we can make a contrib module out if this, but looking at other *box modules, like lightbox2: they provide the contrib support themselves.

I am setting it RTBC, because echoz tested the original patch and is code not been changed (we are also using this change on live sites for ages now).

bas.hr’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the patch, it took while for me to test :/ but now is committed.

Thanks

klonos’s picture

Component: Code » Documentation
Status: Fixed » Needs work

...coming from #742236: emaudio support. Still, there is no documentation for this and the module's project page reads:

Provides the Fancybox jQuery plugin for displaying images (HTML content and
multimedia support will come) in an elegant box.

This should be updated to say that multimedia support is provided (partially cause this only for video and not audio) through emvideo + there's a line end after the word and that makes the description wrap to a new line. That should be removed.

Also, if I were a newcomer and didn't know what emvideo is, where would I find it? ;)

So, a link to Embedded Media Field project should be added saying that it is a dependency if video/multimedia content is to be displayed through fancybox.

snufkin’s picture

Lets whip up a proper readme first, we can try to improve the project page later on. You can roll a patch to the README, or propose documentation text in comments, i am sure more people would chip in if they see the ball rolling.