PHPCMS V9标签使用-功能模块-专题模块

专题模块

 

模块名:special

模块提供的可用操作

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

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


专题列表(lists):

可用参数:

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

代码例子:

1
2
3
4
5
6
{pc:special action="lists" siteid="$siteid" elite="1" listorder="2" num="3"}<P></P>
{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>
{$r['description']}</a>
{/loop}
{/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 排序方式

代码例子:

1
2
3
4
5
6
{pc:special action="content_list" specialid="$specialid" typeid="$typeid" listorder="2" num="3"}
{loop $data $r}
<h4 class="blue"><a href="{$r['url']}" target="_blank">{$r['title']}</A><H4></H4>
<p>{str_cut($r['description'], 150)}<P></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 排序方式

代码例子:

1
2
3
4
5
{pc:special action="hits" specialid="$specialid" listorder="2" num="3"}
{loop $data $r}
<a href="{$r['url']}">{$r['title']}</A>
{/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 标题
posted @ 2017-09-11 22:24  初心莫负  阅读(86)  评论(0)    收藏  举报