网页即时交流
QQ咨询
咨询热线
020-28998648
网页客服,欢迎咨询
商圈信息
      商圈信息
  • 圈主:SVP管理员
  • 粉丝:1 人
  • 人气:5 关注度
齐博X1 常用变量大全
2022-02-22 16:04:28 151
  • 收藏
  • 管理

    用得最多那几个如下:

    {:get_url('location')}当前URL标签

    {:urls('index/qrcode/index')}?url={:urlencode(get_url('location'))}当前URL的二维码标签

    {$webdb.webname}指网站名称

    {$webdb[www_url]}指网址

    {volist name=":get_sort($fid,'father')" id="name"}栏目名称及网址

    {$rs.title} 指标题

    {$rs.title|get_word=20}标题字数限制,代表取20个字节,一个汉字相当于3个字节

    {$rs.url} 指内容页网址

    {$rs.picurl} 指封面图(缩略图)

    {$rs.time} 指时间

    {$i} 指序号,比如1 2 3 4 5 6 你可以把他放在class里边实现一些不一样的特效 比如 class="list_{$i}"

    {$rs.content|get_word=100} 内容介绍,代表取100个字节,一个汉字相当于3个字节

    {$rs.sort_name} 指分类名称

    {$rs.sort_url} 指栏目网址

    {$rs.mid_name} 指模型名称

    {$rs.user_url} 指发布者的主页

    {$rs.user_icon} 指发布者的头像

    {$rs.username} 指发布者的帐号

    内容页要使用作者的帐号或头像用下面的代码

    {$info.uid|get_user_name}

    {$info.uid|get_user_icon}

    {:get_url('user',$info.uid)}

    某些列表数据,如果{$rs.username} {$rs.user_icon} 不存在的话,请使用下面的

    {$rs.uid|get_user_name}

    {$rs.uid|get_user_icon}

    {:get_url('user',$rs.uid)}

    时间如果想要自定义格式的话,用如下代码

    {$rs.create_time|format_time="Y-m-d H:i:s"} 这个是 Y-m-d H:i:s 日期格式,你自己做删除不要的.

    ---------------------------------------------------------------------------------

    {$info.title}指内容页标题

    {$info.content} 指内容页内容

    {$info.view}  指内容页浏览量

    {:date("Y-m-d H:i:s",$info.create_time)}指内容页发布时间

    {:fun('Comment@total',$id)}指内容页评论数

    内容页中下一页上一页的标签在模板中分别插入如下代码即可

    {:fun('content@prev',$info,20)}内容页上一页

    {:fun('content@next',$info,20)}内容页下一页

    其中20代表取标题多少个字, 为了排版需要,你不想要标题的话,可以换成字符,比如

    {:fun('content@prev',$info,'上一页')}

    内容评论标签

    {qb:comment name="commentpc01" rows='5'}

    {include file="content/comment_pc" /}

    {/qb:comment}

    ---------------------------------------------------------------------------------

    CMS文章统计数

    {:query('cms_content',['count'=>'id'])}

    商城内容统计数

    {:query('shop_content',['count'=>'id'])}

    评论内容统计数

    {:query('comment_content',['count'=>'id'])}

    分类系统统计数

    {:query('fenlei_content',['count'=>'id'])}

    圈子系统统计数

    {:query('qun_content',['count'=>'id'])}

    论坛系统统计数

    {:query('bbs_content',['count'=>'id'])}

    昵称 账户

    {:get_user($info['uid'],'username')}

    一级导航图标

    {$rs.style}

    二级导航图标

    {$vs.style}

    数据表名

    :query('module')

    列表页分页

    {$pages}

    ---------------------------------------------------------------------------------

    会员中心 UID

    {$userdb.uid}

    会员中心 账号

    {$userdb.username}

    会员中心 昵称

    {$userdb.nickname}

    会员中心 所属用户组

    {$userdb.groupid|getGroupByid}

    会员中心 余额

    {$userdb.rmb}

    会员中心 头像

    {$userdb.icon|tempdir}

    会员中心 积分

    {$userdb.money}

    会员中心 注册时间

    {$user.regdate|format_time}

    会员中心 上次访问时间

    {$user.lastvist|date="Y-m-d H:i",###}

    会员中心 性别

    {switch $userdb.sex}{case 1}男{/case}{case 2}女{/case}{default /}保密{/switch}

    会员中心 是否认证

    {notempty name="userdb.yz"}已认证{else /}未认证{/notempty}

    会员中心 是否登陆

    {notempty name="$userdb"}已登录{else /}没登陆{/notempty}

    会员中心调用会员的相关数据,使用动态变量,直接用where语句可以直接加变量

    where="uid=$uid&fid=$info.fid"



    上一页:齐博X1:支付宝对接收款配置 下一页:齐博X1修改ckplayer 右上logo水印方法
    全部评论(0)
     
    网页即时交流
    QQ咨询
    咨询热线
    020-28998648