I have a problem with swfobject_api or jwplayer module.
When I use this code in node.tpl.php everything is fine.
$config='sample'; $flashVars=array( 'file' => 'path to flv' ); print theme('jwplayermodule_render_player', $config, $flashVars);
When I use this code in front-page.tpl.php the code is not working.
In node-tpl.php this JavaScript is added.
<script type="text/javascript" src="/projects/theme/sites/all/modules/drupal/jwplayermodule/jwplayermodule_jwembedder.js?c"></script> <script type="text/javascript"> <!--//--><![CDATA[//><!-- jQuery.extend(Drupal.settings, { "jwplayer": { "files": { "jwplayer-1": { "flashplayer": "http://localhost/projects/theme/sites/default/files/jwplayermodule/player/player.swf", "width": "400", "height": "280", "controlbar": "bottom", "wmode": "opaque", "file": "/projects/theme/sites/default/files/1057680_0.flv", "config": "http://localhost/projects/theme/sites/default/files/jwplayermodule/configs/sample.xml", "events": [ ] } } } }); //--><!]]> </script>
In front-page.tpl.php, it is not added.
I put <?php print $closure ?>
in footer.php, and included it in front-page.tpl.php and node.tpl.php.
Sponsored by SupremePR