Hi,
i tried all modules similar to lightbox (lightbox 2, shadowbox, colorbox, thickbox) and in all of them i have the same problem:
when i click on the thumbnail in the frame box that it will open there are the vertical and horizontal scrollbars.
See attachment.

I checked with the following browser (last versions): safari, firefox, opera, on OS Mac OS X 10.6.6

How can i remove these scrollbars?

Thanks

Comments

nikonvulcano’s picture

Component: Code » Embedded Video Field
Category: support » bug
nikonvulcano’s picture

Any idea?

Thanks

nikonvulcano’s picture

No one has got this problem?

dgsiegel’s picture

StatusFileSize
new2.92 KB

the attached patch fixes this problem for colorbox, media_youtube and media_vimeo modules. the problem is that currently an iframe gets loaded with the css of your theme. if that has some margins/paddings on the body element, the loaded iframe is bigger than the size of the opened colorbox. therefore scrollbars are shown. one solution is to modify your theme css, the other to load the embedded video link directly into the colorbox (this should be done normally, as colorbox and shadowbox support that out of the box).

the attached patch adds a embedded_url variable to the item['data'] field, including the embedded link to the requested video. once loaded, $destination just gets overwritten by that link.

this of course works with shadowbox too, but in the patch i just did it for colorbox (but it is trivial to add the same thing for shadowbox).

hope this helps!

henrijs.seso’s picture

patch #4 loads same page in colorbox instead of vimeo video (using 6.x-2.x-dev of emfield and 6.x-1.1 of media_vimeo)

dgsiegel’s picture

that happens when you don't save your videos before viewing them. on every save, the embedded url gets embedded into the node. if you don't save them the embedded_url field is empty and therefore "" gets loaded which is the current page

nikonvulcano’s picture

Hi dgsiegel
i don't understand your last answer. Can you explain me better, please?

thanks

dgsiegel’s picture

sure. just edit the video again, which you want to open in a colorbox. when you press save the correct url gets stored into the node and can be passed to the colorbox when viewing.

nikonvulcano’s picture

Ok, i understand ... thanks.
The problem now remain with media_flickr (loads same page) ... is it also necessary a patch for that?

thanks

dgsiegel’s picture

sorry, i never had a look at that module. if you get scrollbars with flickr too, then probably a patch like the above is needed

nikonvulcano’s picture

ok, thanks.
Media_youtube work fine ... but with Flickr, instead, the embedded_url field is empty and therefore "" gets loaded which is the current page

marktheshark’s picture

I applied the patch for media_youtube, function media_youtube_video_embedded_url() was inserted in media_youtube.module, but after emptying my views cache and re-saving a couple of video nodes, the scrollbars are still there when I click on a video in my view.

Am I missing something?

dgsiegel’s picture

if you have the devel module installed, have a look if $node['field_video']['data']['embedded_url'] is set to a correct url

marktheshark’s picture

I'll install the devel module and let you know.

jim kirkpatrick’s picture

Version: 6.x-2.4 » 6.x-2.5
Status: Active » Reviewed & tested by the community

Manually applied patch in #4 to my 6.x-2.5 version, fixed the scrollbars very nicely - thanks!

esod’s picture

Patch #4 works well. These aren't my patches but would it be helpful to divide the patch file into 3 files (1 patch file for emvideo.theme.inc, 1 patch file for media_vimeo.module, and 1 patch file for media_youtube.module) and submit them for review by the developers? I'll be happy to do this.

In any case, thanks for the patches!

dgsiegel’s picture

sure, go ahead! ;)

marktheshark’s picture

Reapplied the patch correctly this time.

The scroll-bars are gone but there is one remaining problem:

The video title does no longer fit in the colorbox frame and is hidden by the video.

However this probably has to do with the length of the titles and is unrelated to emfield. Colorbox module has a setting for truncating titles, though I don't understand why the Colorbox isn't styled to expand to accommodate longer titles. I tried title shortening to e.g. 40 chars but the title remained unaffected. Anyway, I'll ask this in the Colorbox issue queue.

esod’s picture

Finally found a moment to break the patch from #4 into its individual components. Although the patches for media_youtube and media_vimeo don't seem to have any effect that I can notice, I applied them anyway.

Thanks again

Bartezz’s picture

Thanx esod! Worked for me!!

Am using latest stables;

  • Emfield 6.x-2.5 2011-May-06
  • Media YouTube 6.x-1.3 2011-Feb-04
  • Media Vimeo 6.x-1.1 2010-Sep-23

Had to apply the patches by hand. But I can confirm these patches fix the scrollbar issues for both YouTube and Vimeo colorbox implementations in both my nodes as well as in view listings.

Re-rolled against the versions above for those who are running latest stables.

Cheers

esod’s picture

I created the patches out of the bundled patch from #4. Comment #4's patch did the job but it did have to be applied by hand since it patched three separate modules. My patches are created against Drupal's revision control versions and can be applied to downloaded versions of the modules like this:

drush (or your tool of choice) dl emfield
cd emfield/contrib/emvideo
patch emvideo.theme.inc no_scrollbars_emfield_emfield_contrib_emvideo-1050792-16.patch

If you are using the version control versions of the module, the patch can be applied like this:

git clone --branch 6.x-2.x http://git.drupal.org/project/emfield.git
cd emfield
git apply -v no_scrollbars_emfield_emfield_contrib_emvideo-1050792-16.patch
aaron’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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