{if isset($SEO['Title']) && !empty($SEO['Title'])}{$SEO['Title']}{/if}{$SEO['site_Title']}.Pagelist{ text-align:center;Font-size:14px;margin-top:10px;}.Pagelist a{padding:5px 10px;text-decoration:none;}.Pagelist a:hover{background-color:#cc0808;color:#fff;Font-weight:bold;}.Pagelist a.a1:hover{ background:none;color:#cc0808;}.Pagelist span{color:#cc0808; Font-weight:bold; padding:5px 10px;border:1px solID #cc0808;}显示结果条数{count($data)}或{sizeof($data)}时间日期转换{format::date($lb[inputtime],1)}5.文章正文{$Title}标题{$username}作者{date('Y-m-d',strtotime($inputtime))}发布日期{$copyfrom}信息来源{$content}正文访问次数上一篇{$prevIoUs_page[url]} {$prevIoUs_page[Title]}下一篇{$next_page[url]} {$next_page[Title]}文章关键词: {loop $keywords $keyword} {/loop}6.热点信息{pc:content action="hits" catid="15,16,17,18,19,20,21" order="weekviews DESC" num="4"}{loop $data $key $val}{/loop}{/pc}实现多栏目的热点信息调用{pc:get sql="SELECT * FROM xy_news,xy_hits WHERE id=SUBSTRING_INDEX(hitsid,'-',-1) AND xy_news.catid IN (1,2,3) AND SUBSTRING_INDEX(SUBSTRING_INDEX(hitsid,-2),1)=1 ORDER BY weekviews DESC" num="5" return="data"}{loop $data $v} {/loop}{/pc}7.点击排行(推荐位){pc:content action="position" posid="2" order="listorder ASC,id DESC" num="4"}{loop $data $key $val}{/loop}{/pc}8.GET万能标签{pc:get sql="SELECT * from xy_news where status=99 and catid in(24,26,27) order by listorder DESC,id DESC" num="10" return="data" page="$page"} {loop $data $v} {$v[title]}{date("Y-m-d",$v[inputtime])}{/loop}{/pc} SELECT * FROM xy_news,xy_news_data WHERE xy_news.id=xy_news_data.id AND catid=86 ORDER BY listorder ASC,inputtime DESCzoom放大缩小9.嵌套循环{loop subcat(38,$siteid) $r}{php $cid=$r[arrchildid]}{pc:get sql="SELECT * from xy_news where status=99 and catid=$cid and typeid in(54) order by listorder ASC,inputtime DESC" num="1" return="data"}{loop $data $jj}{/loop}{/pc}{/loop}10.推荐信息{pc:content action="position" posid="2" order="listorder ASC,id DESC" num="4"}{loop $data $key $val} {/loop}{/pc}11.相关文章{pc:content action="relation" relation="$relation" catID="$catID" num="5" keywords="$rs[keywords]"}{loop $data $r}·({date('Y-m-d',$r[inputtime])}){/loop}{/pc}12.判断是否有数据{if empty($data)}{/if}13.日期转换2014-11-20 11:11:11 {date('Y-m-d H:i:s',$v[inputtime])}2014-11-20 {date('Y-m-d',$v[inputtime])}14.循环显示子栏目信息{pc:get sql="SELECT arrchildid from xy_category where catid=$catid" num="1" return="cata"} {loop $cata $lm}{pc:get sql="SELECT * from xy_news where status=99 and catid in($lm[arrchildid]) order by inputtime DESC,id DESC" num="10" return="data" page="$page"} {php $u=0}{if empty($data)} {if $u%5==0 && $u<10} {/if} {/loop} {/pc} {/loop} {/pc}15.专题标签首页 $ID 专题ID $Title 专题名称列表 $ID 专题ID $Title 专题名称 $typeID 分类ID $info[name] 分类名称专题当前位置 16.判断字符串是否含有子串{if $hd[thumb] && stristr($hd[thumb],"dangyang.gov.cn/")}17.从单信息获取图片和内容摘要(正则匹配){pc:get sql="SELECT * from xy_page where catID=306" num="1"} {loop $data $v} {PHP $curl=$categoryS[306][url]}{PHP $img=img_PATH.'nopic.gif'}{PHP preg_match('//i',$v[content],$out)}{PHP if($out[1]) $img=$out[1]}{if $out[0]}{PHP echo str_cut(preg_replace('/<[^>]+>/','',$out[0]),560,'...')}{else}{PHP echo str_cut(preg_replace('/<[^>]+>/',$v[content]),'...')}{/if}href="{$curl}">详情{/loop}{/pc} 18.读取用户真实姓名PHPCMS\libs\functions\global.func.PHP /** * Function get_realname * 通过username值,查询真实姓名 * @param $username 用户名 */function get_realname($username) { if(empty($username)){return false;} $admin_db = pc_base::load_model('admin_model'); $realname = $admin_db->get_one(array('username'=>$username),'realname'); //如果没有真实姓名返回用户名 if($realname['realname']) { return $realname['realname']; } else { return $username; }}19.搜索、Tag页、模块页面不支持$categoryS的解决方法加上20.对于图片相对路径进行的判断{if $r[thumb] && stristr($r[thumb],"http://")}{else}{/if}20.搜索框代码 以上是标签笔记由热心网友提供
总结 以上是内存溢出为你收集整理的分享PHPCMS模板制作常用标签全部内容,希望文章能够帮你解决分享PHPCMS模板制作常用标签所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)