QQ咨询不加好友发不了信息,咨询前先加好友! → QQ:820896380 ×

帝国cms最新文章显示红色日期的教程

帝国cms最新文章显示红色日期的教程

 

<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>';

 

给TA打赏
共{{data.count}}人
人已打赏
帝国CMS教程

帝国cms后台关闭金刚模式后一片空白的解决方法

2024-11-20 12:23:53

帝国CMS教程

帝国cms文章内容页H2H3实现目录功能

2024-11-20 12:43:55

个人中心
购物车
优惠劵
有新私信 私信列表
搜索