帝国CMS灵动标签同日信息颜色相同(不同时间文章信息不同颜色)
灵动标签代码:
[e:loop={35,10,0,0,'','newstime DESC'}]<?
$day=date('Ymd',$bqr[newstime]);
if(!$n){
$n=0;
}
if($bqno==1){
$d=$day;
$class='class="t'.$n.'"';
}else{
if($d==$day){
$class='class="t'.$n.'"';
}else{
$n++;
$class='class="t'.$n.'"';
$d=$day;
}
}
?><a href="<?=$bqsr['titleurl']?>" target="_blank" <?=$class?>><?=$bqr['title']?>_______[<?=date('Ymd',$bqr[newstime])?>]</a> <br>
[/e:loop]
注意:<?=$class?>为class的css样式
--------------------------------------------------------------------------------------
css样式:
.t0 {
color: #DC143C;
text-decoration: none;
}
.t1 {
color: #FF1493;
text-decoration: none;
}
.t2 {
color: #0000FF;
text-decoration: none;
}
.t3 {
color: #008000;
text-decoration: none;
}
.t4 {
color: #FF4500;
text-decoration: none;
}
.t5 {
color: #00FF7F;
text-decoration: none;
}
注意:可以加和多个,因为上面的6个(t0-t5)css颜色,剩下的将为默认的系统颜色
一般如果灵动标签调用10条信息就设置10个css颜色,既:10条信息对应10个日期时间
- 上一篇
帝国CMS教程会员登陆赠送积分
修改步骤:1、进入管理会员字段增加如下字段:字段名:LastTime 字段标识:最后登陆时间 字段类型:大数值型(INT)2、打开,e/class/user.php 找到大约1019行 if($set1&&$set2) 这个地方,在 $location=DoingReturnUrl($location,$_PO
- 下一篇
wordpress开发教程:获取当前文章的前几篇以及后几篇文章
previous_posts_link()与next_post_lnik()这两个函数相信各位wordpress主题开发者一定不陌生,这两个函数是wordpress用来调用当前文章的前一篇以及后一篇文章的。但是有些时候我们为了提高网站PV提高用户体验想多调用