Download & Extend

Add theme function for HTML5 output

Project:Video Filter
Version:6.x-3.0
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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

#1

Status:active» postponed (maintainer needs more info)

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

#2

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.

AttachmentSize
youtubehtml5classes-1233706.patch 1.17 KB

#3

Title:video-align class not added to object» Add theme function for HTML5 output
Category:bug report» feature request
Status:postponed (maintainer needs more info)» needs review

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

AttachmentSize
1233706_video_filter_html5_theme.patch 4.68 KB

#4

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

#5

Version:6.x-3.0-beta2» 6.x-3.0
Status:needs work» needs review

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.

AttachmentSize
1233706-theme_video_filter_iframe.patch 4.54 KB

#6

Status:needs review» fixed

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

#7

Thanks a lot. My problem is fixed now.

#8

Status:fixed» closed (fixed)

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