云主机测评网云主机测评网云主机测评网

云主机测评网
www.yunzhuji.net

如何实现织梦dedecms全站RSS输出?

要实现织梦dedecms全站RSS输出,可以按照以下步骤操作:,,1. 登录织梦dedecms后台,点击“系统”“扩展”“模块管理”。,2. 在模块列表中找到“RSS订阅”模块,点击“安装”。,3. 安装完成后,点击“模块管理”,找到刚刚安装的“RSS订阅”模块,点击“设置”。,4. 在设置页面中,选择需要生成RSS的栏目和频道,设置RSS文件的保存路径和名称。,5. 点击“提交”按钮,完成设置。,,你可以在网站根目录下找到生成的RSS文件,通过浏览器访问该文件即可查看全站RSS输出

### 一、准备工作

在开始之前,确保你已经安装了织梦CMS(DedeCMS)并能够正常访问其后台,需要具备一定的PHP和HTML基础知识,以便更好地理解和操作以下步骤。

### 二、创建RSS.php文件

1. **新建rss.php文件**:在你的网站根目录下创建一个名为`rss.php`的文件,这个文件将用于生成RSS内容。

2. **编辑rss.php文件**:将以下代码复制到`rss.php`文件中:

“`php

<?php

require_once (dirname(__FILE__) . “/include/common.inc.php”);

require_once DEDEINC.”/arc.partview.class.php”;

$pv = new PartView();

$pv>SetTemplet($cfg_basedir . $cfg_templets_dir . “/default/rss.htm”);

header(“Contenttype:application/xml”);

$pv>Display();

?>

“`

这段代码的作用是引入DedeCMS的核心文件,设置RSS模板文件的路径,并设置内容类型为XML格式。

### 三、制作RSS.htm模板文件

1. **新建rss.htm文件**:在与`index.htm`主页模板相同的目录下创建一个名为`rss.htm`的文件,这个文件将用于定义RSS的结构和样式。

2. **编辑rss.htm文件**:将以下代码复制到`rss.htm`文件中:

“`html

{dede:global.cfg_webname/}{dede:global.cfg_basehost/}{dede:global.cfg_description/}

copyright dedecms

zhcn{dede:global.cfg_webname/}{dede:global.cfg_adminemail/}

{dede:arclist row=’60’ col=’1′ titlelen=’100′ orderby=’pubdate’}

http://www.jb51.net[field:arcurl/]

[field:writer/][field:typename/][field:pubdate function=’strftime(“%a, %d %b %Y %H:%M:%S +0800”,@me)’/]http://www.jb51.net[field:arcurl/]<![CDATA[[field:description function='html2text(@me)'/] …文章分类:[field:typename/]aid=[field:id/]” target=”_blank”>邮件推荐 |评论回复]]>

织梦好,好织梦

{/dede:arclist}

“`

这段代码定义了RSS的基本结构,包括标题、链接、描述等元素,并通过`{dede:arclist}`标签循环输出文章列表。

### 四、配置后台生成RSS文件

1. **进入后台管理**:登录DedeCMS后台管理系统。

2. **更新缓存**:点击“系统” > “系统设置” > “系统参数设置” > “性能选项”,然后点击“确定”以更新缓存,这是为了确保新添加的RSS功能能够生效。

3. **生成RSS文件**:点击“生成” > “更新RSS文件”,将“单个类目最大记录数”改为全站的文章数量,然后点击“开始更新”,更新完成后,网站根目录下会生成一个全站的rss.xml文件,你可以通过http://网站域名/rss.xml来查看它。

### 五、常见问题解答(FAQs)

**问题1:为什么生成的RSS文件中没有包含所有文章?

答:可能是因为你在后台设置的“单个类目最大记录数”不够大,导致只生成了部分文章的RSS信息,请尝试将其设置为一个更大的值,或者直接设置为全站的文章数量,以确保所有文章都能被包含在RSS文件中。

**问题2:如何自定义RSS模板的样式和结构?

