站点信息

站点路径{pboot:sitepath}
站点语言{pboot:sitelanguage}
首页链接{pboot:sitepath}/
站点LOGO{pboot:sitedomain}{pboot:sitelogo}
站点入口{pboot:siteindex}
站点语言{pboot:sitelanguage}
站点标题{pboot:sitetitle}
站点副标题{pboot:sitesubtitle}
站点关键字{pboot:sitekeywords}
站点描述{pboot:sitedescription}
页面标题{pboot:pagetitle}
页面关键字{pboot:pagekeywords}
页面描述{pboot:pagedescription}
站点域名{pboot:sitedomain}
备案信息{pboot:siteicp}
站点入口{pboot:siteindex}
统计代码{pboot:sitestatistical}
版权信息{pboot:sitecopyright}

公司信息

公司名称{pboot:companyname}
公司地址{pboot:companyaddress}
邮政编码{pboot:companypostcode}
联系人{pboot:companycontact}
联系手机{pboot:companymobile}
联系电话{pboot:companyphone}
联系传真{pboot:companyfax}/td>
联系邮箱{pboot:companyemail}
QQ号码{pboot:companyqq}
微信号码{pboot:sitedomain}{pboot:companyweixin}
营业执照{pboot:companyblicense}
其他信息{pboot:companyother}

页面信息

<title>{pboot:pagetitle}</title>
<meta name="keywords" content="{pboot:pagekeywords}">
<meta name="description" content="{pboot:pagedescription}">

栏目列表

首页地址{pboot:sitedomain}
遍历开始{pboot:nav num=10 parent=0}
栏目序号0开始[nav:n]
栏目序号1开始[nav:i]
父编码[nav:pcode]
栏目编码[nav:scode]
栏目名称[nav:name]
栏目副名称[nav:subname]
栏目链接{pboot:sitedomain}[nav:link]
栏目类型,0单页、1列表、2链接[nav:type]
外链接{pboot:sitedomain}[nav:outlink]
列表页模板[nav:listtpl]
内容页模板[nav:contenttpl]
栏目缩略图[nav:ico]
栏目大图{pboot:sitedomain}[nav:pic]
栏目关键字[nav:keywords]
栏目描述[nav:description]
子栏目数量[nav:soncount]
遍历结束{/pboot:nav}

栏目嵌套调用

// 多级菜单调用
{pboot:nav num=10 parent=0}

{pboot:1nav num=10 parent=[nav:scode]}
[1nav:name]
{pboot:sitedomain}[1nav:link]

{pboot:2nav num=10 parent=[nav:scode]}
[2nav:name]
{pboot:sitedomain}[2nav:link]
{/pboot:2nav}

{/pboot:1nav}

{/pboot:nav}

高亮栏目示例

<a href="{pboot:sitedomain}" {pboot:if(0=='{sort:scode}')}class='active'{/pboot:if}>首页</a>

{pboot:nav parent=0}

<a href="[nav:link]" {pboot:if('[nav:scode]'=='{sort:tcode}')}class='active'{/pboot:if}>[nav:name]</a>

       {pboot:2nav parent=[nav:scode]}

 < href="[2nav:link]"  {pboot:if('[2nav:scode]'=='{sort:scode}')}class='active'{/pboot:if}>[2nav:name]</a> |

       {/pboot:2nav}

{/pboot:nav}

指定列表

