米酷影视mkcms7首页修改,幻灯片只调用后台配置的[建站教程]
效果如图:
基于米酷7.03,首涂十三模板,主要修改内容
1.不调用视频数据为幻灯片,只展示后台幻灯片管理添加的。
以下为模板文件中index.php文件中的幻灯片部分,直接复制替换即可:
<!-- 幻灯片 -->
<div id="banner" data-ride="carousel" class="stui-banner carousel slide">
<a class="carousel-control left" href="#banner" data-slide="prev"><i class="icon iconfont icon-back"></i></a>
<a class="carousel-control right" href="#banner" data-slide="next"><i class="icon iconfont icon-more"></i></a>
<div class="carousel-inner">
<?php
for ($i=0;$i<0;$i++){
echo '<div class="item stui-banner__item ';
if ($i<1){echo 'active';}
echo '"><a class="stui-banner__pic" href="/seacher-'.$list1['data'][$i]['link'].'.html" alt="'.$list1['data'][$i]['link'].'" style="background: url('.$list1['data'][$i]['cover'].') rgba(98,71,136,0) no-repeat; background-position: center center; background-size: cover; display: block; width: 100%; height: 100%;" title="'.$list1['data'][$i]['link'].'"><div class="am-slider-desc hidden-lg"><div class="am-slider-content"><h3 class="am-slider-title">'.$list1['data'][$i]['link'].' - '.$list1['data'][$i]['desc'].'</h3><p></p></div></div></a></div>';
}?>
<?php
$flag1 = 0;
$result = mysqli_query($conn,'select * from mkcms_slideshow order by s_order desc');
while($row = mysqli_fetch_array($result)){?>
<div class="item stui-banner__item <?php if($flag1<1){ $flag1 = 2; echo ' active';} ?>">
<a class="stui-banner__pic" href="<?php echo $row['s_url'];?>" alt="<?php echo $row['s_name'];?>" target="_blank" style="background: url(<?php echo $row['s_picture'];?>) rgba(98,71,136,0) no-repeat; background-position: center center; background-size: cover; display: block; width: 100%; height: 100%;" title="<?php echo $row['s_name'];?>"></a></div>
<?php }?>
</div>
<div class="stui-banner__switch clearfix hidden-sm hidden-xs">
<div class="container">
<div class="row">
<ul class="carousel-indicators">
<?php
for ($i=0;$i<0;$i++){
echo '<li data-target="#banner" data-slide-to="'.$i.'" class="';
if ($i<1){echo 'active';}
echo '"><span class="stui-vodlist__thumb" data-original="'.$list1['data'][$i]['cover'].'" style="background: url('.$list1['data'][$i]['cover'].') no-repeat; padding-top: 45%; background-position: 50% 50%; background-size: cover;" title="'.$list1['data'][$i]['link'].'"></span></li>';
}?>
<?php
$flag2 = 0;
$result = mysqli_query($conn,'select * from mkcms_slideshow order by s_order desc');
while($row = mysqli_fetch_array($result)){?>
<li data-target="#banner" data-slide-to="<?php echo $i;?>" class=" <?php if($flag2<1){ $flag2 = 2; echo ' active';} ?>">
<span class="stui-vodlist__thumb" data-original="<?php echo $row['s_picture'];?>" style="background: url(<?php echo $row['s_picture'];?>) no-repeat; padding-top: 45%; background-position: 50% 50%; background-size: cover;" title="<?php echo $row['s_name'];?>"></span></li>
<?php }?>
</ul>
</div>
</div>
</div>
</div>
<style type="text/css">
.stui-banner__pic{ padding-top: 29%; background-position: center center !important;}
@media (max-width:1023px){.stui-banner__pic{ padding-top: 40%; background-position: 50% 50% !important; background-size: cover !important;}}
</style><!-- 幻灯片 -->