У меня проблема с модулем swfobject_api или jwplayer
Когда я использую этот код в node.tpl.php, все в порядке
$config='sample';
$flashVars=array( 'file' => 'path to flv' );
print theme('jwplayermodule_render_player', $config, $flashVars);
Но когда я использую этот код в front-page.tpl.php, код не работает
В node-tpl.php этот скрипт возвращается
<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>
Но в front-page.tpl.php не возвращается
Я положил <?php print $closure ?>
в footer.php и включил его в front-page.tpl.php и node.tpl.php
извините за мой плохой английский