遍历开始{pboot:list scode=1 num=10 order=date}
序号0开始[list:n]
序号1开始[list:i]
编号[list:id]
分类编码[list:scode]
副分类编码[list:subscode]
分类名称[list:sortname]
副分类名称[list:subsortname]
分类链接{pboot:sitedomain}[list:sortlink]
副分类链接{pboot:sitedomain}[list:subsortlink]
标题[list:title]
副标题[list:subtitle]
标题颜色[list:titlecolor]
作者[list:author]
来源[list:source]
链接{pboot:sitedomain}[list:link]
外部链接{pboot:sitedomain}[list:outlink]
发布日期[list:date style=Y-m-d]
缩略图{pboot:sitedomain}[list:ico]
多图[list:pics]
内容[list:content]
附件[list:enclosure]
描述[list:description]
关键字[list:keywords]
结束遍历{/pboot:list}
调节参数:
scode:分类编码,如果在列表页省略,自动调用当前栏目;
num:调用的数量
order:排序 id、date、sorting、istop、isrecommend、isheadline、visits、likes、oppose等字段
filter: 过滤数据,如: filter=title|ASP 只显示标题含有ASP的内容
如果需要只显示推荐,可使用如下过滤参数: filter=isrecommend|1

指定分类

遍历开始{pboot:sort scode=1}
序号0开始[sort:n]
序号1开始[sort:i]
父编码[sort:pcode]
父分类名称[sort:parentname]
栏目编码[sort:scode]
栏目名称[sort:name]
栏目副名称[sort:subname]
栏目链接{pboot:sitedomain}[sort:link]
栏目类型,0单页、1列表、2链接[sort:type]
外链接{pboot:sitedomain}[sort:outlink]
列表页模板[sort:listtpl]
内容页模板[sort:contenttpl]
栏目缩略图{pboot:sitedomain}[sort:ico]
栏目大图[sort:pic]
栏目关键字[sort:keywords]
栏目描述[sort:description]
子栏目数量[sort:soncount]
结束遍历{/pboot:sort}

便捷方式:

{pboot:sort scode=1}[sort:name]{/pboot:sort}  //单调名称

{pboot:sort scode=1}{pboot:sitedomain}[sort:link]{/pboot:sort}  //单调链接

{pboot:sort scode=1}<a href="{pboot:sitedomain}[sort:link]">[sort:name]</a>{/pboot:sort}  //完整链接

{pboot:sort scode=1}<A title="[sort:name]" href="[sort:link]">[详细]</A>{/pboot:sort}

指定内容

{pboot:content id=1}
    [content:id]            编号
    [content:scode]         分类编码
    [content:subscode]      副分类编码
    [content:sortname]      分类名称
    [content:subsortname]   副分类名称
    {pboot:sitedomain}[content:sortlink]      分类链接
    {pboot:sitedomain}[content:subsortlink]   副分类链接
    [content:title]         标题
    [content:titlecolor]    标题颜色
    [content:subtitle]      副标题
    [content:author]        作者
    [content:source]        来源
    {pboot:sitedomain}[content:link]          链接
    [content:outlink]       外部链接
    [content:date]          发布日期
    {pboot:sitedomain}[content:ico]           缩略图
    [content:pics]          图集
    [content:content]       内容
    [content:enclosure]     附件
    [content:keywords]      关键词
    [content:description]   描述
    [content:istop]         是否置顶
    [content:isrecommend]   是否推荐
    [content:isheadline]    是否头条
    [content:visits]        访问数量
    [content:likes]         点赞数量
    [content:oppose]        反对数量
    [content:likeslink]     点赞链接
    [content:opposelink]    反对链接
{/pboot:content}

便捷方式:

{pboot:content id=1}[content:content len=100]{/pboot:content}

{pboot:sort scode=1}<A title="[sort:name]" href="[sort:link]">[详细]</A>{/pboot:sort}    //链接地址

指定内容多图

如下调用方式可用于全站:

{pboot:pics num=3 id=1}
    [pics:n]   序号,从0开始
    [pics:i]   序号,从1开始
    [pics:src] 图片地址
{/pboot:pics}


如下方式用于内容详情页面多图的输出:

{pboot:pics num=3 id={content:id}}
    [pics:i]     序号
    [pics:src]   图片地址
{/pboot:pics}

指定内容多选

使用如下方式输出扩展字段多选文本:

{pboot:checkbox id=13 field=ext_cpts}
         [checkbox:i]     序号
         [checkbox:text]  多选文本
{/pboot:checkbox}

