">
最新公告
  • 欢迎您光临 我爱模板网,本站秉承服务宗旨 履行“站长”责任,销售只是起点 服务永无止境! 立即加入钻石VIP
  • 帝国cms最新文章显示红色日期的教程

    正文概述 管理员   2025-09-05   4

     

    <div class="index-hot-forum">
      <div class="head clearfix">
                    <div class="head11">
                        <h3 class="tt"><em></em>最新资讯</h3>
                    </div>
    
      </div>
      <ul class="list clearfix">
      
        [e:loop={80,24,0,0}]
    <?
    $newstime=format_datetime($bqr[newstime],'m-d');
    if(date('Y-m-d')==date('Y-m-d',$bqr[newstime]))
    {
    $newstime="<font color=red>$newstime</font>";
    }
    ?>
        <a href="<?=$bqsr['titleurl']?>" target="_blank">
          <li class="list-item clearfix">
            <i class="circle"></i>
            <h2 class="title"><?=$bqr['title']?></h2>
            <span class="timestamp"><?=$newstime?></span>
          </li> 
    </a>
     [/e:loop]
      </ul>
    </div>
    
    

    此方法应用在(栏目)列表页或者标签也的列表内容模板,先勾选开启列表内容模板右上角的“使用程序代码”

    $newimg='[!--newstime--]';
    if(time()-$r[newstime]<=1*24*3600)
    {
            $newimg='<FONT color=red>[!--newstime--]</FONT>';
    }  
    
    $listtemp='<LI><SPAN class="date">'.$newimg.'</SPAN> <a href="[!--titleurl--]" target=_blank>[!--title--]</A> </LI>';
    

     


    我爱模板网 » 帝国cms最新文章显示红色日期的教程

    发表评论

    如需帝国cms功能定制以及二次开发请联系我们

    联系作者
    script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?587cc1e5c052b5b0ce99533beff13c96"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })();

    请选择支付方式

    ×
    支付宝支付
    余额支付
    ×
    微信扫码支付 0 元