function topic_icons_label($label) { global $topic; if (bb_is_front() || bb_is_forum() || bb_is_view() || bb_is_tag()) { $icon_set_name = topic_icons_get_active_icon_set(); $icon_set_url = ICON_SET_URL_BASE . $icon_set_name; $status = get_active_status_interpreter()->getStatus(bb_get_location(), $topic); $renderer = get_active_status_renderer(); $image = $renderer->renderStatus($status); $tooltip = $renderer->renderStatusTooltip($status); $exists = file_exists(dirname(__FILE__) . '/icon-sets/' . $icon_set_name . '/' . $image); if (!$exists) { return sprintf(__('<div class="topic-icon-image"><a href="%s"><img src="%s" width="%s" height="%s" alt="%s" border="0"></a></div> %s'), get_topic_link($topic->topic_id), ICON_SET_URL_BASE . '/empty.png', ICON_WIDTH, ICON_HEIGHT, $tooltip, $label); } else { if (strlen($tooltip) > 0) { return sprintf(__('<div class="topic-icon-image"><a href="%s"><img src="%s" width="%s" height="%s" alt="%s" border="0"><span>%s</span></a></div> %s'), get_topic_link($topic->topic_id), $icon_set_url . '/' . $image, ICON_WIDTH, ICON_HEIGHT, $tooltip, $tooltip, $label); } else { return sprintf(__('<div class="topic-icon-image"><a href="%s"><img src="%s" width="%s" height="%s" alt="%s" border="0"></a></div> %s'), get_topic_link($topic->topic_id), $icon_set_url . '/' . $image, ICON_WIDTH, ICON_HEIGHT, $tooltip, $label); } } } return $label; }
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 is_bb_tag() { bb_log_deprecated('function', __FUNCTION__, 'bb_is_tag'); return bb_is_tag(); }
/** * bb_get_new_topic_link() - Get the link to the form for a new topic * * @since 1.0 * @param mixed The arguments for this function. * @return string The link to the new topic form */ function bb_get_new_topic_link($args = null) { $defaults = array('text' => __('Add New »'), 'forum' => 0, 'tag' => ''); if ($args && is_string($args) && false === strpos($args, '=')) { $args = array('text' => $args); } $args = wp_parse_args($args, $defaults); extract($args, EXTR_SKIP); if ($forum && ($forum = bb_get_forum($forum))) { $url = get_forum_link($forum->forum_id) . '#postform'; } elseif ($tag && ($tag = bb_get_tag($tag))) { $url = bb_get_tag_link($tag->tag) . '#postform'; } elseif (bb_is_forum()) { global $forum; $url = get_forum_link($forum->forum_id) . '#postform'; } elseif (bb_is_tag()) { global $tag; $url = bb_get_tag_link($tag) . '#postform'; } elseif (bb_is_topic()) { $url = get_forum_link() . '#postform'; } elseif (bb_is_front()) { $url = bb_get_uri(null, array('new' => 1)); } if (!bb_is_user_logged_in()) { $url = bb_get_uri('bb-login.php', array('re' => $url), BB_URI_CONTEXT_A_HREF + BB_URI_CONTEXT_BB_USER_FORMS); } elseif (bb_is_forum() || bb_is_topic()) { if (!bb_current_user_can('write_topic', get_forum_id())) { return; } } else { if (!bb_current_user_can('write_topics')) { return; } } if ($url = esc_attr(apply_filters('new_topic_url', $url, $args))) { return '<a href="' . $url . '" class="new-topic">' . $text . '</a>' . "\n"; } }
?> <textarea name="post_content" cols="50" rows="8" id="post_content" tabindex="3"></textarea> </label> </p> <p id="post-form-tags-container"> <label for="tags-input"><?php printf(__('Tags (comma seperated)'), bb_get_tag_page_link()); ?> <input id="tags-input" name="tags" type="text" size="50" maxlength="100" value="<?php bb_tag_name(); ?> " tabindex="4" /> </label> </p> <?php if (bb_is_tag() || bb_is_front()) { ?> <p id="post-form-forum-container"> <label for="forum-id"><?php _e('Forum'); ?> <?php bb_new_topic_forum_dropdown(); ?> </label> </p> <?php } ?> <p id="post-form-submit-container" class="submit"> <input type="submit" id="postformsub" name="Submit" value="<?php