帝国cms常用标签汇总
框架(架构)  /  管理员 发布于 7年前   172
判断会员是否登录 =DoWapRepNewstext($r[newstext])?> 时间调用标签:=date("Y-m-d",$bqr['newstime'])?> 您当前的位置:[!--newsnav--] [!--no.num--] [!--show.listpage--] 内容页 [!--info.next--]下一篇 [!--info.pre--]上一篇 万能标签用[!--onclick--] 灵动标签用=$bqr[onclick]?> 点击量 sql语句 帝国CMS经常用到的调用sql语句: 请注意,如果是帝国7.0版本的,需要将checked=1去掉 小技巧收录: php三元条件运算符: 灵动或者php查询调用编辑器内容的时候要加stripslashes删除反斜杠比如: 内容页当前信息ID: 列表内容模板信息ID: 当前栏目名: 当前栏目父栏目: 当前栏目别名: 当前栏目子栏目: 当前栏目子判断是否为终级栏目: 当前栏目是否有已审核信息: 帝国cms中引入php路径写法(例子是文件在根目录) 排除置顶、头条、推荐等,sql附加条件: 上上级栏目id: 投稿、登陆、反馈、留言等之后跳转指定页面: 统计信息被收藏数: 列表、结合项判断当前没有信息给出提示: 对不起,暂时没有任何信息! 动态使用: 网站名称:=$public_r['sitename']?> 帝国自身的时间转换函数: 此函数自带判断,比较不错,推荐。 判断内容是否有图片,没有图片则显示文中广告 有图片则不显示: 截取加过滤标签: 内容页或灵动标签支持标题属性 灵动标签: 标题截取字数+标题属性: 以上所述就是本文的全部内容了,希望大家能够喜欢。 122 在 123 在 原梓番博客 在 博主 在 1111 在
Copyright·© 2019 侯体宗版权所有·
粤ICP备20027696号
[!--news.url--]skin/default/[e:loop={"select classid,classname,bname from phome_enewsclass where classid='$GLOBALS[navclassid]'",1,24,0}]
isgood=1 一级推荐firsttitle=1 一级头条[e:loop={10,3,0,0}] 10当前栏目,3显示条数,[e:loop={4,1000,0,1,'leib="楼市快讯"','id DESC'}] 1有图片的显示。[e:loop={"select * from phome_ecms_xtgg where firsttitle=1 order by id DESC limit 20",6,24,0}]=$bqno?> [!--no.num--] 循环序号=$bqsr['titleurl']?> =$bqr[title]?> =esub($bqr[title],8)?>[/e:loop]
列表页
$titleurl=sys_ReturnBqTitleLink($navinfor); 获得当前页面的网址
$url = "http://".$_SERVER ['HTTP_HOST'].$_SERVER['PHP_SELF']; 获得当前页面的网址
//报名人数
$num=$empire->gettotal("select count(*) as total from phome_enewsfeedback where kft='".$navinfor[title]."'");
?>
1,根据最新文章 select * from [!db.pre!]ecms_news where checked=1 order by newstime desc limit 10
2,根据推荐文章 select * from [!db.pre!]ecms_news where checked=1 and isgood=1 order by newstime desc limit 10
3,根据热门文章 select * from [!db.pre!]ecms_news where checked=1 order by onclick desc limit 10
4,根据头条新闻 select * from [!db.pre!]ecms_news where checked=1 and firsttitle=1 order by newstime desc limit 10
5,根据评论排行 select * from [!db.pre!]ecms_news where checked=1 order by plnum desc limit 10
6,根据digg排行 select * from [!db.pre!]ecms_news where checked=1 order by diggtop desc limit 10
7,根据投票排行 select * from [!db.pre!]ecms_news where checked=1 order by votenum desc limit 10
8,根据下载排行 select * from [!db.pre!]ecms_news where checked=1 order by totaldown desc limit 10
9,根据评分排行 select * from [!db.pre!]ecms_news where checked=1 order by infopfen desc limit 10
=$bqr['ftitle']?$bqr['ftitle']:$bqr['title']?>
=stripslashes($r['newstext'])?>
$navinfor['id']
$r['id']
$class_r[$GLOBALS['navclassid']]['classname'];
$class_r[$GLOBALS['navclassid']]['bclassid'];
$class_r[$GLOBALS['navclassid']]['bname'];
$class_r[$GLOBALS['navclassid']]['sonclass'];
$class_r[$GLOBALS['navclassid']]['islast'];
$GLOBALS['num']==0为没有信息
'istop=0 and isgood=0 and firsttitle=0'$bbclassid就是上上级父栏目id
$favas=$empire->gettotal("select count(*) as total from {$dbtbpre}enewsfava where id='$navinfor[id]' and classid='$GLOBALS[navclassid]'");
?>
=$favas?>就是这条信息的收藏数
if($GLOBALS['num']=='0'){
?>
}else{
?>
[!--empirenews.listtemp--][!--empirenews.listtemp--]
}
?>
[/code]
网站地址:=$public_r['newsurl']?>
=format_datetime($bqr[newstime],'Y-m-d')?>
$string=$navinfor['newstext'];//内容字段
$some="$num=explode($some,$string);
if(count($num)>1){//判断内容中是否有图片
?>
[!--newstext--]
}else{
?>
[!--newstext--]
}
?>
=esub(htmlspecialchars(strip_tags($navinfor[newstext])),160)?>
内容页:
=DoTitleFont($navinfor[titlefont],$navinfor[title])?>
=DoTitleFont($bqr[titlefont],$bqr[title])?>
=DoTitleFont($bqr[titlefont],esub($bqr[title],32,'...'))?>您可能感兴趣的文章: