zoukankan      html  css  js  c++  java
  • bootstrap 幻灯大图结合dedecms的autoindex

     1     <div class="container" id="banner">
     2   <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
     3   <!-- Indicators -->
     4 
     5 
     6   <!-- Wrapper for slides -->
     7   <div class="carousel-inner" role="listbox">
     8  {dede:arclist row='5'     flag ='h' orderby ='id'}
     9     <div class="item [field:global name=autoindex runphp="yes"]if(@me==1){@me='active';}else{@me='';}[/field:global]">
    10      <a href="[field:arcurl/]"><img src="[field:litpic function='firstimg(@me)'/]"  width="1024px" alt="" ></a> 
    11     </div>
    12     {/dede:arclist}
    13   </div>
    14 </div>
    15 
    16     </div>
    17     <div  class="smallpic container wrap">
    18           <ol class="btns">
    19  {dede:arclist row='5'     flag ='h' orderby ='id'}
    20      <li data-target="#carousel-example-generic" data-slide-to="[field:global name=autoindex runphp="yes"]@me=@me-1;[/field:global]" >
    21       <img src="[field:litpic/]" alt="" >
    22     </li>
    23     {/dede:arclist}
    24 
    25   </ol>
    26     </div>

    缩略图提取第一张大图

    1 //将缩放图转变为文章第一张图片 
    2 function firstimg($str_pic) 
    3 { 
    4 $str_sub=substr($str_pic,0,-7).".jpg";//删除缩略图字符串最后七位,然后再补上后缀.jpg 
    5 if(!file_exists($_SERVER['DOCUMENT_ROOT'].$str_sub)) $str_sub=$str_pic;
    6 return $str_sub; 
    7 }

    织梦自增标签的笔记

    autoindex   itemindex 的使用心得区别  

    channelartlist 标签下使用 {dede:global name='itemindex' runphp='yes'}@me;{/dede:global}

    自增1

    arclist            标签下使用 [field:global.autoindex/] 默认从1开始
    channel         标签下使用 [field:global.autoindex/] 默认从0开始
    channelartlist 标签下使用 {dede:global.itemindex/}  默认从1开始

    arclist  从0开始 [field:global name=autoindex runphp="yes"]@me=@me-1;[/field:global]

    channel  从1开始 [field:global name=autoindex runphp="yes"]@me=@me+1;[/field:global][field:typename/]

    channelartlist  从0开始 {dede:global name=itemindex runphp='yes'}@me=@me-1;{/dede:global}

  • 相关阅读:
    weblogic复现利用系列-2019
    weblogic复现利用系列-2020
    Python3编码解码与数据类型转换
    weblogic复现利用系列-2017
    weblogic从ssrf到redis获取shell
    fastjson反序列化复现
    shiro721复现
    Shiro550复现和挖掘思路
    RMI反序列化
    手写一个admin 组件------STARK
  • 原文地址:https://www.cnblogs.com/tl542475736/p/4266620.html
Copyright © 2011-2022 走看看