Posted by Rob Loach on May 25, 2009 at 3:51am
2 followers
Jump to:
| Project: | SWFObject Filter |
| Version: | 6.x-1.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
The SWFObject API is awesome, use it instead:
<?php
drupal_add_js('http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js');
?>The above will not work if you have preprocessing on. Thank you.
....... On a side note, external JavaScript is in Drupal 7. For caching that, see #219346: Cache External Javascript.
Comments
#1
I haven't used SWFObject API, but based on it's README.txt these are the advantages of SWFObject Filter:
I'll be happy to work with SWFObject API developers to merge the two projects if that seems like a good idea.
#2
What I mean to say is that you could have the filter use SWFObject API to add things to the page. Something like this maybe?
<swf src="http://example.com/object.swf" width="600" height="400">It would read that values, and then call
theme('swfobject_api')with the appropriate output.Either way, this has been added to the similar module review group here.
This is not a fixed issue because if you turn on JavaScript preprocessing, the call to
drupal_add_js()will not work. You'll either have to switch to SWFObject API, or use something like this:<?phpdrupal_set_html_head('<script type="text/javascript" src="http://example.com/example.js" />');
?>
Thanks.