When adding a video using [video:URL align:right], [video:URL align:left], or [video:URL align:center], the video-right, video-left, or video-center classes are not being added to the object.

If I revert back to 6.x-2.8 the videos are aligned as expected.

Comments

blackdog’s picture

Status: Active » Postponed (maintainer needs more info)

Are you using the HTML5 option? Align won't work with that option I'm afraid.

bneil’s picture

StatusFileSize
new1.17 KB

I was using HTML 5 with a YouTube video. Can we add the classes variable to the iframe as part of the video_filter_youtube_html5 function? I did a quick and dirty patch with the code from theme_video_filter_flash in video_filter.module. I'm not quite sure if this is the best approach, but maybe it's at least a step in that direction? Bear with me, first patch.

blackdog’s picture

Title: video-align class not added to object » Add theme function for HTML5 output
Category: bug » feature
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new4.68 KB

This patch adds a theme function for HTML5, and moves some code to a helper function.

anon’s picture

Status: Needs review » Needs work

Review for patch in #2

+++ b/video_filter.codecs.incundefined
@@ -192,7 +192,23 @@ function video_filter_youtube_html5($video) {
+  $html = '<iframe src="http://www.youtube.com/embed/'.$url.'" width="'.$video['width'].'" height="'.$video['height'].'" class="' . implode(' ', $classes).'" frameborder="0"></iframe>';

Always use a space between the dot and the concatenated parts to improve readability.

Also, check for whitespace

Draknek’s picture

Version: 6.x-3.0-beta2 » 6.x-3.0
Status: Needs work » Needs review
StatusFileSize
new4.54 KB

Updated patch from #3 against version 3.0.

Changed the new theme function to theme_video_filter_iframe (as opposed to html5) since it specifically creates iframe output.
Fixes some whitespace issues.

Should work in both the 6.x and 7.x branches.

blackdog’s picture

Status: Needs review » Fixed

Committed to 6.x & 7.x. Thanks!

monil-dupe’s picture

Thanks a lot. My problem is fixed now.

Status: Fixed » Closed (fixed)

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