我正在为 joomla 创建一个 youtube 播放列表模块。
如果我将模块分配给页面,它将在以下点停止加载:
<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>