Steffen
Well-known member
- Affected version
- 2.0.10
One of our users just pointed out that the "category" element is missing from our feeds since we migrated from vBulletin to XenForo. Seems to easy enough to add it back.
https://cyber.harvard.edu/rss/rss.html#ltcategorygtSubelementOfLtitemgt
https://framework.zend.com/manual/2.4/en/modules/zend.feed.writer.html
Diff:
--- a/src/XF/Pub/View/Forum/Rss.php
+++ b/src/XF/Pub/View/Forum/Rss.php
@@ -63,6 +63,10 @@ class Rss extends \XF\Mvc\View
$title = (empty($thread->title) ? \XF::phrase('title:') . ' ' . $thread->title : $thread->title);
$entry->setTitle($title)
->setLink($router->buildLink('canonical:threads', $thread))
+ ->addCategory([
+ 'term' => $thread->Forum->Node->title,
+ 'scheme' => $router->buildLink('canonical:forums', $thread->Forum),
+ ])
->setDateCreated($thread->post_date)
->setDateModified($thread->last_post_date);
https://cyber.harvard.edu/rss/rss.html#ltcategorygtSubelementOfLtitemgt
https://framework.zend.com/manual/2.4/en/modules/zend.feed.writer.html