Post Reply 
Petition to improve the RSS feeds
Dec. 16, 2008, 03:10 AM
Post: #12
RE: Petition to improve the RSS feeds
There, the URLs should now direct to the individual posts instead of the entire thread.

This is just for my personal usage if I update the forum software and my changes get erased:

Code:
// Get the threads to syndicate.
$query = $db->query("
    SELECT t.tid, p.pid, p.dateline, p.edittime, t.subject, f.allowhtml, f.allowmycode, f.allowsmilies, f.allowimgcode,
    f.name, p.message, u.username, p.smilieoff, f.fid
    FROM ".TABLE_PREFIX."posts p
    LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=p.fid)
    LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
    LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
    WHERE t.visible=1 AND t.closed NOT LIKE 'moved|%' ".$forumlist."
    ORDER BY p.pid DESC
    LIMIT 0,".$thread_limit
);

// Set the feed type.
$feedgenerator->set_feed_format($mybb->input['type']);

// Set the channel header.
$channel = array(
    "title" => $title,
    "link" => $mybb->settings['bburl']."/",
    "date" => TIME_NOW,
    "description" => $mybb->settings['bbname']." - ".$mybb->settings['bburl']
);
$feedgenerator->set_channel($channel);

// Loop through all the threads.
while($thread = $db->fetch_array($query))
{
    $thread['link'] = $channel['link'].get_thread_link($thread['tid']).'&pid='.$thread['pid'].'#pid'.$thread['pid'];

(This is the code I modified to address the issues in this thread, in syndication.php) Wink
Visit this user's website
Add Thank You Quote this message in a reply
Post Reply 


Messages In This Thread
Petition to improve the RSS feeds - lnminente - Dec. 05, 2008, 07:26 PM
RE: Petition to improve the RSS feeds - Kye-U - Dec. 13, 2008, 09:56 PM
RE: Petition to improve the RSS feeds - Kye-U - Dec. 16, 2008 03:10 AM
RE: Petition to improve the RSS feeds - Kye-U - Mar. 23, 2009, 02:30 AM
RE: Petition to improve the RSS feeds - Kye-U - May. 04, 2009, 06:50 PM
RE: Petition to improve the RSS feeds - Kye-U - May. 04, 2009, 07:19 PM
RE: Petition to improve the RSS feeds - Kye-U - May. 04, 2009, 07:30 PM
RE: Petition to improve the RSS feeds - Kye-U - May. 04, 2009, 07:43 PM
RE: Petition to improve the RSS feeds - Kye-U - May. 04, 2009, 08:39 PM
RE: Petition to improve the RSS feeds - Kye-U - May. 07, 2009, 06:04 PM
RE: Petition to improve the RSS feeds - Kye-U - May. 07, 2009, 07:20 PM

Forum Jump: