欢迎来到258分享网,纯净的网络源码分享基地!

258资源分享网

全部作品
全部作品
网站源码
微信源码
素材特效
源码插件
视频教程
建站学院
热门搜索: 织梦  农业种植  农业  安全设置  官方
258资源分享 > 建站学院 > 织梦教程 > dedecms织梦怎么添加RSS订阅功能

推荐下载

HTML5响应式自适应网咯设计

2020-05-12   浏览:740

高端HTML5响应式企业通用网

2020-05-06   浏览:521

html5响应式外贸网站英文版

2020-05-08   浏览:510

HTML5自适应律师工作室类网

2020-04-04   浏览:504

HTML5影视传媒文化公司类网

2020-05-12   浏览:500

dedecms织梦怎么添加RSS订阅功能

发布时间:2020-09-09  

dedecms织梦订阅好像是现在很流行的字眼,很多人都会在网站上添加RSS订阅,如果你也想要在网站上添加一个RSS订阅功能的话,也可以来试试这种方法。
新建rss.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/rssmap.htm");
header("Content-type:application/xml");
$pv->Display();
?>
新建rss.htm传至/templates/default目录下:
<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0">
<channel>
<title>{dede:global.cfg_webname/}</title>
<link>{dede:global.cfg_basehost/}</link>
<description>{dede:global.cfg_description/}</description>
<language>zh-cn</language>
<generator>{dede:global.cfg_webname/}</generator>
<webmaster>{dede:global.cfg_adminemail/}</webmaster>
{dede:arclist row='20' col='1' titlelen='100' orderby='pubdate'}
<item>
<link>最模板zuimoban.com[field:arcurl/]</link>
<title><![CDATA[[field:title function='html2text(@me)'/]]]></title>
<author>[field:writer/]</author>
<category>[field:typename/]</category>
<pubDate>[field:pubdate function='strftime("%a, %d %b %Y %H:%M:%S +0800",@me)'/]</pubDate>
<guid>最模板zuimoban.com[field:arcurl/]</guid>
<description><![CDATA[[field:description function='html2text(@me)'/] ... ]]></description>
</item>
{/dede:arclist}
</channel>
</rss>
在上传的时候把里面的最模板zuimoban.com换成你自己的域名,然后在后天的模板管理中找自己网站模板中的RSS链接换成你的域名/rss.php的形式,然后生成一次就可以看到效果了。