我正在爲joomla創建一個youtube播放列表模塊。joomla模塊include_once問題
<div class="youtubeplayer">
<div class="yt_holder">
<!--Up and Down arrow -->
<div class="you_up"><img src="modules/mod_youtube_playlist/css/up_arrow.png" alt="+ Slide" title="HIDE" /></div>
<div class="you_down"><img src="modules/mod_youtube_playlist/css/down_arrow.png" alt="- Slide" title="SHOW" /></div>
<!-- END -->
<div id="ytvideo3"></div>
<div class="youplayer">
<ul class="videoyou">
它看起來是停在那裏我用的是「包括一次」在下面的代碼(下面的代碼是:
如果我分配模塊到一個頁面,它就會在以下點停止加載我的模塊「tmpl/default.php」文件) - 任何想法?
<?php
defined('_JEXEC') or die;
JHtml::_('behavior.framework');
JHtml::script('modules/mod_youtube_playlist/js/jquery.youtubeplaylist.js');
JHtml::script('modules/mod_youtube_playlist/js/jquery.jquery.youtubeplaylist-min.js.js');
JHtml::script('modules/mod_youtube_playlist/js/youtubeplaylist.js');
JHtml::stylesheet('modules/mod_youtube_playlist/css/youtubeplaylist.css');
JHtml::stylesheet('modules/mod_youtube_playlist/css/indext.css');
?>
<div class="youtubeplayer">
<div class="yt_holder">
<!--Up and Down arrow -->
<div class="you_up"><img src="modules/mod_youtube_playlist/css/up_arrow.png" alt="+ Slide" title="HIDE" /></div>
<div class="you_down"><img src="modules/mod_youtube_playlist/css/down_arrow.png" alt="- Slide" title="SHOW" /></div>
<!-- END -->
<div id="ytvideo3"></div>
<div class="youplayer">
<ul class="videoyou">
<?php
// Use like this.
include_once('/modules/mod_youtube_playlist/class/class.youtubelist.php');
//in this example a playlist
$video = new youtubelist('playlist');
//This is the link to the playlist.
//http://www.youtube.com/playlist?list=PLC4FBCA46405A8BF8
//REMOVE the PL from the string if there is an PL after list=
$video->set_playlist('<?php echo $playlist; ?>');
$video->set_max(50);
$video->set_order('title');
$video->set_cachexml(false);
$video->set_cachelife(86400);
$video->set_xmlpath('./cache/');
$video->set_start(1);
if ($video->get_videos() !=null) {
foreach ($video->get_videos() as $yKey => $yValue) {
echo '<li><p>' . $yValue['title'] . '</p><span class="time">' . $yValue['time'] . '</span><a class="videoThumb3" href="http://www.youtube.com/watch?v=' . $yValue['videoid'] . '">' . $yValue['description'] . '</a></li>';
}
}else{
echo '<li>Sorry, no video\'s found</li>';
}
?>
</ul>
</div>
</div>
</div>
你會得到任何PHP錯誤在這... ????? –