栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > PHP > php开源框架 > dedecms

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

dedecms 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

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

dedecms织梦订阅好像是现在很流行的字眼,很多人都会在网站上添加RSS订阅,如果你也想要在网站上添加一个RSS订阅功能的话,也可以来试试这种方法。
新建rss.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目录下:



{dede:global.cfg_webname/}
{dede:global.cfg_basehost/}
{dede:global.cfg_description/}
zh-cn
{dede:global.cfg_webname/}
{dede:global.cfg_adminemail/}
{dede:arclist row='20' col='1' titlelen='100' orderby='pubdate'}

http://www.织梦58dede58.com[field:arcurl/]
<![CDATA[[field:title function='html2text(@me)'/]]]>
[field:writer/]
[field:typename/]
[field:pubdate function='strftime("%a, %d %b %Y %H:%M:%S +0800",@me)'/]
http://www.织梦58dede58.com[field:arcurl/]


{/dede:arclist}


在上传的时候把里面的www.织梦58dede58.com换成你自己的域名,然后在后天的模板管理中找自己网站模板中的RSS链接换成http://你的域名/rss.php的形式,然后生成一次就可以看到效果了。
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/5576.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号