首页 > Web开发 > 详细

PhpCMS标签:专题模块special标签

时间:2014-08-16 23:39:31      阅读:490      评论:0      收藏:0      [点我收藏+]

专题模块

专题模块PC标签调用说明

模块名:special

模块提供的可用操作

 

操作名 说明
lists 专题列表
content_list 专题信息列表
hits 专题信息点击排序

下面对所有的操作分开说明

 


 

专题列表(lists):

可用参数:

 

参数名 是否必须 默认值 说明
siteid 否 当前站点 站点ID
elite 否 null 是否推荐
isthumb 否 null 必须有缩略图
listorder 否 null 排序方式

代码例子:

{pc:special action="lists" siteid="$siteid" elite="1" listorder="2" num="3"}

{loop $data $r} 
     <div class="changeDiv"> 
        {loop $data $r} 
           <a href="{$r[‘url‘]}"><img src="{thumb($r[‘thumb‘], 224, 112)}" width="224"height="112" alt="{$r[‘title‘]}" /><p><strong>{$r[‘title‘]}</strong><br /> 
{$r[‘description‘]}</p></a> 
        {/loop} 
      </
div>

{/pc}

返回参数如下表:

 

字段类型空默认注释
siteid smallint(5) 否   所属站点ID
id smallint(5) 否 0 专题ID
title char(60) 否   专题名称
thumb char(255) 否   专题缩略图
banner char(100) 否 0 专题横幅
description char(255) 是 0 专题导读
url char(100) 是 0 专题url地址
ishtml tinyint(1) 否 0 生成静态
ispage tinyint(1) 是 0 首页实现分页
int(10) 是 0 创建时间

 

专题信息列表(content_list):

可用参数:

 

参数名 是否必须 默认值 说明
specialid 是 null 专题ID
typeid 否 null 分类ID
isthumb 否 null 必须有缩略图
listorder 否 null 排序方式

代码例子:

   

 

{pc:special action="content_list" specialid="$specialid" typeid="$typeid" listorder="2"num="3"}  

{loop $data $r} 
       {loop $data $r} 
                <div class="bk20 hr"><hr></div><h4 class="blue"><a href="{$r[‘url‘]}"target="_blank">{$r[‘title‘]}</a></h4> 
                <p>{str_cut($r[‘description‘], 150)}</p> 
                {/loop}

{/pc}

返回参数如下表:

 

字段类型空默认注释
id mediumint(8) 否   ID
smallint(5) 否 0 专题ID
title char(80) 否   文章标题
smallint(5) 否   分类ID
char(100) 否 0 url地址
char(100) 是 0 缩略图
char(40) 是 0 关键字
int(10) 否 0 添加时间
int(10) 否 0 更新时间
islink tinyint(1) 是 0 外部链接

 

专题内容排行榜(hits):

可用参数:

 

参数名 是否必须 默认值 说明
specialid 否 null 专题ID
listorder 否 null 排序方式

代码例子:

      {pc:special action="hits" specialid="$specialid" listorder="2" num="3"}

  <ul>

   {loop $data $r} 
     <li><a href="{$r[‘url‘]}">{$r[‘title‘]}</a></li> 
   {/loop}

{/pc}

返回参数如下表:

 

字段类型空默认注释
hitsid char(30) 否   ID
views int(10) 否 0 总浏览数
yesterdayviews int(10) 否 0 昨天浏览数
dayviews int(10) 否 0 当日浏览数
weekviews int(10) 否 0 本周浏览数
monthviews int(10) 否 0 本月浏览数
url char(100) 是 0 url地址
title char(60) 否 0 标题

PhpCMS标签:专题模块special标签,布布扣,bubuko.com

PhpCMS标签:专题模块special标签

原文:http://www.cnblogs.com/hechunhua/p/3917004.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!