function get_tag_page_link() { bb_log_deprecated('function', __FUNCTION__, 'bb_get_tag_page_link'); bb_get_tag_page_link(); }
function bb_repermalink() { global $page; $location = bb_get_location(); $uri = $_SERVER['REQUEST_URI']; if (isset($_GET['id'])) { $id = $_GET['id']; } else { $id = bb_get_path(); } $_original_id = $id; do_action('pre_permalink', $id); $id = apply_filters('bb_repermalink', $id); switch ($location) { case 'front-page': $path = null; $querystring = null; if ($page > 1) { if (bb_get_option('mod_rewrite')) { $path = 'page/' . $page; } else { $querystring = array('page' => $page); } } $permalink = bb_get_uri($path, $querystring, BB_URI_CONTEXT_HEADER); $issue_404 = true; break; case 'forum-page': if (empty($id)) { $permalink = bb_get_uri(null, null, BB_URI_CONTEXT_HEADER); break; } global $forum_id, $forum; $forum = bb_get_forum($id); $forum_id = $forum->forum_id; $permalink = get_forum_link($forum->forum_id, $page); break; case 'topic-edit-page': case 'topic-page': if (empty($id)) { $permalink = bb_get_uri(null, null, BB_URI_CONTEXT_HEADER); break; } global $topic_id, $topic; $topic = get_topic($id); $topic_id = $topic->topic_id; $permalink = get_topic_link($topic->topic_id, $page); break; case 'profile-page': // This handles the admin side of the profile as well. global $user_id, $user, $profile_hooks, $self; if (isset($_GET['id'])) { $id = $_GET['id']; } elseif (isset($_GET['username'])) { $id = $_GET['username']; } else { $id = bb_get_path(); } $_original_id = $id; if (!$id) { $user = bb_get_current_user(); // Attempt to go to the current users profile } else { if (bb_get_option('mod_rewrite') === 'slugs') { if (!($user = bb_get_user_by_nicename($id))) { $user = bb_get_user($id); } } else { if (!($user = bb_get_user($id))) { $user = bb_get_user_by_nicename($id); } } } if (!$user || 1 == $user->user_status && !bb_current_user_can('moderate')) { bb_die(__('User not found.'), '', 404); } $user_id = $user->ID; bb_global_profile_menu_structure(); $valid = false; if ($tab = isset($_GET['tab']) ? $_GET['tab'] : bb_get_path(2)) { foreach ($profile_hooks as $valid_tab => $valid_file) { if ($tab == $valid_tab) { $valid = true; $self = $valid_file; } } } if ($valid) { $permalink = get_profile_tab_link($user->ID, $tab, $page); } else { $permalink = get_user_profile_link($user->ID, $page); unset($self, $tab); } break; case 'favorites-page': $permalink = get_favorites_link(); break; case 'tag-page': // It's not an integer and tags.php pulls double duty. $id = isset($_GET['tag']) ? $_GET['tag'] : false; if (!$id || !bb_get_tag((string) $id)) { $permalink = bb_get_tag_page_link(); } else { global $tag, $tag_name; $tag_name = $id; $tag = bb_get_tag((string) $id); $permalink = bb_get_tag_link(0, $page); // 0 => grabs $tag from global. } break; case 'view-page': // Not an integer if (isset($_GET['view'])) { $id = $_GET['view']; } else { $id = bb_get_path(); } $_original_id = $id; global $view; $view = $id; $permalink = get_view_link($view, $page); break; default: return; break; } nxt_parse_str($_SERVER['QUERY_STRING'], $args); $args = urlencode_deep($args); if ($args) { $permalink = add_query_arg($args, $permalink); if (bb_get_option('mod_rewrite')) { $pretty_args = array('id', 'page', 'tag', 'tab', 'username'); // these are already specified in the path if ($location == 'view-page') { $pretty_args[] = 'view'; } foreach ($pretty_args as $pretty_arg) { $permalink = remove_query_arg($pretty_arg, $permalink); } } } $permalink = apply_filters('bb_repermalink_result', $permalink, $location); $domain = bb_get_option('domain'); $domain = preg_replace('/^https?/', '', $domain); $check = preg_replace('|^.*' . trim($domain, ' /') . '|', '', $permalink, 1); $uri = rtrim($uri, " \t\n\r\v?"); $uri = str_replace('/index.php', '/', $uri); global $bb_log; $bb_log->debug($uri, 'bb_repermalink() ' . __('REQUEST_URI')); $bb_log->debug($check, 'bb_repermalink() ' . __('should be')); $bb_log->debug($permalink, 'bb_repermalink() ' . __('full permalink')); $bb_log->debug(isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : null, 'bb_repermalink() ' . __('PATH_INFO')); if ($check != $uri && $check != str_replace(urlencode($_original_id), $_original_id, $uri)) { if ($issue_404 && rtrim($check, " \t\n\r\v/") !== rtrim($uri, " \t\n\r\v/")) { status_header(404); bb_load_template('404.php'); } else { nxt_redirect($permalink); } exit; } do_action('post_permalink', $permalink); }
" rel="tag"><?php bb_tag_name(); ?> </a> <?php $tags = bb_get_tag_remove_link(); if ($tags) { echo '<small>' . $tags . '</small>'; } ?> </li> <?php } ?> </ul> </div> <?php } else { ?> <p><?php printf(__('No <a href="%s">tags</a> yet.'), bb_get_tag_page_link()); ?> </p> <?php } ?> <?php GZ::tag_form(); ?> </div>
function bb_get_tag_link_base() { return bb_get_tag_page_link() . (bb_get_option('mod_rewrite') ? '' : '?tag='); }
<a name="new_form"> </a> <h3 class="post-form"><?php _e("Add New Topic","gf");?></h3> <form name="new_topic_form" action="" class="standard-form postform" method="post"> <p id="post-form-title-container"> <label for="topic"><?php _e('Title'); ?> <input type="text" name="topic_title" id="topic" size="50" maxlength="80" tabindex="1" /> </label> </p> <p id="post-form-post-container"> <label for="post_content"><?php _e('Post',"gf"); ?> <textarea name="topic_text" col="48" rows="10" tabindex="2" id="topic_text"></textarea> </label> </p> <p id="post-form-tags-container"> <label for="tags-input"><?php printf(__('Tags (comma seperated)','gf'), bb_get_tag_page_link()) ?> <input type="text" tabindex="3" value="" maxlength="100" size="50" name="topic_tags" id="tags-input" gtbfieldid="44"> </label> </p> <p id="post-form-forum-container"> <label for="forum-id"><?php _e('Forum','gf'); ?> <?php echo gf_get_forum_dropdown(gf_get_root_forum_id());?> </label> </p> <?php wp_nonce_field("gf_create_topic");?> <input type="submit" name="submit_topic" value="<?php _e('Create new topic','gf');?> "/> </form>
</label> </p> <?php } do_action('post_form_pre_post'); ?> <p id="post-form-post-container"> <label for="post_content"><?php _e('Post'); ?> <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
} do_action('post_form_pre_post'); ?> <p> <label for="post_content"><?php _e('Post:'); ?> <textarea name="post_content" cols="50" rows="8" id="post_content" tabindex="3"></textarea> </label> </p> <?php if (!is_topic()) { ?> <p> <label for="tags-input"><?php printf(__('Enter a few words (called <a href="%s">tags</a>) separated by commas to help someone find your topic:'), 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 (is_bb_tag() || is_front()) { ?> <p> <label for="forum-id"><?php _e('Pick a section:'); ?>
</label> <input name="topic" type="text" id="topic" size="80" maxlength="80" tabindex="1" class="text"/> </p> <div class="clear"></div> <?php } do_action('post_form_pre_post'); ?> <?php if (!is_topic()) { ?> <p> <label for="tags-input"><?php printf(__('<a href="%s">Tags</a> <small>(separated by commas)</small>'), bb_get_tag_page_link()); ?> </label> <input id="tags-input" name="tags" type="text" size="80" maxlength="100" tabindex="2" value="<?php bb_tag_name(); ?> " class="text"/> </p> <div class="clear"></div> <?php } ?> <?php if (is_bb_tag() || is_front()) { ?>
function breadcrumbs() { $page = ''; if (bb_get_location() == 'login-page') { $page = __('Log in', 'guangzhou'); } elseif (is_forum()) { $page = get_forum_name(); } elseif (is_bb_tags() && get_tag_name() != '') { $page = '<a href="' . bb_get_tag_page_link() . '">' . __('Tags') . '</a> » ' . get_tag_name(); } elseif (is_topic()) { if (get_forum_name()) { $page = '<a href="' . get_forum_link() . '">' . get_forum_name() . '</a>'; } } if ($page) { $page = '| ' . $page; } return '<a href="' . bb_get_option('uri') . '">' . bb_get_option('name') . '</a> ' . $page; }
_<?php echo $tag->user_id; ?> "><a href="<?php bb_tag_link(); ?> " rel="tag"><?php bb_tag_name(); ?> </a> <?php bb_tag_remove_link(); ?> </li> <?php } ?> </ul> <?php } ?> <?php if (!$tags) { ?> <p><?php printf('Пока нет <a href=\\"%s\\">меток</a>.', bb_get_tag_page_link()); ?> </p> <?php } tag_form();
</p> <?php } do_action('post_form_pre_post'); ?> <p> <label for="post_content">Сообщение: <textarea name="post_content" cols="50" rows="8" id="post_content" tabindex="3"></textarea> </label> </p> <?php if (!is_topic()) { ?> <p> <label for="tags-input"><?php printf('Введите несколько слов (<a href=\\"%s\\">меток</a>), разделенных запятыми для помощи в поиске Вашей темы:', 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 (is_bb_tag() || is_front()) { ?> <p> <label for="forum-id">Выберите раздел: <?php bb_new_topic_forum_dropdown();