RSS-Feed Syndication for Posts since Version 1.2.x
RSS-Feed Syndication for Posts since Version 1.2.x
If you want to get an RSS-Feed for all new posts change file
"syndication.php" in root folder:
Search for "SELECT t.*, f.name AS forumname, p.message AS postmessage,
p.edittime":
Replace
Code:
$query =
$db->query("
SELECT t.*, f.name AS forumname,
p.message AS postmessage, p.edittime
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."forums f ON
(f.fid=t.fid)
LEFT JOIN ".TABLE_PREFIX."posts p ON
(p.pid=t.firstpost)
WHERE t.visible=1 AND t.closed NOT
LIKE 'moved|%' ".$forumlist."
ORDER BY t.dateline DESC
LIMIT 0, ".$thread_limit
);
with
Code:
// Syndicate a threads
or posts?
if(isset($mybb->input['feedtype']) &&
$mybb->input['feedtype']=='posts')
{
$sFeedType = 'posts';
$title .= $comma.' Posts';
}
else
{
$sFeedType = 'threads';
$title .= $comma.' Threads';
}
// Get the threads to syndicate.
if ($sFeedType=='posts')
{
$query = $db->query("
SELECT
pid,tid,subject,dateline,username,message AS postmessage
FROM ".TABLE_PREFIX."posts
ORDER BY pid DESC
LIMIT 0,".$thread_limit.""
);
}
else
{
$query = $db->query("
SELECT t.*, f.name AS forumname,
p.message AS postmessage, p.edittime
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."forums f ON
(f.fid=t.fid)
LEFT JOIN ".TABLE_PREFIX."posts p ON
(p.pid=t.firstpost)
WHERE t.visible=1 AND t.closed NOT
LIKE 'moved|%' ".$forumlist."
ORDER BY t.dateline DESC
LIMIT 0, ".$thread_limit
);
}
Now you get all new posts with an additional parameter "feedtype" set to
"posts".
Your Feed-URL should look like this:
http://www.myforumsite.de/syndication.ph...type=posts