Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Had problems with flash not showing up in IE6 & IE7 so I patched the code per the instruction on Google API (http://code.google.com/p/swfobject/wiki/documentation)
Find line:
// create the html output
$html = "<div id=\"$div_id\" $class >". $base_params['no_flash'] ."</div>\n";
Replace with:
// Build Object
$html = "\n\t<div".$class.">\n";
$html .="\t\t<object id='".$div_id."' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='".$params['width']."' height='".$params['height']."'>\n";
$html .="\t\t\t<param name='movie' value='".$url."' />\n";
$html .="\t\t\t<!--[if !IE]>-->\n";
$html .="\t\t\t<object type='application/x-shockwave-flash' data='".$url."' width='".$params['width']."' height='".$params['height']."'>\n";
$html .="\t\t\t\t<!--<![endif]-->\n";
$html .="\t\t\t\t<p>". $base_params['no_flash'] ."</p>\n";
$html .="\t\t\t\t<!--[if !IE]>-->\n";
$html .="\t\t\t</object>\n\t";
$html .="\t\t<!--<![endif]-->\n";
$html .="\t\t</object>\n";
$html .="\t</div>\n";
Comment | File | Size | Author |
---|---|---|---|
#2 | swfobject_api-5.x-2.0-beta1_IE.patch | 4.13 KB | theoldfather |
Comments
Comment #1
theoldfather CreditAttribution: theoldfather commentedChanged to patch needs review status
Comment #2
theoldfather CreditAttribution: theoldfather commented..and here is the patch file.
Comment #3
Crell CreditAttribution: Crell commentedThe patch doesn't specify a file to patch properly, but if you simply tell it explicitly to patch swfobject_api.module it applies fine. I can confirm both the bug and that this patch fixes it.
Have I mentioned that this is a cool module? :-)
Comment #4
arthurf CreditAttribution: arthurf commentedI'm a little confused about this patch. If you look at step 3 in the wiki page referenced, you see that the swfobject.js file is actually doing the html replacement that is described above. The point of swfobject (at least, as far as I understand it) is to render the swf object after the page is loaded so that the page loads cleanly. The patch goes in the opposite direction hard coding the object into the page.
The point of the module is that it does a few things:
1) it let's you dynamically build the flash code with a simple theme function, basically mimicking:
2) it includes the script call to the js library in the body of the page rather than the head to prevent issues with caching
So basically, it's just a compatibility layer for drupal.
Can i get some more information why you think this patch is needed? It could be that the base params isn't working right and that breaks in IE, but I don't think this fix is a good one.
Comment #5
seutje CreditAttribution: seutje commentedconfirming this solved my issue with the flash not showing up on IE but it removed my flashvars
[edit]
upgrading to latest swfobject library worked better
[/edit]
Comment #6
Crell CreditAttribution: Crell as a volunteer commentedBoth Drupal 5 and SWF are long-since deceased.