function topic_rss_link($id = 0, $context = 0)
{
    if (!$context || !is_integer($context)) {
        $context = BB_URI_CONTEXT_A_HREF + BB_URI_CONTEXT_BB_FEED;
    }
    echo apply_filters('topic_rss_link', get_topic_rss_link($id, $context), $id, $context);
}
예제 #2
0
function socialit_get_current_rss_link()
{
    switch (bb_get_location()) {
        case 'profile-page':
            if ($tab = isset($_GET['tab']) ? $_GET['tab'] : bb_get_path(2)) {
                if ($tab != 'favorites') {
                    break;
                }
            }
            $feed = get_favorites_rss_link(0, BB_URI_CONTEXT_LINK_ALTERNATE_HREF + BB_URI_CONTEXT_BB_FEED);
            break;
        case 'topic-page':
            $feed = get_topic_rss_link(0, BB_URI_CONTEXT_LINK_ALTERNATE_HREF + BB_URI_CONTEXT_BB_FEED);
            break;
        case 'tag-page':
            if (bb_is_tag()) {
                $feed = bb_get_tag_posts_rss_link(0, BB_URI_CONTEXT_LINK_ALTERNATE_HREF + BB_URI_CONTEXT_BB_FEED);
            }
            break;
        case 'forum-page':
            $feed = bb_get_forum_posts_rss_link(0, BB_URI_CONTEXT_LINK_ALTERNATE_HREF + BB_URI_CONTEXT_BB_FEED);
            break;
        case 'front-page':
            $feed = bb_get_posts_rss_link(BB_URI_CONTEXT_LINK_ALTERNATE_HREF + BB_URI_CONTEXT_BB_FEED);
            break;
        case 'view-page':
            global $bb_views, $view;
            if ($bb_views[$view]['feed']) {
                $feed = bb_get_view_rss_link(null, BB_URI_CONTEXT_LINK_ALTERNATE_HREF + BB_URI_CONTEXT_BB_FEED);
            }
            break;
        default:
            $feed = bb_get_posts_rss_link(BB_URI_CONTEXT_LINK_ALTERNATE_HREF + BB_URI_CONTEXT_BB_FEED);
            break;
    }
    return $feed;
}
예제 #3
0
         $posts[] = bb_get_first_post($topic->topic_id);
     }
     $title = esc_html(sprintf(__('%1$s » View: %2$s'), bb_get_option('name'), $bb_views[$feed_id]['title']));
     $link = get_view_link($feed_id);
     $link_self = bb_get_view_rss_link($feed_id);
     break;
 case 'topic':
     if (!($topic = get_topic($feed_id))) {
         die;
     }
     if (!($posts = get_thread($feed_id, 0, 1))) {
         die;
     }
     $title = esc_html(sprintf(__('%1$s » Topic: %2$s'), bb_get_option('name'), get_topic_title()));
     $link = get_topic_link($feed_id);
     $link_self = get_topic_rss_link($feed_id);
     break;
 case 'profile':
     if (bb_get_option('mod_rewrite') === 'slugs') {
         $user = bb_get_user_by_nicename($feed_id);
     } else {
         $user = bb_get_user($feed_id);
     }
     if (!$user) {
         die;
     }
     if (!($posts = get_user_favorites($user->ID))) {
         die;
     }
     $title = esc_html(sprintf(__('%1$s » User Favorites: %2$s'), bb_get_option('name'), $user->user_login));
     $link = bb_get_profile_link($feed_id);