id:为内容编号
field:为扩展字段名称

当前栏目标签

分类顶级分类编码{sort:tcode}
分类顶级分类名称{sort:topname}
分类顶级分类链接{sort:toplink}
分类父分类编码{sort:pcode}
分类父分类名称{sort:parentname}
分类父分类链接{pboot:sitedomain}{sort:parentlink}
分类编码{sort:scode}
分类名称{sort:name}
分类副名称{sort:subname}
分类链接{pboot:sitedomain}{sort:link}
分类类型{sort:type}    0单页、1列表、2链接
分类跳转外链接{pboot:sitedomain}{sort:outlink}
列表页模板{sort:listtpl}
内容页模板{sort:contenttpl}
分类缩略图{pboot:sitedomain}{sort:ico}
分类大图{sort:pic}
栏目标题{sort:title}
分类关键字{sort:keywords}
分类描述{sort:description}
子栏目数量{sort:soncount}

首页分页列表

{pboot:list scode=1 num=10 order=date page=1}
    [list:n]            计数0开始
    [list:i]            计数1开始
    [list:id]           编号
    [list:scode]        分类编码
    [list:subscode]     副分类编码
    [list:sortname]     分类名称
    [list:subsortname]  副分类名称
    {pboot:sitedomain}[list:sortlink]     分类链接
    {pboot:sitedomain}[list:subsortlink]  副分类链接
    [list:title]        标题
    [list:titlecolor]   标题颜色
    [list:subtitle]     副标题
    [list:author]       作者
    [list:source]       来源
    {pboot:sitedomain}[list:link]         链接
    [list:outlink]      外部链接
    [list:date]         发布日期
    {pboot:sitedomain}[list:ico]          缩略图
    [list:pics]         多图
    [list:content]      内容
    [list:enclosure]    附件
    [list:keywords]     关键词
    [list:description]  描述
    [list:istop]        是否置顶
    [list:isrecommend]  是否推荐
    [list:isheadline]   是否头条
    [list:visits]       访问数量
    [list:likes]        点赞数量
    [list:oppose]       反对数量
    [list:likeslink]    点赞链接
    [list:opposelink]   反对链接
{/pboot:list}

{page:bar} 完整分页条(推荐使用)
如果需要自定义,使用如下标签:
{page:current}      当前页码
{page:status}       分页状态信息
{page:index}        首页
{page:pre}          前一页
{page:next}         下一页
{page:last}         尾页
{page:numbar}       数字条
{page:selectbar}    下拉选择条


scode:分类编码,如果在列表页省略,自动调用当前栏目;
num:调用的数量
order:排序 id、date、sorting、istop、isrecommend、isheadline、visits、likes、oppose等数据库中字段
filter: 过滤数据,如: filter=title|ASP 只显示标题含有ASP的内容

幻灯片标签

{pboot:slide num=3 gid=1}
    [slide:n]       序号,从0开头
    [slide:i]       序号,从1开头
    [slide:id]      编号
    [slide:src]     图片地址
    [slide:link]    链接地址
    [slide:title]   描述文本
{/pboot:slide}

友情链接标签

{pboot:link num=3 gid=1}
    [link:n] 序号从0开始
    [link:i] 序号从1开始
    [link:id] 编号
    [link:name] 链接名称
    [link:link] 链接地址
    [link:logo] 链接Logo图
{/pboot:link}

{pboot:link num=3 gid=1} <a href="[link:link]" target="_blank">[link:name]</a>{/pboot:link}

筛选

{pboot:select field=ext_leixing}
      [select:i]        序号
      [select:current]  当前选中值
      [select:link]     链接
      [select:value]    筛选值
{/pboot:select} 

示例: {pboot:selectall field=ext_leixing text=全部}| {pboot:select field=ext_leixing} {pboot:if([select:i]>1)}|{/pboot:if} <a href= "[select:link]"{pboot:if('[select:value]'=='[select:current]')}class= "active" {/pboot:if}>[select:value]</a> {/pboot:select}

