• 全国400电话网上服务平台
    强大号码库资源任选,方便,快捷,快速开通。
    咨询热线:400-1100-266  

    dedecms织梦怎么添加RSS订阅功能
    POST TIME:2021-05-23 01:33
    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>http://www.织梦58dede58.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>http://www.织梦58dede58.com[field:arcurl/]</guid>
    <description><![CDATA[[field:description function='html2text(@me)'/] ... ]]></description>
    </item>
    {/dede:arclist}
    </channel>
    </rss>
    在上传的时候把里面的www.织梦58dede58.com换成你自己的域名,然后在后天的模板管理中找自己网站模板中的RSS链接换成http://你的域名/rss.php的形式,然后生成一次就可以看到效果了。
    
    关于我们 | 付款方式 | 建站知识 | 增值服务 | 网站模板
    Copyright © 2003-2016
    时间:9:00-21:00 (节假日不休)
    版权所有:巨人网络(扬州)科技有限公司
    总部地址:江苏省信息产业基地11号楼四层
    《增值电信业务经营许可证》 苏B2-20120278
    X

    截屏,微信识别二维码

    微信号:veteran88

    (点击微信号复制,添加好友)

     打开微信

    微信号已复制,请打开微信添加咨询详情!