答:你可以通过编辑`rss.htm`文件来自定义RSS模板的样式和结构,在这个文件中,你可以使用DedeCMS提供的标签和函数来获取你需要的数据,并按照你的要求进行格式化和输出,你可以修改`

`、“等标签的内容,或者添加新的标签来显示更多的信息。</article> <div class="post-actions"> <a href="javascript:;" class="action action-rewards" data-event="rewards"><i class="tbfa"></i> 打赏</a> </div> <div class="post-copyright-custom">版权声明:主机测评不销售、不代购、不提供任何支持,仅分享信息/测评(有时效性),自行辨别,请遵纪守法文明上网。 <br>文章名称:《如何实现织梦dedecms全站RSS输出?》 <br>文章链接:<a href="https://www.yunzhuji.net/yunfuwuqi/254293.html">https://www.yunzhuji.net/yunfuwuqi/254293.html</a> </div> <div class="article-tags"> <a href="https://www.yunzhuji.net/tag/3_rss%E8%BE%93%E5%87%BA/" rel="tag">rss输出</a> <a href="https://www.yunzhuji.net/tag/3_%E5%85%A8%E7%AB%99/" rel="tag">全站</a> <a href="https://www.yunzhuji.net/tag/3_%E7%BB%87%E6%A2%A6cms/" rel="tag">织梦cms</a> </div> <nav class="article-nav"> <span class="article-nav-prev">上一篇<br><a href="https://www.yunzhuji.net/yunfuwuqi/254290.html" rel="prev">如何在DEDE主页上调用自定义模型的附加表字段?</a></span> <span class="article-nav-next">下一篇<br><a href="https://www.yunzhuji.net/yunfuwuqi/254301.html" rel="next">如何在织梦DEDECMS中实现TAG关键字文章列表的调用?</a></span> </nav> <div class="relates relates-imagetext"> <div class="title"> <h3>相关推荐</h3> </div> <ul> <li><a href="https://www.yunzhuji.net/internet/232091.html"><img data-src="/pic/7_232091.jpg" alt="如何在DeDeCMS织梦系统中实现RSS全站静态输出?" src="/view/hfdr_dux/img/jz.png" class="thumb"></a><a href="https://www.yunzhuji.net/internet/232091.html">如何在DeDeCMS织梦系统中实现RSS全站静态输出?</a></li> <li><a href="https://www.yunzhuji.net/yunfuwuqi/220308.html"><img data-src="/pic/10_220308.jpg" alt="如何将织梦dedecms的RSS输出修改为全文输出?" src="/view/hfdr_dux/img/jz.png" class="thumb"></a><a href="https://www.yunzhuji.net/yunfuwuqi/220308.html">如何将织梦dedecms的RSS输出修改为全文输出?</a></li> <li><a href="https://www.yunzhuji.net/zztj/7.html"><img data-src="/upload/article/20241214/175405675d55bdc3d0fqlda5K.png" alt="腾讯云服务器价格,2024腾讯云服务器双十一活动价格表出炉" src="/view/hfdr_dux/img/jz.png" class="thumb"></a><a href="https://www.yunzhuji.net/zztj/7.html">腾讯云服务器价格,2024腾讯云服务器双十一活动价格表出炉</a></li> <li><a href="https://www.yunzhuji.net/vps/36.html"><img data-src="/upload/article/20241224/0820526769fe642f7c3AbZXgd.png" alt="velovps怎么样?测评下2Gbps带宽/不限流量的希腊VPS" src="/view/hfdr_dux/img/jz.png" class="thumb"></a><a href="https://www.yunzhuji.net/vps/36.html">velovps怎么样?测评下2Gbps带宽/不限流量的希腊VPS</a></li> <li><a href="https://www.yunzhuji.net/cdn/4.html"><img data-src="/upload/article/20241214/095152675ce4b88c0a0ihrrrC.png" alt="本站同款:拥有1000GB以上DDOS防护(TCP UDP) CC自动防御切换(拦截99%恶意请求)" src="/view/hfdr_dux/img/jz.png" class="thumb"></a><a href="https://www.yunzhuji.net/cdn/4.html">本站同款:拥有1000GB以上DDOS防护(TCP UDP) CC自动防御切换(拦截99%恶意请求)</a></li> <li><a href="https://www.yunzhuji.net/vps/29.html"><img data-src="/upload/article/20241220/0851486764bfa4f14e4wkVjBp.jpg" alt="SugarHosts圣诞狂欢 虚拟主机消费全额返 云服务器返实付金额的20%" src="/view/hfdr_dux/img/jz.png" class="thumb"></a><a href="https://www.yunzhuji.net/vps/29.html">SugarHosts圣诞狂欢 虚拟主机消费全额返 云服务器返实付金额的20%</a></li> </ul> </div> <div class="post-go"> <div class="title" id="comments"> <h3>评论</h3> </div> <div id="comments" class="no_webshot"> <form action="/index.php?comment-post-ajax-1.html" method="post" id="ctf_form"> <div class="comt"> <div class="comt-title"> <img alt="" data-src="/static/img/avatar.png" class="avatar avatar-50 photo avatar-default" height="50" width="50" src="/view/hfdr_dux/img/avatar-default.png"> </div> <div class="comt-box"> <input type="hidden" name="cid" value="10" /> <input type="hidden" name="id" value="254293" /> <input type="hidden" name="reply_commentid" value="0" /> <textarea placeholder="你的评论可以一针见血" class="input-block-level comt-area" name="content" id="ctf_content" cols="100%" rows="3" tabindex="1" onkeydown="if(event.ctrlKey&&event.keyCode==13){document.getElementById('submit').click();return false};"></textarea> <div class="comt-ctrl"> <div class="comt-tips"><input type="hidden" name="comment_post_ID" value="655" id="comment_post_ID"> <input type="hidden" name="comment_parent" id="comment_parent" value="0"> <div id="ctf_tips"></div> </div> <button type="submit" name="submit" id="ctf_submit" tabindex="5">提交评论</button> </div> </div> <div class="comt-comterinfo" id="comment-author-info"> <ul> <li><input class="ipt" type="text" name="author" id="ctf_author" value="" tabindex="2" placeholder="昵称(必填)"></li> <li> <input class="ipt" type="text" name="vcode" id="ctf_vcode" value="" tabindex="2" placeholder="验证码"> </li> <li> <img id="captchaPic" src="/index.php?comment-vcode" onclick="this.src='/index.php?comment-vcode-r-'+Math.random();" alt="验证码" /> </li> </ul> </div> </div> </form> </div> <div id="postcomments"> <ol class="commentlist" id="comment_cont"> <div class="pagenav"><div class="load-more j-load-more" id="load_more">暂无评论</div></div> </ol> </div> </div> </div> </div> <div class="sidebar"> <div class="widget widget_ui_posts widget-on-phone"> <h3>热门推荐</h3> <ul> <li><a href="https://www.yunzhuji.net/jishujiaocheng/1.html"> <span class="thumbnail"><img data-src="https://www.yunzhuji.net/upload/article/20241214/183521675d5f699b26f8KFbtb.jpg" alt="如何实现服务器多开?" src="/view/hfdr_dux/img/jz.png" class="thumb"></span> <span class="text">如何实现服务器多开?</span> <span class="muted">2024-12-14</span></a></li> <li><a href="https://www.yunzhuji.net/jishujiaocheng/2.html"> <span class="thumbnail"><img data-src="/upload/zixun/20241216/095041675f8771dab88f5NSL0.jpg" alt="为什么服务器外网无法设置?" src="/view/hfdr_dux/img/jz.png" class="thumb"></span> <span class="text">为什么服务器外网无法设置?</span> <span class="muted">2024-12-16</span></a></li> <li><a href="https://www.yunzhuji.net/jishujiaocheng/289740.html"> <span class="thumbnail"><img data-src="/pic/8_289740.jpg" alt="服务器大容量云端服务器,如何满足现代企业的数据存储需求?" src="/view/hfdr_dux/img/jz.png" class="thumb"></span> <span class="text">服务器大容量云端服务器,如何满足现代企业的数据存储需求?</span> <span class="muted">2024-12-19</span></a></li> <li><a href="https://www.yunzhuji.net/jishujiaocheng/12952.html"> <span class="thumbnail"><img data-src="/pic/8_12952.jpg" alt="python中type用法" src="/view/hfdr_dux/img/jz.png" class="thumb"></span> <span class="text">python中type用法</span> <span class="muted">2024-12-16</span></a></li> <li><a href="https://www.yunzhuji.net/jishujiaocheng/31390.html"> <span class="thumbnail"><img data-src="/pic/8_31390.jpg" alt="性价比高的云服务器怎么租用" src="/view/hfdr_dux/img/jz.png" class="thumb"></span> <span class="text">性价比高的云服务器怎么租用</span> <span class="muted">2024-12-17</span></a></li> </ul> </div> <div class="widget widget_ui_posts widget-on-phone"> <h3>随机推荐</h3> <ul> <li><a href="https://www.yunzhuji.net/vps/57.html"><span class="thumbnail"><img data-src="/upload/article/20250111/21051267826c88a32c2q7I13p.jpg" alt="cstonecloud:美国家庭住宅VPS/双ISP属性IP+AS9929高速网络,解锁tiktok/ChatGPT等,7.5折优惠中" src="/view/hfdr_dux/img/jz.png" class="thumb"></span> <span class="text">cstonecloud:美国家庭住宅VPS/双ISP属性IP+AS9929高速网络,解锁tiktok/ChatGPT等,7.5折优惠中</span><span class="muted">2025-01-11</span></a></li> <li><a href="https://www.yunzhuji.net/vps/51.html"><span class="thumbnail"><img data-src="/upload/article/20250105/204441677a7eb93061csTUx3s.jpg" alt="dwidc:十堰/襄阳/宁波/香港/韩国,VPS低至20元/月(10M带宽)、独服低至216元/月(50M带宽),自带CC拦截+600G防御" src="/view/hfdr_dux/img/jz.png" class="thumb"></span> <span class="text">dwidc:十堰/襄阳/宁波/香港/韩国,VPS低至20元/月(10M带宽)、独服低至216元/月(50M带宽),自带CC拦截+600G防御</span><span class="muted">2025-01-05</span></a></li> <li><a href="https://www.yunzhuji.net/vps/65.html"><span class="thumbnail"><img data-src="/upload/article/20250117/182532678a301c24406yhfQrW.jpg" alt="ZjiNet便宜香港独服,320元/月,e5-2630L/16g内存/480gSSD/30M带宽,支持自定义" src="/view/hfdr_dux/img/jz.png" class="thumb"></span> <span class="text">ZjiNet便宜香港独服,320元/月,e5-2630L/16g内存/480gSSD/30M带宽,支持自定义</span><span class="muted">2025-01-17</span></a></li> <li><a href="https://www.yunzhuji.net/vps/64.html"><span class="thumbnail"><img data-src="/upload/article/20250111/21140567826e9dc7fd4GD7yqK.jpg" alt="cloudcone:2025特价年付美国VPS,$17/年-1G内存/2核/14gSSD/3T流量/1Gbps带宽" src="/view/hfdr_dux/img/jz.png" class="thumb"></span> <span class="text">cloudcone:2025特价年付美国VPS,$17/年-1G内存/2核/14gSSD/3T流量/1Gbps带宽</span><span class="muted">2025-01-11</span></a></li> <li><a href="https://www.yunzhuji.net/vps/52.html"><span class="thumbnail"><img data-src="/upload/article/20250105/204547677a7efbaef91i8HcyK.jpg" alt="lisahost:美国西雅图家宽住宅VPS,原生/双ISP/静态住宅IP,流媒体解锁全打通,支持Windows" src="/view/hfdr_dux/img/jz.png" class="thumb"></span> <span class="text">lisahost:美国西雅图家宽住宅VPS,原生/双ISP/静态住宅IP,流媒体解锁全打通,支持Windows</span><span class="muted">2025-01-05</span></a></li> </ul> </div> <div class="widget widget_ui_comments"> <h3>最新评论</h3> <ul> <li><a href="https://www.yunzhuji.net/cdn/4.html" title="莫名CDN的评论"><img data-src="https://www.yunzhuji.net/static/img/avatar.png" class="avatar avatar-50 photo" height="50" width="50" src="/view/hfdr_dux/img/avatar-default.png"> <strong>莫名CDN</strong>1月前 说:<br>本站CDN与莫名CDN同款、亚太CDN、速度还不错,值得推荐。</a></li> <li><a href="https://www.yunzhuji.net/zztj/6.html" title="ucloud的评论"><img data-src="https://www.yunzhuji.net/static/img/avatar.png" class="avatar avatar-50 photo" height="50" width="50" src="/view/hfdr_dux/img/avatar-default.png"> <strong>ucloud</strong>1月前 说:<br>感谢推荐我们公司产品、有什么活动会第一时间公布!</a></li> <li><a href="https://www.yunzhuji.net/zztj/2.html" title="游客的评论"><img data-src="https://www.yunzhuji.net/static/img/avatar.png" class="avatar avatar-50 photo" height="50" width="50" src="/view/hfdr_dux/img/avatar-default.png"> <strong>游客</strong>1月前 说:<br>我在用这类站群服务器、还可以. 用很多年了。</a></li> </ul> </div> <div class="widget-on-phone widget widget_ui_tags"> <h3>标签云</h3> <div class="items"> <a href="https://www.yunzhuji.net/tag/%E7%BE%8E%E5%9B%BD%E9%82%AE%E4%BB%B6vps/">美国邮件vps</a> <a href="https://www.yunzhuji.net/tag/%E6%89%93%E6%8A%98%E4%BF%83%E9%94%80/">打折促销</a> <a href="https://www.yunzhuji.net/tag/%E9%A6%99%E6%B8%AF%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%8E%A8%E8%8D%90/">香港服务器推荐</a> <a href="https://www.yunzhuji.net/tag/cdn/">cdn</a> <a href="https://www.yunzhuji.net/tag/vmiss%E4%BF%83%E9%94%80/">vmiss促销</a> <a href="https://www.yunzhuji.net/tag/%E4%B8%8D%E9%99%90%E6%B5%81%E9%87%8Fvps/">不限流量vps</a> <a href="https://www.yunzhuji.net/tag/dwidc/">dwidc</a> <a href="https://www.yunzhuji.net/tag/%E9%A6%99%E6%B8%AF%E6%9C%8D%E5%8A%A1%E5%99%A8-%E5%A4%A7%E5%B8%A6%E5%AE%BD-%E4%B8%8D%E9%99%90%E6%B5%81%E9%87%8F/">香港服务器 大带宽 不限流量</a> <a href="https://www.yunzhuji.net/tag/%E4%B8%93%E7%BA%BF%E8%8D%B7%E5%85%B0vps/">专线荷兰vps</a> <a href="https://www.yunzhuji.net/tag/vps%E6%9C%8D%E5%8A%A1%E5%99%A8/">vps服务器</a> <a href="https://www.yunzhuji.net/tag/%E4%B8%93%E7%BA%BF%E7%BE%8E%E5%9B%BDvps/">专线美国vps</a> <a href="https://www.yunzhuji.net/tag/%E4%BE%BF%E5%AE%9C%E5%A4%A7%E7%A1%AC%E7%9B%98vps/">便宜大硬盘vps</a> <a href="https://www.yunzhuji.net/tag/lightlayer%E6%B3%B0%E5%9B%BD%E6%B5%8B%E8%AF%84/">lightlayer泰国测评</a> <a href="https://www.yunzhuji.net/tag/raksmart%E4%BC%98%E6%83%A0/">raksmart优惠</a> <a href="https://www.yunzhuji.net/tag/lisahost/">lisahost</a> <a href="https://www.yunzhuji.net/tag/%E7%BE%8E%E5%9B%BDvps-cn2-gia/">美国vps cn2 gia</a> <a href="https://www.yunzhuji.net/tag/%E6%B4%9B%E6%9D%89%E7%9F%B6%E4%BA%91%E4%B8%BB%E6%9C%BA/">洛杉矶云主机</a> <a href="https://www.yunzhuji.net/tag/vmiss%E4%BC%98%E6%83%A0%E7%A0%81/">vmiss优惠码</a> <a href="https://www.yunzhuji.net/tag/locvps/">locvps</a> <a href="https://www.yunzhuji.net/tag/%E7%BE%8E%E5%9B%BDcn2-vps/">美国cn2 vps</a> <a href="https://www.yunzhuji.net/tag/pqhosting/">pqhosting</a> </div> </div> <!-- 内页右侧 --> <div class="widget-on-phone widget widget_media_image"><a href="#"><img width="360" height="206" src="https://img.4414.cn/forum/202412/15/225418gjh3p5958ux0g8pz.jpg" class="image wp-image-75276 attachment-full size-full entered lazyloaded" alt="" style="max-width: 100%; height: auto;" decoding="async" fetchpriority="high" data-lazy-src="https://img.4414.cn/forum/202412/15/225418gjh3p5958ux0g8pz.jpg" data-ll-status="loaded"><noscript><img width="360" height="206" src="https://img.4414.cn/forum/202412/15/225418gjh3p5958ux0g8pz.jpg" class="image wp-image-75276 attachment-full size-full" alt="" style="max-width: 100%; height: auto;" decoding="async" fetchpriority="high" /></noscript></a></div> <!-- 内页右侧 --> </div> </section> <footer class="footer"> <div class="container"> <div class="flinks"> <strong>友情链接</strong> <ul class='xoxo blogroll'> <li><a href="https://tool.112.run/bishun.html" rel="noopener" title="汉字笔顺" target="_blank">汉字笔顺</a></li> <li><a href="https://tool.112.run/hanzi.html" rel="noopener" title="汉字查询" target="_blank">汉字查询</a></li> <li><a href="https://tool.112.run/" rel="noopener" title="在线工具" target="_blank">在线工具</a></li> <li><a href="https://www.112.run/" rel="noopener" title="112工具箱" target="_blank">112工具箱</a></li> </ul> </div> <p><a target="_blank" rel="nofollow"><strong><span style="color: #ff0000;">本站不销售产品、不代购、不提供技术支持,仅分享信息,请遵纪守法、文明上网。</span></strong></a> <br> Copyright © 2024 <a href="/">云主机测评网</a> - All Rights Reserved 闽ICP备1000000号</p> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?5b8a98e1acc41ae4819af6359fcefd67"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script></div> </footer> <div class="karbar karbar-rb"> <ul> <li class="karbar-totop"><a href="javascript:(TBUI.scrollTo());"><i class="tbfa"></i></a></li> </ul> </div> <script> window.TBUI = {"www":"https:\/\/www.yunzhuji.net\/hfdr_dux","uri":"https:\/\/www.yunzhuji.net\/view\/hfdr_dux","roll":"1 2 3"}</script> <script type='text/javascript' src='/view/hfdr_dux/js/loader.js' id='loader-js'></script> <script> </script> </body> </html> <script type="text/javascript" src="/view/hfdr_dux/js/style.js"></script> <script src="/view/hfdr_dux/js/img-view.js"></script> <div class="rewards-popover-mask" data-event="rewards-close" style="display: none;"></div> <div class="rewards-popover" style="display: none;"> <h3>觉得文章有用就打赏一下文章作者</h3> <h5>非常感谢你的打赏,我们将继续给力更多优质内容,让我们一起创建更加美好的网络世界!</h5> <div class="rewards-popover-item"> <h4>支付宝扫一扫打赏</h4> <img src="/view/hfdr_dux/img/zfb.png"> </div> <div class="rewards-popover-item"><h4>微信扫一扫打赏</h4> <img src="/view/hfdr_dux/img/wx.png"> </div> <span class="rewards-popover-close" data-event="rewards-close"><i class="tbfa"></i></span> </div> <script> $(".article-content img").on("click",function (){ window.ViewImage && ViewImage.init('.article-content img'); }); </script> <script type="text/javascript"> $("#likes_do").click(function () { $.getJSON("", function(data){ if(data.err){ alert(data.msg); }else{ if( data.dolike == 1 ){ $("#likes_do").attr(""); }else{ $("#likes_do").attr(""); } $("#likes_count").html(data.likes_count); alert(data.msg); } }); }); </script> <script type="text/javascript"> //回复某评论 function reply_comment(commentid){ $("input[name='reply_commentid']").val(commentid); var comment = $("#comment_"+commentid+">.msgarticle").html(); $("#reply_comment_content").html(comment); $("#reply_comment_div").show(); } //取消回复某评论 function cancel_reply_comment() { $("input[name='reply_commentid']").val(0); $("#reply_comment_div").hide(); } //加载更多评论 (function(){ var obj = $("#load_more"); var next_url = obj.attr("next_url"); var isnext = obj.attr("isnext"); var no_more = function() { obj.html("没有更多了"); if(typeof load_more != "undefined") obj.off("click", load_more); if(typeof auto_load_more != "undefined") $(window).off("scroll", auto_load_more); } if(isnext < 1) { no_more(); return; } var leJosnLock = false; var load_more = function() { if(!next_url || leJosnLock) return; obj.html("玩命加载中..."); leJosnLock = true; $.get(next_url, function(data) { try{ var json = eval("("+data+")"); next_url = json.next_url; $.each(json.list_arr, function(i,item) { var s = '<li class="comment byuser comment-author-admin bypostauthor even thread-even depth-1">'; s += '<span class="comt-f">'+item.date+'</span><div class="comt-avatar"><img alt="'+item.author+'" src="'+item.avatar+'" class="avatar avatar-50 photo" src="view/hfdr-dux/img/avatar-default.png"></div>'; s += '<div class="comt-main"><p>'+item.content+'</p><div class="comt-meta"><span class="comt-author">'+item.author+'</span>('+item.ip+')</div></div>'; s += '</li>'; $("#comment_cont>li:last").after(s); }); obj.html("更多评论"); leJosnLock = false; if(json.isnext < 1) no_more(); }catch(e){ alert(data); } }); } obj.click(load_more); })(); </script>