手游下载网 / 汇聚当下最新最酷的软件下载站!
PHPCMS代码生成器 PHPCMS代码生成器 v1.0绿色版/PHPCMS代码生成器下载 版本

      PHPCMS代码生成器是一款由个人制作的专门用于PHPCMS编程的辅助软件,通过PHPCMS代码生成器,用户能够快速的生成PHPCMS代码只需要复制到编程工具中即可快速实现功能,有了PHPCMS代码生成器能够减少工程师大量的编程时间,同时也能让一些没有编程经验的用户快速掌握PHPCMS进行编程。

    PHPCMS代码生成器功能介绍

      此软件是用于对PHPCMS模板进行编辑制作的高效代码生成器,大部分的操作代码在此软件内都可实现

    PHPCMS代码生成器软件特色

      1、支持全局调用:网站名称、关键字、资源路径等十多项;

      2、支持首页调用:设为首页、导航代码、焦点图等十多项;

      3、支持列表标签、功能表情、文章标签:文章模型、下载模型等生成;

      4、支持采集参数、参数列表等。

    PHPCMS代码生成器使用方法

      下载打开软件,选择要添加的标签,软件就会自动生成代码,用户只需要优化代码中的一段即可。

    PHPCMS代码生成器注意事项

      1.调用系统内单条数据,示例(调用ID为1的信息,标题长度不超过25个汉字,显示更新日期):

      {get sql="select * from phpcms_content where contentid=1" /}

      标题:{str_cut($r[title], 50)} URL:{$r[url]} 更新日期:{date('Y-m-d', $r[updatetime])}

      {/get}

      2.调用系统内多条数据,示例(调用栏目ID为1通过审核的10条信息,标题长度不超过25个汉字,显示更新日期):

      {get sql="select * from phpcms_content where catid=1 and status=99 order by updatetime desc" rows="10"}

      标题:{str_cut($r[title], 50)} URL:{$r[url]} 更新日期:{date('Y-m-d', $r[updatetime])}

      {/get}

      3.带分页,示例(调用栏目ID为1通过审核的10条信息,标题长度不超过25个汉字,显示更新日期,带分页):

      {get sql="select * from phpcms_content where catid=1 and status=99 order by updatetime desc" rows="10" page="$page"}

      标题:{str_cut($r[title], 50)} URL:{$r[url]} 更新日期:{date('Y-m-d', $r[updatetime])}

      {/get}

      分页:{$pages}

      4.自定义返回变量,示例(调用栏目ID为1通过审核的10条信息,标题长度不超过25个汉字,显示更新日期,返回变量为 $v):

      {get sql="select * from phpcms_content where catid=1 and status=99 order by updatetime desc" rows="10" return="v"}

      标题:{str_cut($v[title], 50)} URL:{$v[url]} 更新日期:{date('Y-m-d', $v[updatetime])}

      {/get}

      5.调用同一帐号下的其他数据库,示例(调用数据库为bbs,分类ID为1的10个最新主题,主题长度不超过25个汉字,显示更新日期):

      {get dbname="bbs" sql="select * from cdb_threads where fid=1 order by dateline desc" rows="10"}

      主题:{str_cut($r[subject], 50)} URL:http://bbs.phpcms.cn/viewthread.php?tid={$r[tid]} 更新日期:{date('Y-m-d', $r[dateline])}

      {/get}

      6.调用外部数据,示例(调用数据源为bbs(discuz),分类ID为1的10个最新主题,主题长度不超过25个汉字,显示更新日期):

      {get dbsource="bbs" sql="select * from cdb_threads where fid=1 order by dateline desc" rows="10"}

      主题:{str_cut($r[subject], 50)} URL:http://bbs.phpcms.cn/viewthread.php?tid={$r[tid]} 更新日期:{date('Y-m-d', $r[dateline])}

      {/get}

      7.取出第2条到第10条记录,按评论多少排序,比如有些布局第一条使用缩略图,或者第一条是头条,其他是文章列表会用到:

      {get sql="select A.contentid,A.catid,A.title,A.thumb,A.description,A.url,A.status,A.updatetime,B.contentid,B.hits,B.comments from `phpcms_content` as A INNER JOIN `phpcms_content_count` as B ON A.contentid=B.contentid and A.status=99 and LENGTH(A.thumb)>0 order by B.comments desc LIMIT 2,7"}-->

      {$r[comments]}人参与评论</span>·<a href="{$r[url]}" title="{$r[title]}">{str_cut($r[title], 28)}</a>

      {/get}

      关键点就在 order by B.comments desc LIMIT 3,7 (表示从第3条记录开始,向下读取7条数据)

    软件特别说明

    标签:cms系统网络编程网络编程网络编程

    相关文章
  • 网友评论

    Copyright © 2005-2023 https://www.bjyz.net.All rights reserved.

    京ICP备00000001号浙公网安京ICP备00000001号