{pboot:selectall field=ext_leixing text=全部 class=active} 用于输出“全部”,支持三个参数 field为字段名称,text为显示的文字,class为高亮是样式类名称;

列表页标签

遍历开始{pboot:list num=10 order=date}
序号0开始[list:n]
序号1开始[list:i]
编号[list:id]
分类编码[list:scode]
副分类编码[list:subscode]
分类名称[list:sortname]
副分类名称[list:subsortname]
分类链接{pboot:sitedomain}[list:sortlink]
副分类链接{pboot:sitedomain}[list:subsortlink]
标题[list:title]
副标题[list:subtitle]
标题颜色[list:titlecolor]
作者[list:author]
来源[list:source]
链接[list:link]
外部链接[list:outlink]
发布日期[list:date style=Y-m-d]
缩略图{pboot:sitedomain}[list:ico]
多图[list:pics]
内容[list:content]
附件[list:enclosure]
描述[list:description]
关键字[list:keywords]
结束遍历{/pboot:list}

order:排序 id、date、sorting、istop、isrecommend、isheadline、visits、likes、oppose等数据库中字段
filter: 过滤数据,如: filter=title|ASP,PHP 只显示标题含有ASP和PHP的内容
如果需要只显示推荐,可使用如下过滤参数: filter=isrecommend|1

分页标签: {page:bar} 完整分页条(推荐使用) 如果需要自定义,使用如下标签: {page:current} 当前页码 {page:status} 分页状态信息 {page:index} 首页 {page:pre} 前一页 {page:next} 下一页 {page:last} 尾页 {page:numbar} 数字条 {page:selectbar} 下拉选择条

内容页标签

编号{content:id}
分类编码{content:scode}
副分类编码{content:subscode}
分类名称{content:sortname}
副分类名称{content:subsortname}
分类链接{pboot:sitedomain}{content:sortlink}
副分类链接{pboot:sitedomain}{content:subsortlink}
标题{content:title}
链接{pboot:sitedomain}{content:link}
缩略图{pboot:sitedomain}{content:ico}
内容{content:content}
标题颜色{content:titlecolor}
副标题{content:subtitle}
作者{content:author}
来源{content:source}
外部链接{content:outlink}
发布日期{content:date style=Y-m-d}
多图{content:pics}
附件{content:enclosure}
描述{content:description}
关键字{content:keywords}
是否置顶{content:istop}
是否推荐{content:isrecommend}
是否头条{content:isheadline}
访问数量{content:visits}
点赞数量{content:likes}
反对数量{content:oppose}
点赞链接{content:likeslink}
反对链接{content:opposelink}


{content:precontent} 上一篇内容(带链接) {content:nextcontent} 下一篇内容(带链接) {content:nexttitle} 下一篇的题目 {content:pretitle} 上一篇的题目 {pboot:sitedomain}{content:nextlink} 下一篇的链接 {pboot:sitedomain}{content:prelink} 上一篇的链接 内容多图输出: {pboot:pics num=3 id={content:id}} [pics:i] 序号 [pics:src] 图片地址 {/pboot:pics}

留言板标签

留言提交地址:  {pboot:msgaction}(推荐) 
或者 {pboot:siteindex}/Message/add

contacts     联系人
mobile       手机/电话
content      内容
checkcode    验证码

验证码地址:
使用自动标签:{pboot:checkcode}(推荐) 
或者{pboot:sitepath}/core/code.php
验证码:<input type="text" name="checkcode">
  <img title="点击刷新" src="{pboot:checkcode}" onclick="this.src='{pboot:checkcode}?'+Math.round(Math.random()*10);" />


