DokuWiki

It's better when it's simple

用户工具

站点工具


zh:syndication

本篇文档由caii于2007年6月份陆续翻译而成。

XML 合成

DokuWiki通过feed.php文件,可将一些数据制成XML种子。

参数

如何产生这种种子,受各种URL参数的影响。

参数 有效值 默认值 描述
类型 rss, rss1, rss2, atom, atom1 rss1 这是种子使用的文档类型
模式 recent, list recent 应该输出什么:最近更改或者文档列表?
num 任何整数 最近的 选项 应该包括多少项目?(列表模式中忽略该参数)
ns a namespace * 输出哪个命名空间?
linkto page, rev, diff diff 项目链接到哪里?
minor true,false false 是否显示微小变化?

要注意,最近变化 是“num”参数的默认值,不是最大值。用户可以给“num”输入任何的高值。但是,最近更改仅仅列出每个页面的最新更改,所以结果数限制在由“us”指定的命名空间文档数目。1)

recent选项制定“mode”=“list”返回的结果数2)

例子

用户名/密码

在启用ACL并限制页面由授权用户查看时,请记住必须给RSS阅读器传递用户名和密码,例如: ''http://example.com/dokuwiki/feed.php?u=username&p=password'' 否则,RSS阅读器将因为这些查看限制,而不能显示任何最新的更改或者列出属于受限命名空间的文档。

FEED生成器

可使用优秀的由Kai Blankenhorn开发的Feed Creator Class来实现XML合同功能。 The XML Syndication feature was implemented by using the excellent by Kai Blankenhorn.

要注意:如果你想要RSS FEED的时间戳是正确的,你必须编辑文件 …/inc/feedcreator.class.php 来设置你的时区偏移量,在文件大约150行处:

***************************************************************************
*          A little setup                                                 *
**************************************************************************/

// your local timezone, set to "" to disable or for GMT
''define("TIME_ZONE","+01:00");''

Note: As of the 2006-11-06 release, DokuWiki will automatically detect the timezone.

:-o

Question

RSS doesn't work with my wiki. When RSS icon is clicked, it goes to the feed.php page but there is no content. It just says “This topic does not exist yet”. I'm lost. Please help. Thanks.

(clockwork) its the same with me… isn`t there a way to simply get an *.rss out of my wiki, or am i too stupid to find the manual somewhere round here?

Did you guys probably misconfigure your rewrite-rules? So it tries to find a page called “feed.php”? Try turning off rewriting in .htaccess to see wheter this is your problem.
It would be nice to have the possibility of replacing the underscores by blanks. At the moment, quiet long rss entries are generated which can make problems with rss viewers/plugins which do not break the pageID into different lines.

Is passing the username and password (&u=…&p=…) on the feed url a security problem? Or am I missing something? Does the syndication protocol encrypt these requests by default?

The feeds don't work with Google Reader :-?:-x

zh/syndication.txt · 最后更改: 2007-06-13 13:18 由 caii

除额外注明的地方外,本维基上的内容按下列许可协议发布: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki