First off, thank you for an awesome module :)
I'm working on a site that uses it, and I noticed while theming that it causes a bunch of HTML validation issues, and there's a quick fix for it. I don't know how to do a patch, but I can tell you where the changes are:
In the player.inc file, changing the & to an & on this line reduced the amount of errors on the site tremendously.
294 -'flashvars' => implode('&', $flashvars)
294 +'flashvars' => implode('&', $flashvars)
In thumbs.inc, the thumbnail <img> tag, is missing an alt attribute.
266 $parts[] = '<img';
267 $parts[] = 'src="' . file_create_url($video->thumb_file->filepath) . '"';
268 $parts[] = 'width="' . $width . '"';
269 $parts[] = 'height="' . $height . '"';
270 +$parts[] = 'alt="video"';
Finally, although I realize I can change it on my own, changing the default theme function to get rid of the <center> tag, will eliminate all validation errors I know about.
711 function theme_op_video_thumbnail($thumb) {
712 - $output .= "<center>\n";
713 $output .= $thumb . "\n";
714 - $output .= "</center>\n";
715 return $output;
716 }
717
718
719 function theme_op_video_player($player) {
720 - $output .= "<center>\n";
721 $output .= $player . "\n";
722 - $output .= "</center>\n";
723 return $output;
724 }
Thanks again for a great module :)
Comments
Comment #1
jacineAll was going well with these changes until I realized Firefox was no longer able to load the video's. I tried making a few changes in the JavaScript file, but that didn't work. I know this isn't a critical issue, but I was really hoping to fix the validation errors. Any ideas?
Comment #2
jacineI figured out the issue in Firefox. Firefox was somehow generating
&amp;callbackinstead of&callback.Changing this line 102 of ufo.js fixed it all:
from:
_p.setAttribute("value", aValue);to:
_p.setAttribute("value", aValue.replace(/&/g,'&'));So, now it works in all browsers (I tested Safari, Opera, Firefox, IE6, IE7) and it completely validates and I'm a happy camper :)
Comment #3
jbrown commentedComment #4
jbrown commentedThanks Jacine!
Can you port this to 5.x-3.x?
Comment #5
jbrown commented#331622: No "alt" attribute in video thumbnail