Ejemplo n.º 1
0
            }
            $posts = array();
            foreach ($topics as $topic) {
                $posts[] = bb_get_first_post($topic->topic_id);
            }
            $title = esc_html(sprintf(__('%1$s » Recent Topics'), bb_get_option('name')));
            $link = bb_get_uri();
            $link_self = bb_get_topics_rss_link();
            break;
            // Get latest posts by default
        // Get latest posts by default
        case 'all-posts':
        default:
            if (!($posts = bb_get_latest_posts(35))) {
                die;
            }
            $title = esc_html(sprintf(__('%1$s » Recent Posts'), bb_get_option('name')));
            $link = bb_get_uri();
            $link_self = bb_get_posts_rss_link();
            break;
    }
}
bb_send_304($posts[0]->post_time);
if (!($description = esc_html(bb_get_option('description')))) {
    $description = $title;
}
$title = apply_filters('bb_title_rss', $title, $feed);
$description = apply_filters('bb_description_rss', $description, $feed);
$posts = apply_filters('bb_posts_rss', $posts, $feed);
$link_self = apply_filters('bb_link_self_rss', $link_self, $feed);
bb_load_template('rss2.php', array('bb_db_override', 'title', 'description', 'link', 'link_self'), $feed);
Ejemplo n.º 2
0
            }
            $title = sprintf(__('%1$s » Recent Topics'), bb_get_option('name'));
            $link = bb_get_uri();
            $link_self = bb_get_topics_rss_link();
            break;
            // Get latest posts by default
        // Get latest posts by default
        case 'all-posts':
        default:
            $posts = bb_get_latest_posts(35);
            $title = sprintf(__('%1$s » Recent Posts'), bb_get_option('name'));
            $link = bb_get_uri();
            $link_self = bb_get_posts_rss_link();
            break;
    }
}
if (!$posts) {
    /* We do typecasting in the template, but all themes don't have that! */
    $posts = array();
} else {
    /* Only send 304 if there are posts */
    bb_send_304(gmdate('D, d M Y H:i:s \\G\\M\\T', strtotime($posts[0]->post_time)));
}
if (!($description = bb_get_option('description'))) {
    $description = $title;
}
$title = apply_filters('bb_title_rss', $title, $feed);
$description = apply_filters('bb_description_rss', $description, $feed);
$posts = apply_filters('bb_posts_rss', $posts, $feed);
$link_self = apply_filters('bb_link_self_rss', $link_self, $feed);
bb_load_template('rss2.php', array('bb_db_override', 'title', 'description', 'link', 'link_self'), $feed);