{pboot:message num=10} [message:contacts] 联系人 [message:mobile] 手机 [message:content] 内容 [message:recontent] 回复内容 [message:ip] 用户IP [message:os] 用户操作系统 [message:bs] 用户浏览器 [message:askdate] 留言时间 [message:replydate] 回复时间 {/pboot:message} 内容隐私: [message:mobile substr=1,3]****[message:mobile substr=8] 输出效果:187****6563
分页标签: {page:bar} 完整分页条(推荐使用) 如果需要自定义,使用如下标签: {page:current} 当前页码 {page:status} 分页状态信息 {page:index}首页 {page:pre} 前一页 {page:next}下一页 {page:last}尾页 {page:numbar} 数字条 {page:selectbar} 下拉选择条

伪静态设置

一、IIS环境

1、安装rewrite组件;
2、修改程序config/config.php文件 url_type=2
3、在站点目录建立web.config文件(默认已有,去除后缀bak即可)

二、Apache环境


1、开启Apache重写模块;
2、修改程序config/config.php文件 url_type=2
3、在站点目录建立.htaccess文件(默认已有)

特殊处理

自定义标签调用{label:left}
自定义表单action="{pboot:form fcode=1}"
自定义表单验证码验证码:<input type="text" name="checkcode" >
<img title="点击刷新" src="{pboot:checkcode}" onclick="this.src='{pboot:checkcode}?'+Math.round(Math.random()*10);" />
引入公用head文件{include file=head.html}
引入公用foot文件{include file=foot.html}
当前位置标签{pboot:position separator=>>}
时间标签格式化{xxx:date style=Y-m-d} Y:为完整年份、y为简写年份、m:为月、d:为日
去除html标签{xxx:content drophtml=1}   [xxx:content drophtml=1]
去除空白字符{xxx:content dropblank=1}  [xxx:content dropblank=1]
截取字符串长度{xxx:mobile substr=1,3}    [xxx:mobile substr=1,3]
解码html字符{xxx:title decode=1}    [xxx:title decode=1]

IF语句

{pboot:if('a'=='b')}
    内容1
{else}
    内容2
{/pboot:if}

示例:  {pboot:if(date('Y')==2018)}2018年{/pboot:if}


{pboot:if('a'=='b')} {pboot:2if('a'=='b')} 内容1 {2else} 内容2 {/pboot:2if} {else} 内容3 {/pboot:if}

多语言切换


1、在后台区域中添加相应的区域,具体参考默认区域;

2、在后台为新增的区域配置站点信息、公司信息、栏目信息、添加内容等;

3、在前台模板添加多语言切换按钮,如下:

切换按钮链接href地址:{pboot:lgpath}?lg=xxx

<a href="{pboot:lgpath}?lg=cn">    切换中文
<a href="{pboot:lgpath}?lg=en">    切换英文

多条件搜索


<form action="{pboot:scaction}"  method="get">
    搜索内容:<input type="text" name="keyword" >
      <input type="hidden" name="field" value="title">  <--关键字匹配的字段,默认title-->
      <input type="hidden" name="scode"  value="1">     <--限定条件1(分类为1)-->
      <input type="hidden" name="author" value="admin"> <--限定条件2(作者为admin)-->
      ......
    <button type="submit">搜索>
</form>


提交地址: 使用自动标签:{pboot:scaction} (推荐) 或{pboot:siteindex}/Search/index

{pboot:search num=10 order=date}
  [search:i]                     计数
  [search:id]                    编号
  [search:scode]                 分类编码
  [search:subscode]              副分类编码
  [search:sortname]              分类名称
  [search:subsortname]           副分类名称
  [search:sortlink]              分类链接
  [search:subsortlink]           副分类链接
  [search:title]                 标题
  [search:titlecolor]            标题颜色
  [search:subtitle]              副标题
  [search:author]                作者
  [search:source]                来源
  [search:link]                  链接
  [search:outlink]               外部链接
  [search:date]                  发布日期
  [search:ico]                   缩略图
  [search:pics]                  多图
  [search:content]               内容
  [search:enclosure]             附件
  [search:keywords]              关键词
  [search:description]           描述
  [search:istop]                 是否置顶
  [search:isrecommend]           是否置顶
  [search:isheadline]            是否头条
  [search:visits]                访问数量
  [search:likes]                 点赞数量
  [search:oppose]                反对数量
  [search:likeslink]             点赞链接
  [search:opposelink]            反对链接
{/pboot:search}

