0
swfobject_api或jwplayer模塊我有swfobject_api或jwplayer模塊有問題問題與在Drupal
當我使用node.tpl.php一切這個代碼是罰款
$config='sample';
$flashVars=array('file' => 'path to flv');
print theme('jwplayermodule_render_player', $config, $flashVars);
但是,當我用這個在前面page.tpl.php中代碼的代碼無法正常工作
在節點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>
但前page.tpl.php中未返回
我把<?php print $closure ?>
在footer.php,並將其納入前page.tpl.php中和node.tpl.php
對不起我的英語不好