dedecmsHow to implement RSS full-site static output and RSS subscription?
First of all, you create a new rss.php file and copy the following code into it:
Recommended learning: Dream Weaver cms
The code is as follows:
<?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("Content-type:application/xml"); $pv->Display(); ?>
Save the file to the root directory of the site.
Then, make an rss.htm template output file and copy the following code into it:
The code is as follows:
<?xml version="1.0" encoding="gb2312" ?> <rss version="2.0"> <channel> <title>{dede:global.cfg_webname/}</title> <link>{dede:global.cfg_basehost/}</link> <description>{dede:global.cfg_description/}</description> copyright dedecms <language>zh-cn</language> <generator>{dede:global.cfg_webname/}</generator> <webmaster>{dede:global.cfg_adminemail/}</webmaster> {dede:arclist row='60' col='1' titlelen='100' orderby='pubdate'} <item> <link>https://www.jb51.net[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>https://www.jb51.net[field:arcurl/]</guid> <description><![CDATA[[field:description function='html2text(@me)'/] ... <b>文章分类</b>:[field:typename/] <a href="https://www.jb51.net[field:arcurl/]" target="_blank">阅读全文</a> | <a href="https://www.jb51.net/plus/recommend.php?aid=[field:id/]" target="_blank">邮件推荐</a> | <a href="https://www.jb51.net[field:arcurl/]" target="_blank">评论回复</a>]]></description> 织梦好,好织梦 </item> {/dede:arclist} </channel> </rss>
If you use it on your own site, Please replace the URL with your own. Save this file in the same directory as the index.htm home page template, log in to the management background, clear the cache, and update the html
---------------- --------------------------
The above is dynamic input. If you want to change it to static output, you need to press Do what is said below
----------------------------------------------
Step one: Open single-page document management under the channel model
Click to add a page
Just follow the picture above to create such a single-page file, but the name cannot be Use "site-wide RSS static output". It is best to use an English name. You can choose it by yourself. Click to save the others and ignore it.
Finally update the cache. It is best to update it in the whole site.
For rss subscription, I redid the original file rssmap.html in dede, and then overwritten the original file. The original file is in the data folder.
The following provides some popular rss subscription codes For your reference
<div class="indexContent"> <div><a href="http://www.google.com/reader/view/feed/http://www.shsui.cn/rss.xml" target="_blank" rel="nofollow"><img src="/static/imghwm/default1.png" data-src="images/rss/o_sub_google.gif" class="lazy" style="max-width:90%" alt="通过Google订阅本站" /></a></div> <div><a href="http://www.zhuaxia.com/add_channel.php?url=www.shsui.cn/rss.xml" target="_blank" rel="nofollow"><img src="/static/imghwm/default1.png" data-src="images/o_sub_zhuaxia.gif" class="lazy" style="max-width:90%" alt="通过抓虾订阅本站" /></a></div> 织梦内容管理系统 <div><a href="http://www.xianguo.com/subscribe.php?url=www.shsui.cn/rss.xml" target="_blank" rel="nofollow"><img src="/static/imghwm/default1.png" data-src="images/rss/o_sub_xianguo.gif" class="lazy" style="max-width:90%" alt="通过鲜果订阅本站" /></a></div> <div><a href="http://www.shsui.cn/rss.xml" target="_blank" rel="nofollow"><img src="/static/imghwm/default1.png" data-src="images/rss/o_sub_hexun.gif" class="lazy" style="max-width:90%" alt="通过和讯博揽订阅本站" /></a></div> <div><a href="http://add.my.yahoo.com/rss?url=www.shsui.cn/rss.xml" target="_blank" rel="nofollow"><img src="/static/imghwm/default1.png" data-src="images/rss/o_sub_myyahoo.gif" class="lazy" style="max-width:90%" alt="通过雅虎订阅本站" /></a></div> 本文来自织梦 <div><a href="http://reader.yodao.com/#url=http://www.shsui.cn/rss.xml" target="_blank" rel="nofollow"><img src="/static/imghwm/default1.png" data-src="images/rss/o_yodaoresbutton.gif" class="lazy" style="max-width:90%" alt="通过有道订阅本站" /></a></div> <div><a href="http://www.bloglines.com/sub/http://www.shsui.cn/rss.xml" target="_blank" rel="nofollow"><img src="/static/imghwm/default1.png" data-src="images/rss/o_sub_bloglines.gif" class="lazy" style="max-width:90%" alt="通过BlogLines订阅本站" /></a></div> </div> 本文出自 “玩linux…做运维…没事..” 博客,请务必保留此出处
The above is the detailed content of How dedecms implements RSS full-site static output and RSS subscription. For more information, please follow other related articles on the PHP Chinese website!

dedecms增加多语言的方法:1、进入dedecms后台,创建封面栏目;2、将封面栏目“常规选项”的文件保存目录设置为cn或者en;3、将封面栏目“高级选项”的列表模板设置为“cn_index.htm”或者“en_index.htm”;4、单独调用每种语言的封面栏目和每种语言下的导航栏目即可。

织梦cms是用PHP语言写的。织梦CMS(DedeCMS)是一个PHP开源网站管理系统,作用是构建中小型网站;它采用PHP+MySQL技术开发,可同时使用于windows、linux、unix平台。

dedecms是PHP语言开发的;dedecms中文全称是织梦内容管理系统,是一个PHP开源网站管理系统;dedecms基于PHP和MySQL技术开发,可同时使用于Windows、Linux、Unix平台。

dedecms删除栏目的方法:1、登录后台管理;2、进入“栏目管理”,可以看到当前网站所有栏目;3、选择要删除的栏目;4、将鼠标悬停在栏目名称上,删除栏目;5、点击“确认”按钮以继续删除操作;6、删除成功。

织梦内容管理系统(DedeCMS) 以简单、实用、开源而闻名,是国内最知名的PHP开源网站管理系统,也是使用用户最多的PHP类CMS系统,在经历多年的发展,目前的版本无论在功能,还是在易用性方面,都有了长足的发展和进步。

火车头dedecms出现乱码解决方法:1、检查数据库编码;2、修改dedecms配置文件;3、检查浏览器编码设置;4、清理缓存和临时文件;5、寻求专业帮助。

dedecms是指织梦内容管理系统,是一个PHP开源网站管理系统,用于个人网站或中小型门户的构建;dedecms是基于PHP和MySQL技术开发,可同时使用于Windows、Linux、Unix平台。

dedecms无法修改的解决方法是:1、检查文件夹和文件的读写权限是否正确;2、使用最新版本的DedeCMS,并保持数据库、插件和主题等组件的版本与CMS核心匹配;3、添加了不兼容的插件或主题,导致DedeCMS无法正常工作;4、检查PHP日志和调试信息以找出问题并解决。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

SublimeText3 Linux new version
SublimeText3 Linux latest version

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 English version
Recommended: Win version, supports code prompts!
