// list returned blog entries $perm_cache = array(); foreach($blogcache AS $blog_post) { $xml->add_group('item'); $xml->add_tag('title', unhtmlspecialchars($blog_post['title'])); $xml->add_tag('link', $vbulletin->options['bburl'] . "/blog.php?b=$blog_post[blogid]", array(), false, true); $xml->add_tag('pubDate', gmdate('D, d M Y H:i:s', $blog_post['dateline']) . ' GMT'); if (!isset($perm_cache["$blog_post[userid]"])) { $perm_cache["$blog_post[userid]"] = cache_permissions($blog_post, false); } $plaintext_parser = new vB_BbCodeParser_PlainText($vbulletin, fetch_tag_list()); $plaintext_parser->set_parse_userinfo($blog_post, $perm_cache["$blog_post[userid]"]); $plainmessage = $plaintext_parser->parse($blog_post['pagetext'], 'blog_comment'); unset($plaintext_parser); if ($vbulletin->GPC['fulldesc']) { $xml->add_tag('description', $plainmessage); } else { $xml->add_tag('description', fetch_trimmed_title($plainmessage, $vbulletin->options['threadpreview'])); } if (!$vbulletin->GPC['nohtml']) {
$bbcode = new vB_BbCodeParser_Blog($vbulletin, fetch_tag_list()); $i = 0; $viewattachedimages = $vbulletin->options['viewattachedimages']; $attachthumbs = $vbulletin->options['attachthumbs']; // list returned blog entries $perm_cache = array(); foreach ($blogcache as $blog_post) { $xml->add_group('item'); $xml->add_tag('title', unhtmlspecialchars($blog_post['title'])); $xml->add_tag('link', $vbulletin->options['bburl'] . "/blog.php?b={$blog_post['blogid']}", array(), false, true); $xml->add_tag('pubDate', gmdate('D, d M Y H:i:s', $blog_post['dateline']) . ' GMT'); if (!isset($perm_cache["{$blog_post['userid']}"])) { $perm_cache["{$blog_post['userid']}"] = cache_permissions($blog_post, false); } $plaintext_parser = new vB_BbCodeParser_PlainText($vbulletin, fetch_tag_list()); $plaintext_parser->set_parse_userinfo($blog_post, $perm_cache["{$blog_post['userid']}"]); $plainmessage = $plaintext_parser->parse($blog_post['pagetext'], 'blog_comment'); unset($plaintext_parser); if ($vbulletin->GPC['fulldesc']) { $xml->add_tag('description', $plainmessage); } else { $xml->add_tag('description', fetch_trimmed_title($plainmessage, $vbulletin->options['threadpreview'])); } if (!$vbulletin->GPC['nohtml']) { $entry_factory = new vB_Blog_EntryFactory($vbulletin, $bbcode, $entry_categories); $entry_handler =& $entry_factory->create($blog_post, 'external'); $entry_handler->attachments = $postattach["{$blog_post['blogid']}"]; $xml->add_tag('content:encoded', $entry_handler->construct()); } $xml->add_tag('dc:creator', unhtmlspecialchars($blog_post['username'])); $xml->add_tag('guid', $vbulletin->options['bburl'] . "/blog.php?b={$blog_post['blogid']}", array('isPermaLink' => 'true'));