Dokuwiki 中的自定义 RSS 提要
我正在使用 Dokuwiki 用一组已知的页面填充网站。比如说,foo_1
到 foo_9
。这些页面的内容会改变,但名称和位置永远不会改变。
我想以这些页面的特定顺序提供完整内容的 RSS 提要:
foo_1
foo_2
foo_3
...
foo_9
使用默认联合项目 这是不可能的(它总是使用顶部最新项目的排序顺序),所以我想我需要创建 feed.php
的自定义副本
问题是,我不是一个足够优秀的 PHP 开发人员,不知道我需要更改什么。在 feed.php
的第 134 行,函数 rss_buildItems
看起来像我想要调整的内容。本质上,我想向它传递一个简单的项目数组,以正确的顺序列出(假设这可行),然后删除收集信息的调用(在我看来,函数 < code>getRecents(),但我对此也有点困惑)。因此,我需要:
- 我想要列出的内容的 ID 或其他相关页面数据。
- 数组的格式。
- 封锁的行以停止基于日期的列出方法。
如果有人能让我开始,或者有任何其他可能更容易的想法,我将不胜感激。
I'm using Dokuwiki to populate a site with a known set of pages. Say, foo_1
through foo_9
. The content of those pages will change, but the names and locations never will.
I want to provide a full-content RSS feed in a particular order of just those pages:
foo_1
foo_2
foo_3
...
foo_9
Using the default syndication items it's not possible (it always uses the sort order of newest items at top), so I was thinking I'll need to create a customized copy of feed.php
The problem is, I'm not a good enough PHP developer to know what I need to change. In feed.php
on line 134 the function rss_buildItems
looks like what I'd want to tweak. Essentially, I'd like to pass it a simple array of the items to list in the correct order (assuming that would work), and then remove the call that gathers the information (that appears to me to be on line 288 the function getRecents()
, but I'm a bit confused about that as well). So, I would need:
- The ID or other relevant page data for what I want to list.
- The format of the array.
- The lines to block out to stop the date-based method of listing.
If anybody could get me started, or has any other ideas that might be easier, I'd be most appreciative.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过复制文件
feed.php
解决了这个问题,然后取出第 288 行:并将其替换为与此类似的内容:
似乎效果很好。
I solved this by making a copy of the file
feed.php
, then taking line 288:And replacing it with something similar to this:
Seems to work great.