akcms 部分使用方法
来源:互联网 发布:长春java培训 编辑:程序博客网 时间:2024/06/05 10:24
收集的一些标签,在模板中作站调用。。AK做站必备。
内容页 ,item_display.htm
<title><{$texttitle}> - <{$categoryname}> - <{$v_sitename}> - <{$time}></title>
您 所在位置:</strong><a href="/">首页</a> >> < {getcategories childcategory=$category colspan="1" overflow=" >> " template="<a href=()[url]()>[category]</a>"}> >> <{$texttitle}> 完结
<div class="youarehere"><a href="/"><{$v_sitename}></a> > <a href="<{$categorypath}>"><{$categoryname}></a> > <{$texttitle}>
上一篇:<{getitems num="1" next=$id orderby="id_reverse" category=$category emptymessage="已是最前一篇" template="<a href=()[url]()>[title]</a>"}>
下一篇:< {getitems last=$id num="1" category=$category emptymessage="已是最后一篇" template="<a href=()[url]()>[title]</a>"}>
标题:<{$title}>
日期:<{$y}>-<{$m}>-<{$d}> <{$h}>:<{$i}>:<{$s}>
来源:<{$source}>
作者:<{$author}>
时间:<{$y}>-<{$m}>-<{$d}>
点击:<{$pageview}>
内容:<{$data}>
关键字:<{$keyword}>
本文链接地址:<a href="<{$url}>" target="_blank"><{$url}></a>
标签: <{getlists list=$keywords sc="," template="<a href='/tag/[iteminurl]'>[iteminhtml]</a> [n]"}>
分类:<{$categoryname}>
浏览:<{$pv}>
评论:<{$commentnum}>
底下的最好对着手册,有些可能一样,自己参照修改测试。
http://www.akcms.com/manual/getitems.htm
相关文章:
<{getitems category=$category num="10" related=$id skip=$id template="<span class=()titlelist()><a href=()[url]()>[title]</a></span> <span class=()smalleng()>[m]-[d]</span><br>"}>
相关文章
<{getitems timelimit="1" skipcategory=$v_skipcategory keywords=$keywords orderby="id_reverse" template="<li><img src=()/images/dot2.gif()> <a href=()[url]()>[title]</a></li>"}>
人气文章
<{getitems timelimit="1" category=$category orderby="pv_reverse" template="<li><img src=()/images/dot2.gif()> <a href=()[url]()>[title]</a></li>"}>
最新文章
<{getitems num="10" orderby="id_reverse" category=$category length="46" template="<li><a href=()[url]()>[texttitle]</a></li>"}>
随机推荐
<{getitems num="10" orderby="random" category=$category length="46" template="<li><a href=()[url]()>[texttitle]</a></li>"}>
栏目热点
<{getitems num="10" orderby="pv_reverse" category=$category length="46" template="<li><a href=()[url]()>[texttitle]</a></li>"}>
推荐专题
<{getitems bandindex="1" orderby="orderby2_reverse,id_reverse" category=$category page=$page num="50" template="<li><span>([y]-[m]-[d])</span><a href=()[url]()>[title]</a></li>" }>
随机选取的10篇日志
<{getitems skipcategory=$v_skipcategory orderby="random" num="10" template="<a href=()[url]() target=()_blank()>[shorttitle]</a><br>[n]" expire="3600"}>
最近的20篇日志
<{getitems category=$category skipcategory=$v_skipcategory orderby="id_reverse" num="20" template="<a href=()[url]() target=()_blank()>[shorttitle]</a><br>[n]" expire="3600"}>
最热的20篇日志
<{getitems skipcategory="5,6" orderby="pv_reverse" num="20" template="<a href=()[url]() target=()_blank()>[shorttitle]</a><br>[n]"}>
本分类最近的20篇日志
<{getitems category=$category orderby="id_reverse" num="20" template="<a href=()[url]() target=()_blank()>[shorttitle]</a><br>[n]" expire="3600"}>
评论需要的调用:
<{include file="captcha_js.htm"}>
<{include file="comments.htm"}>
<{include file="comment.htm"}>
版权: [powered]
定时更新调用文件 [inc]
与<{$keywords}>相关的内容
TAG:
<{getlists list=$keywords sc="," template="<a href=()/tag/[iteminurl]/() target=()_blank()>[item]</a> [n]"}>
搜索代码1.
<form action="/akcms_search.php" name="searchform" id="searchform">
<input type="hidden" value="0" name="kwtype" />
<input class="searchtxt" id="keywords" name="keywords" />
<select id="searchtype" name="searchtype">
<option value="titlekeyword" selected="selected">智能模糊搜索</option>
<option value="title">仅搜索标题</option>
</select>
<input class="search" type="image" src="/images/so.gif" align="absmiddle" />
</form>
搜索代码2.
<form action="/akcms_search.php" >
<input type="text" id="keywords" name="keywords" size="33" class="textinput">
<input type="submit" value="站内搜索" class="submitinput">
</form>
列表目录 ,category_list.htm
<meta http-equiv="Content-Type" content="text/html; charset=<{$charset}>" />
<title><{$categoryname}> - <{$v_sitename}></title>
<a href="/" target="_self">首页</a></li>
<{getcategories skipid=$v_skipcategory template="<li><a href=()/[path]/() target=()_self()>[category]</a></li>[n]"}>
<div class="youarehere"><a href="/"><{$v_sitename}></a> > <a href="<{$categorypath}>"><{$categoryname}></a> > 文章列表</div>
<{getitems bandindex="1" category=$category includesubcategory="1" page=$page num="10" orderby="id_reverse" template="[y]-[m]-[d]<a href=()[url]()>[title]</a><span>[digest]<p>作者: [author] | 来源:[source] | 人气:[pv]</p></span>"}>
<{getindexs page=$page template="<a href=()index.htm()>第一页</a> [indexs]<a href=()index-[last].htm()>最后一页</a>" linktemplate="[link] " baseurl="index-[page].htm"}>
栏目热点
<{getitems num="10" orderby="pv_reverse" category=$category length="46" template="<li><a href=()[url]()>[texttitle]</a></li>"}>
栏目推荐
<{getitems num="10" orderby="rondom" category=$category length="46" template="<li><a href=()[url]()>[texttitle]</a></li>"}>
列表首页 ,category_home.htm
<meta http-equiv="Content-Type" content="text/html; charset=<{$charset}>" />
<title><{$categoryname}> - <{$v_sitename}></title>
<a href="/" target="_self">首页</a></li>
<{getcategories skipid=$v_skipcategory template="<li><a href=()/[path]/() target=()_self()>[category]</a></li>[n]"}>
<div class="youarehere"><a href="/"><{$v_sitename}></a> > <a href="<{$categorypath}>"><{$categoryname}></a> > 文章列表</div>
<{getitems bandindex="1" category=$category page=$page colspan="4" overflow="<hr>" num="10" orderby="id_reverse" includesub="1" template="<span class=()titlelist()>·<a href=()[url]()>[title]</a></span>[digest] 来源:[source] 作者:[author] 时间:[y]>-[m]-[d] 点击[pageview] <span class=()smalleng()>[m]-[d]</span><br>"}>
<a href=index-1.htm>更多</a>
<{getindexs page=$page template="<a href=()index.htm()>第一页</a> [indexs]<a href=()index-[last].htm()>最后一页</a>" linktemplate="[link] " baseurl="index-[page].htm"}>网站首页 ,page_home.htm
网站名字: <{$v_sitename}>
<a href="/" target="_self">首页</a></li>
<{getcategories skipid=$v_skipcategory template="<li><a href=()/[path]/() target=()_self()>[category]</a></li>[n]"}>
分类条用:
<{getcategories skipid=$v_skipcategory template="<li id=()nav[categoryid]()><a href=()/[path]/()>[category]</a></li>[n]" expire="36000"}>
博客形式
<{getitems bandindex="1" orderby="id_reverse" page=$page timelimit="1" skipcategory=$v_skipcategory num="4" template="<div class=()postlist()><li class=()post-date()>[y]年[m]月[d]日</li><img src=()images/dot1.gif()> <a href=()[url]()>[title]</a><div class=()post-body()>[digest]</div><h5 class=()post-tags()>标签: [keywords]</h5><h6 class=()post-footer()>分类:<a href=()[categoryhomepath]/()>[category]</a> | 浏览:[pv] | 评论:[commentnum]</h6></div>"}>
<{getindexs page=$page template="分页:<a href=()/()>«</a> [indexs]<a href=()index-[last].htm()>»</a>" linktemplate="[link] " baseurl="index-[page].htm"}>
数据调用样式,可以任意按照ID 调用 查看馒头手册
<{getitems category="2" num="10" expire="3600" template="<li><a href=()[url]() target=()_blank()>[title]</a></li>"}>
<{getitems category="4" num="10" orderby="id" expire="3600" template="<li><a href=()[url]() target=()_blank()>[title]</a></li>"}>
搜索页面 ,search.htm
<title><{$keywords}>-<{$v_sitename}></title>
<form action="/akcms_search.php" name="searchform" id="searchform">
<input type="hidden" value="0" name="kwtype" />
<input class="searchtxt" id="keywords" name="keywords" />
<select id="searchtype" name="searchtype">
<option value="titlekeyword" selected="selected">智能模糊搜索</option>
<option value="title">仅搜索标题</option>
</select>
<input class="search" type="image" src="/images/so.gif" align="absmiddle" />
</form>
<strong>您所在的位置,search.htm:</strong><a href="/"><{$v_sitename}></a> >> 与<{$keywords}>相关的内容</div>
<{getitems keywords=$keywords orderby="id_reverse" num="50" template="<a href=()[url]()>[title]</a> (阅读:[pv]-)(评论:[commentnum])<span class=()smallfont()>([y]-[m]-[d] [h]:)</span>[digest] <a href=()[url]()>阅读全文</a>[n]<br>"}>
<{getindexs page=$page keywords=$keywords template="<a href=()page-1()>第一页</a>[indexs]<a href=()page-[last]()>最后一页</a>" linktemplate="[link] " baseurl="page-[page]"}></div>【这个搜索列表动态的不知道怎么搞。懂的跟帖,非常感谢】
搜索列表 ,search_list.htm 可同上
评论调用 必须有下面3步
1. 内容页必须调用这个(可以下载馒头的博客模板,用了子模板调用)
<script>
function r() {
s = new String('abcdefghijklmnopqrstuvwxyz0123456789');
sid = "";
for(i = 0; i < 6; i ++) {
x = Math.ceil(Math.random() * 1000) % s.length;
sid += s.substring(x, x + 1);
}
return sid;
}
function sc() {
if(document.getElementById("sid").value == "") {
cc();
document.getElementById("captchadiv").style.display = "block";
}
}
function cc() {
ran = r();
document.getElementById("captchaimage").src = "/akcms_captcha.php?sid=" + ran;
document.getElementById("sid").value = ran;
}
</script>
2. 评论内容调用
<div id="comments">
<div class="post-title"><img src="/images/dot1.gif"> 评论</div>
<{getcomments itemid=$id orderby="id_reverse" num="1000" template="<div class=()post-body()> <img src=()/images/dot2.gif()> [message]</div><div class=()post-footer()>IP段:[secretip] | [username] 发表于 [y]-[m]-[d] [h]::[s] </div>" colspan="1" overflow="<hr />"}>
</div><!--comments-->
3.写评论
<iframe name="commentwork" width="0" height="0" style="display:none"></iframe>
<div id="comment">
<div class="post-title"><img src="/images/dot1.gif"> 发表评论</div>
<form id="form1" name="form1" method="post" action="/akcms_comment.php" onclick="" target="commentwork">
<div style='height:28px;'>姓名:<input name="username" type="text" value="匿名" size="10" /></div>
<div id="captchadiv" style="display:none">
验证码:<input type="text" name="captcha" size="10">
<a href="javascript:cc()"><img src="" id="captchaimage" border="0"></a>
</div>
<textarea style='margin-bottom:6px;' name="comment" cols="60" rows="6" onfocus="sc()" onblur="sc()"></textarea><br>
<input type="submit" style="padding:5px;" value="发表评论" />
<input type="hidden" name="itemid" value="<{$id}>">
<input type="hidden" name="sid" id="sid" value="">
</form>
</div>
貌似还看到个 ,message.htm
步知道需要不需要只不过自己本地测试没有这个也能评论不过看代码。。。貌似得有?
<script>
alert("<{$message}>");
var message = "<{$message}>";
if(message.indexOf("不正确") == -1 && message.indexOf("禁止") == -1) {
parent.location.reload();
}
</script>
,rss.htm (建立个RSS的后缀文件调用数据生成) 馒头的有伪静态的 可以下载馒头的博客模板
<?xml version="1.0" encoding="GBK" ?>
<?xml-stylesheet type="text/xsl" href="rss.xslt"?>
<!-- generator="FEEDCREATOR_VERSION" -->
<rss version="2.0">
<channel>
<title>qqxiake</title>
<description>qqq</description>
<link>http://127.0.0.1/</link>
<lastBuildDate><{gettime}></lastBuildDate>
<generator></generator>
<language>zh-cn</language>
<copyright>Copyright 1996 - 2008 qq Inc. All Rights Reserved.</copyright>
<pubDate><{gettime}></pubDate>
<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/webarch" />
<{getitems timelimit="1" num="20" orderby="id_reverse" skipcategory=$v_skipcategory template="<item>[n]<title>[title]</title>[n]<link>[url]</link>[n]<description><![CDATA[[digest]]]></description>[n]<author></author>[n]<category>[category]</category>[n]<comments>[url]#comment</comments>[n]<pubDate>[D], [d] [M] [y] [h]::[s] +0800</pubDate>[n]<guid>[url]</guid>[n]</item>[n]"}>
</channel>
</rss>
列表循环代码: 还没测试 馒头发的
<{foreach item=current_id from=$subcategories}>
<br />
<{getcategories id=$current_id template="[url]XXXXXXXXXXXXXXXXXX[category]"}>
<br />====================================================<br />
<{if ifhassubcategories($current_id)}>
【<{getcategories rootcategory=$current_id template="[category]#"}>】
<{else}>
@@<{getitems category=$current_id template="[title]-"}>@@
<{/if}>
<{/foreach}>
<{getindexs page=$page template="<a href=()index.htm()>第一页</a> [indexs]<a href=()index-[last].htm()>最后一页</a>" linktemplate="[link] " baseurl="index-[page].htm"}>
这个标签里面的 [indexs] , 如果要写样式进去的话得去 getdata.func.php
修改:<span id=\"current\">$i</span> 和 <a href=\"{$_url}\">$i</a>
function getindexs($params) {
global $exe_times, $db, $tablepre, $categories, $lr, $thetime, $cache_memory, $itemexts;
includecache('categories');
$datas = array();
$params = operateparams('index', $params);
$datas[0]['last'] = ceil($params['total'] / $params['ipp']);
if($datas[0]['last'] == 1) return '';
$_indexs = '';
$_start = max($params['page'] - 3, 1);
$_end = min($_start + 9, ceil($params['total'] / $params['ipp']));
if($_end == 0) return '';
for($i = $_start; $i <= $_end; $i ++) {
$_url = str_replace('[page]', $i, $params['baseurl']);
foreach($_GET as $key => $value) {
$_url = str_replace("[$key]", rawurlencode($value), $_url);
}
if($params['page'] == $i) {
$_indexs .= str_replace('[link]', "<span id=\"current\">$i</span>", $params['linktemplate']);
} else {
$_indexs .= str_replace('[link]', "<a href=\"{$_url}\">$i</a>", $params['linktemplate']);
}
}
$datas[0]['indexs'] = $_indexs;
$html = renderdata($datas, $params);
echo $html;
}
0 0
- akcms 部分使用方法
- AKCMS 首页设置
- DataList控件部分使用方法
- GridView 使用方法 - 前台部分
- cxGrid 部分使用方法
- Ruby部分程序使用方法
- cxGrid 部分使用方法(1)
- cxGrid 部分使用方法(2)
- Log4J的部分使用方法
- 最小的cms AKCMS 安装方法
- akcms常用文件位置和小技巧
- 关于QTP的部分使用方法
- java excel api 部分使用方法
- 关于Collection----ArrayList部分使用方法
- iOS XIB以及Storyboard的部分使用方法
- yii2.0 Activeform表单部分组件使用方法
- yii2.0 Activeform表单部分组件使用方法
- yii2.0 Activeform表单部分组件使用方法
- Fiddler自动响应AutoResponder正则匹配
- 面试题总结(配合java面试题库)
- java中HashSet的add的使用,以及equals和hashcode的重写
- linux学前小结
- 去掉html标签和所有空格
- akcms 部分使用方法
- springboot整合swagger UI 、spring-data-JPA
- JavaScript调试及switch case出错处理
- zoj1476
- Unexpected end of ZLIB input stream的解决办法
- spring quartz
- Tomcat HTTPS配置
- H.264句法和语法总结(十四)CAVLC 残差句法
- QT excel操作