TAG标签

1、调用指定栏目下的内容tags
{pboot:tags scode=*,*}
   <a href="{pboot:sitedomain}[tags:link]">[tags:text]</a>
{/pboot:tags}
2、调用指定内容的tags
{pboot:tags id=*}
   <a href="{pboot:sitedomain}[tags:link]">[tags:text]</a>
{/pboot:tags}
3、使用tags显示相似内容列表
{pboot:list scode=* tags='x,y'}
   <a href="{pboot:sitedomain}[list:link]">[list:title]</a>
{/pboot:list}

API接口

接口使用说明:

1、请先到后台进行API相关参数配置,强烈建议启用强制认证;
2、客户端发起请求必须包含appid(认证用户)、timestamp(时间戳)、signature(签名)三个参数
3、签名参数signature通过appid、secret、timestamp三个值连接为一个字符串,然后进行双层md5加密生成

接口放回数据格式

{"code":0,"data":{"scode":"3","title":"PbootCMS主要功能介绍"},"rowtotal":"5"}
code为状态:1表示正确返回数据,0表示异常
data为数据:可以是字符串、单条数据、多条数据
rowtotal为总数:如果data为单一字符串,则rowtotal为1,如果为数组或对象,则为长度,如果为数据库查询的数据,则为SQL查询的总数。

网站信息接口

http://IP/api.php/cms/site
http://IP/api.php/cms/site/name/xxx  单个信息调用,例如调取标题title,注意此处和标签比不带site前缀

1.公司信息接口

http://IP/api.php/cms/company
http://IP/api.php/cms/company/name/xxx  单个信息调用,例如调取标题title,注意此处和标签比不带company前缀

2.公司信息接口

http://IP/api.php/cms/company
http://IP/api.php/cms/company/name/xxx  单个信息调用,例如调取标题title,注意此处和标签比不带company前缀

3.自定义标签接口

http://IP/api.php/cms/label        全部自定义标签
http://IP/api.php/cms/label/name/xxx   单个自定义标签

4.栏目列表树接口

http://IP/api.php/cms/nav

5.当前栏目位置接口

http://IP/api.php/cms/position/scode/xxx 传递当前栏目scode值

6.指定分类信息接口

http://IP/api.php/cms/sort/scode/xxx 传递需要调用栏目的scode值

7.指定内容多图接口

http://IP/api.php/cms/id/xxx    传递内容ID值

8.幻灯片接口

http://IP/api.php/cms/slide/gid/xxx/num/xxx  传递分组gid及调取的数量num值,默认num为

9.友情链接接口

http://IP/api.php/cms/link/gid/xxx/num/xxx  传递分组gid及调取的数量num值,默认num为10

10.留言内容接口

http://IP/api.php/cms/msg/num/xxx   传递num为一次调用的数量,支持传递/page/xxx 为分页
http://IP/api.php/cms/msg/num/xxx/page/2   调取第二页

11.指定内容列表接口

http://IP/api.php/list/2  传递需要调用的栏目scode,例子中调取分类为2的内容列表
http://IP/api.php/list/1/page/2 调取第二页,如果数据已获取完返回类似{"code":0,"data":"已经到底了!","rowtotal":"5"}
同时支持:num参数控制数量,传递order参数实现排序

12.指定内容详情接口

http://IP/api.php/content/8  传递需要调用的内容ID(单页一样适用),例子中调取内容ID为8的内容

13.搜索内容接口

http://IP/api.php/search
必须使用POST提交,需含有field 参数指定字段,默认为title,
需指定keyword为搜索的内容,其它条件可根据需要添加相关字段限定,如:传递scode为2,表示只在分类为2中搜索