Vergleich syndication.php - 1.2.9 - 1.2.13

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html
*

 * $Id: syndication.php 3030 2007-04-26 00:19:47Z Tikitiki $

 * $Id: syndication.php 3595 2008-01-09 00:10:57Z Tikitiki $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 58Zeile 58
// If there are any, add SQL to exclude them.
if($unviewable)
{

// If there are any, add SQL to exclude them.
if($unviewable)
{

	$unviewable = "AND f.fid NOT IN($unviewable)";

	$unviewable = "AND fid NOT IN($unviewable)";

}
if($inactiveforums)
{

}
if($inactiveforums)
{

	$unviewable .= " AND f.fid NOT IN($inactiveforums)";

	$unviewable .= " AND fid NOT IN($inactiveforums)";

}

// If there are no forums to syndicate, syndicate all viewable.

}

// If there are no forums to syndicate, syndicate all viewable.

Zeile 73Zeile 73
	{
$forum_ids .= ",'".intval($fid)."'";
}

	{
$forum_ids .= ",'".intval($fid)."'";
}

	$forumlist = "AND f.fid IN ($forum_ids) $unviewable";

	$forumlist = "AND fid IN ($forum_ids) $unviewable";

}
else
{

}
else
{

Zeile 83Zeile 83

// Find out which title to add to the feed.
$title = $mybb->settings['bbname'];


// Find out which title to add to the feed.
$title = $mybb->settings['bbname'];

$query = $db->simple_select(TABLE_PREFIX."forums f", "f.name, f.fid", "1=1 ".$forumlist);

$query = $db->simple_select(TABLE_PREFIX."forums", "name, fid", "1=1 ".$forumlist);

$comma = " - ";
while($forum = $db->fetch_array($query))
{

$comma = " - ";
while($forum = $db->fetch_array($query))
{

Zeile 97Zeile 97
{
$title = $mybb->settings['bbname']." - ".$lang->all_forums;
}

{
$title = $mybb->settings['bbname']." - ".$lang->all_forums;
}


// Get the threads to syndicate.
$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
);

 

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


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





// Set the channel header.
$channel = array(
"title" => $title,

// Set the channel header.
$channel = array(
"title" => $title,

Zeile 121Zeile 110
);
$feedgenerator->set_channel($channel);


);
$feedgenerator->set_channel($channel);


 
// Get the threads to syndicate.
$query = $db->simple_select(TABLE_PREFIX."threads", "subject, tid, dateline, firstpost", "visible='1' AND closed NOT LIKE 'moved|%' ".$forumlist, array('order_by' => 'dateline', 'order_dir' => 'DESC', 'limit' => $thread_limit));

// Loop through all the threads.
while($thread = $db->fetch_array($query))
{

// Loop through all the threads.
while($thread = $db->fetch_array($query))
{

	$item = array(

	$items[$thread['tid']] = array(

		"title" => $thread['subject'],

		"title" => $thread['subject'],

		"link" => $mybb->settings['bburl']."/showthread.php?tid=".$thread['tid'],
"description" => $parser->strip_mycode($thread['postmessage'], $parser_options),

		"link" => $mybb->settings['bburl']."/showthread.php?tid=".$thread['tid'],		


		"date" => $thread['dateline'],

		"date" => $thread['dateline'],

		"updated" => $thread['edittime']

 
	);

	);

	$feedgenerator->add_item($item);














	
$firstposts[] = $thread['firstpost'];
}

if(!empty($firstposts))
{
$firstpostlist = "pid IN(".implode(',', $firstposts).")";
$query = $db->simple_select(TABLE_PREFIX."posts", "message, edittime, tid", $firstpostlist, array('order_by' => 'dateline', 'order_dir' => 'desc'));
while($post = $db->fetch_array($query))
{
$items[$post['tid']]['description'] = $parser->strip_mycode($post['message'], $parser_options);
$items[$post['tid']]['updated'] = $post['edittime'];
$feedgenerator->add_item($items[$post['tid']]);
}

}

// Then output the feed XML.

}

// Then output the feed XML.