以下是我做过20多个phpcms网站后常反复用的一些标签 欢迎与我交流
<title>{if isset($SEO['title']) && !empty($SEO['title'])}{$SEO['title']}{/if}{$SEO['site_title']}{if $page>1 }【第{$page}页】{/if}</title>
<meta name="keywords" content="{$SEO['keyword']}">
<meta name="description" content="{$SEO['description']}">
推荐
{pc:content action="position" posid="9" catid="" order="id desc" num="10" }
{loop $data $v}
列表
{pc:content action="lists" catid="$r[catid]" order="updatetime DESC" thumb="1" num="10" page="$page"}
{loop $data $v}
点击:
{pc:content action="hits" catid="6" num="10" order="views DESC"}
{loop $data $v}
评论:
{pc:comment action="bang" num="10" cache="3600"}
{loop $data $v}
相关内容:
{pc:content action="relation" relation="$relation" id="$id" catid="$catid" num="5" keywords="$rs[keywords]"}
{loop $data $r}
友情链接:
{pc:link action="type_list" siteid="$siteid" linktype="1" order="listorder DESC" num="8" return="data"}
{loop $data $v}
{$v['name']} {$v[logo]}
栏目列表:
{pc:content action="category" catid="1" num="15" siteid="$siteid" order="listorder ASC"}
{loop $data $r}
{/loop}
{/pc}
广告:<script language="javascript" src="{APP_PATH}index.php?m=poster&c=index&a=show_poster&id=137"></script>
引用:{template "content","header"}
介绍:{str_cut($v['description'],100)}
标题:{str_cut($v['title'],28)}
时间:{date('Y-m-d H:i:s',$v[inputtime])}
样式:{title_style($v[style])}
月榜:{number_format($v[monthviews])}
分页:{$pages}
来源:{$copyfrom}
网址:{siteurl($siteid)}
栏目名:{$CATEGORYS[$v[catid]][catname]}
栏目URL:{$CATEGORYS[$v[catid]][url]}
上一篇:<a href="{$previous_page[url]}">{$previous_page[title]}</a>
下一篇:<a href="{$next_page[url]}">{$next_page[title]}</a>
当前位置:<a href="{siteurl($siteid)}">首页</a><span> > </span>{catpos($catid)} 列表
统计:{tjcode()}
内容点击数:
<span id="hits"></span>
<script language="JavaScript" src="{APP_PATH}api.php?op=count&id={$id}&modelid={$modelid}"></script>
列表点击次数:
{php $hits = pc_base::load_model('hits_model')->get_one(array('hitsid'=>'c-'.$modelid.'-'.$r[id])); $views=$hits['views'];}
{$views}
短标题:{if isset($v[shorttitle]) && !empty($v[shorttitle])}{$v[shorttitle]}{else}{str_cut($v[title],56,'')}{/if}
列表评论数:
{php $comment = pc_base::load_model('comment_model')->get_one(array('commentid'=>'content_'.$v[catid].'-'.$v[id].'-'.$siteid)); $total = $comment['total'];}
{if $total}{$total}{else}0{/if}次评论
相关热词搜索:
{loop $keywords $keyword}
<a href="{APP_PATH}index.php?m=content&c=tag&catid={$catid}&tag={urlencode($keyword)}" class="blue">
{$keyword}
</a>
{/loop}
以上是PHP200做过20多个网站后常反复用的!!
{template "content","header"} ---------- 调用根目录下phpcms\template\content\header文件
{CHARSET} -------------------------------------字符集 (gbk或者utf-8)
{if isset($SEO['title']) && !empty($SEO['title'])}
{$SEO['title']}{/if}
{$SEO['site_title']}
{$SEO['keyword']}
{$SEO['description']}上面4条不用我解释了吧,都是标题和标题seo优化
{CSS_PATH} -----------------------------------地址替换为根目录下\statics\css
{JS_PATH}--------------------------------------地址替换为根目录下\statics\js