Esempio n. 1
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;
}
function get_forum_rss_link($forum_id = 0)
{
    bb_log_deprecated('function', __FUNCTION__, 'bb_get_forum_posts_rss_link');
    return bb_get_forum_posts_rss_link($forum_id);
}
Esempio n. 3
0
     }
     $posts = array();
     foreach ($topics as $topic) {
         $posts[] = bb_get_first_post($topic->topic_id);
     }
     $title = esc_html(sprintf(__('%1$s » Forum: %2$s - Recent Topics'), bb_get_option('name'), get_forum_name($feed_id)));
     $link = get_forum_link($feed_id);
     $link_self = bb_get_forum_topics_rss_link($feed_id);
     break;
 case 'forum-posts':
     if (!($posts = bb_get_latest_forum_posts($feed_id))) {
         die;
     }
     $title = esc_html(sprintf(__('%1$s » Forum: %2$s - Recent Posts'), bb_get_option('name'), get_forum_name($feed_id)));
     $link = get_forum_link($feed_id);
     $link_self = bb_get_forum_posts_rss_link($feed_id);
     break;
     // Get just the first post from the latest topics
 // Get just the first post from the latest topics
 case 'all-topics':
     if (!($topics = get_latest_topics())) {
         die;
     }
     $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;
function bb_forum_posts_rss_link($forum_id = 0, $context = 0)
{
    if (!$context || !is_integer($context)) {
        $context = BB_URI_CONTEXT_A_HREF + BB_URI_CONTEXT_BB_FEED;
    }
    echo apply_filters('bb_forum_posts_rss_link', bb_get_forum_posts_rss_link($forum_id, $context), $context);
}
Esempio n. 5
0
echo bb_get_active_theme_uri();
?>
image/feed.png" width="16" height="16" alt="Feed"/></a>
					</div>
					<h2><?php 
_e('Page Information', 'guangzhou');
?>
</h2>
					<?php 
if (get_forum_description()) {
    echo '<p>' . get_forum_description() . '</p>';
}
?>
					
					<p><?php 
printf(__('Subscribe through your <a href="%s">feed reader</a>.', 'guangzhou'), bb_get_forum_posts_rss_link());
?>
</p>
				</li>
				<?php 
do_action('gz_place_sidebar');
?>
				
				<li>
					<h2><?php 
_e('Search');
?>
</h2>
					<?php 
include dirname(__FILE__) . '/search-form.php';
?>