Add support for colorbox when inserting an image through wysiwyg.

Comments

JacobSingh’s picture

This would be a cool feature to add... We do some colorbox stuff with the media_gallery module. If anyone makes any efforts here, it would be cool to sync up those efforts.

Alternately, maybe create a media_colorbox module to put this code in?

-J

NPC’s picture

Colorbox support would be wonderful in Media Browser / WYSIWYG! Subscribing, really hope somebody could implement this.

aaron’s picture

Project: D7 Media » Styles
Version: 7.x-1.x-dev » 7.x-2.x-dev

this would most likely happen through the styles module, once i've set in place the hook to allow other modules to alter the style display. moving to that queue.

Cyclodex’s picture

Issue tags: +youtube, +style, +colorbox

hey all / aaron

I wanted to display youtube videos with media and media: youtube modules.
As i understand, these settings should be made somewhere in the styles part...
( a separate effect as I read...)

So I wanted to ask, how far away is this possibility, or how could i create such a "link" which opens a colorbox ?

I am pretty new to module development etc., and just created my first little modules.
But I did not get the right place to look up...
Any hints or infos ?
How is the progress with the effect part, which seems to be the correct place for such stuff...
Thanks!
Regards

Cyclodex’s picture

StatusFileSize
new1.77 KB
new7.52 KB

Hei people.

Ok, I tried to get into the stuff here. For my situation, I needed a youtube video that will show in a colorbox.

I not only had to create the styles stuff, it also seems that the media_youtube module creates a link that doesn't work for me.
So I also had to change some stuff there, especially the URL:
(changed from "http://youtube.com/watch?v=" to "http://youtube.com/v/"

so this patch is mainly for the media_youtube module, but other things could also be looked up

I tried to do my best, because this was my first changes on a module, please don't get me wrong.
Perhaps someone else can look into my changes, or somebody has some hints how to make that even better.
Just wanted to share my stuff with you.

There is also a README file which contains all steps needed to get to a colorbox youtube field.

So I hope this will help somebody.

There are still some qustions:
- try to make this colorbox behaviour a separate module like "JacobSingh" said.
- make it independent to the displaying image size (until now it has to be configured in the file, perhaps the effect stuff of styles could change that)
Any hints, tips, suggestions are welcome.

murz’s picture

Cyclodex, thanks for the patch, before I try to find the way how to do this without patching and can't find the good way :) And your patch must do exactly that I want!

But I can't patch current media_youtube 7.x-1.x-dev module (2011-Jun-03), here is output of patch command:

$ patch -p0 < ../media_youtube-colorbox-prototype-963712-5.patch 
(Stripping trailing CRs from patch.)
patching file includes/MediaYouTubeStyles.inc
(Stripping trailing CRs from patch.)
patching file includes/media_youtube.styles.inc
Hunk #1 succeeded at 199 with fuzz 1.
Hunk #2 FAILED at 264.
1 out of 2 hunks FAILED -- saving rejects to file includes/media_youtube.styles.inc.rej
(Stripping trailing CRs from patch.)
patching file includes/MediaYouTubeStreamWrapper.inc

As I see, Hunk #2 starts from line 261, but file includes/media_youtube.styles.inc have only 253 lines. Maybe you do the patch for other version of module?

Can you attach the archive with already patched module?

minneapolisdan’s picture

This is something like what I've been searching for, YouTube videos opening in a Colorbox. Thanks, I'll try this out.

kmadel’s picture

The Colorbox File module (sandbox at http://drupal.org/sandbox/kmadel/1084984) will allow you set up what appears in the Colorbox by using the File manage display configuration for each file type (so videos can be different than images, and so on). This is a field formatter for the media field, so maybe a better name would be Media Colorbox. The formatter allows you to specify what File Entity display to use for the link and what display to use in the colorbox. It also has some gallery options and allows you to specify where the caption should come from for this field for the given content display.

The module has been tested against the latest 7.2-dev Media module.

bluegeek9’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Thank you for your contributions to this issue. As Drupal 7 has reached its End of Life and is no longer supported, we are closing this issue. We encourage you to upgrade to a supported version of Drupal.