本文整理汇总了PHP中bb_check_admin_referer函数的典型用法代码示例。如果您正苦于以下问题:PHP bb_check_admin_referer函数的具体用法?PHP bb_check_admin_referer怎么用?PHP bb_check_admin_referer使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bb_check_admin_referer函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: em_options
/**
* Makes a settings page for the plugin
*
* @uses bb_option_form_element() to generate the page
*/
function em_options()
{
global $em_plugopts;
if ($_POST['em_opts_submit'] == 1) {
/* Settings have been received, now save them! */
bb_check_admin_referer('em-save-chk');
/* Security Check */
/* Checks on options, and then save them */
$em_plugopts['link-tags'] = intval($_POST['link-tags']) == 1 ? 1 : 0;
$em_plugopts['link-users'] = intval($_POST['link-users']) == 1 ? 1 : 0;
$em_plugopts['link-user-to'] = $_POST['link-user-to'] == 'website' ? 'website' : 'profile';
$em_plugopts['reply-link'] = intval($_POST['reply-link']) == 1 ? 1 : 0;
$em_plugopts['reply-text'] = esc_attr($_POST['reply-text']);
bb_update_option(EM_OPTIONS, $em_plugopts);
bb_admin_notice(__('The options were successfully saved!', 'easy-mentions'));
}
if ($ver = em_update_check()) {
/* Check for Updates and if available, then notify */
bb_admin_notice(sprintf(__('New version (%1$s) of Easy Mentions is available! Please download the latest version from <a href="%2$s">here</a>.', 'easy-mentions'), $ver, 'http://bbpress.org/plugins/topic/easy-mentions/'));
}
/* Options in an array to be printed */
$options = array('link-tags' => array('title' => __('Link the Tags?', 'easy-mentions'), 'type' => 'checkbox', 'value' => $em_plugopts['link-tags'] == 1 ? '1' : '0', 'note' => sprintf(__('Check this option if you want the tags to be linked (by using %s) in the posts.', 'easy-mentions'), '<code>#tag</code>'), 'options' => array('1' => __('Yes', 'easy-mentions'))), 'link-users' => array('title' => __('Link the Users?', 'easy-mentions'), 'type' => 'checkbox', 'value' => $em_plugopts['link-users'] == 1 ? '1' : '0', 'note' => sprintf(__('Check this option if you want the users to be linked (by using %s) in the posts.', 'easy-mentions'), '<code>@user</code>'), 'options' => array('1' => __('Yes', 'easy-mentions'))), 'link-user-to' => array('title' => __('Link the user to profile or website?', 'easy-mentions'), 'type' => 'radio', 'value' => $em_plugopts['link-user-to'] == 'website' ? 'website' : 'profile', 'note' => __('If you selected the website option and the user\'s website does not exist, then the user will be linked to his or her profile page.', 'easy-mentions'), 'options' => array('profile' => __('Profile', 'easy-mentions'), 'website' => __('Website', 'easy-mentions'))), 'reply-link' => array('title' => __('Add a reply link below each post?', 'easy-mentions'), 'type' => 'checkbox', 'value' => $em_plugopts['reply-link'] == 1 ? '1' : '0', 'note' => sprintf(__('Before checking this option, please verify that there is a post form below the topic on each page. (<a href="%s">Help</a>)', 'easy-mentions'), 'http://bbpress.org/plugins/topic/easy-mentions/faq/'), 'options' => array('1' => __('Yes', 'easy-mentions'))), 'reply-text' => array('title' => __('Reply Text', 'easy-mentions'), 'class' => array('long'), 'value' => $em_plugopts['reply-text'] ? stripslashes($em_plugopts['reply-text']) : '<em>Replying to @%%USERNAME%%\'s <a href="%%POSTLINK%%">post</a>:</em>', 'after' => '<div style="clear:both;"></div>' . sprintf(__('Some HTML is allowed. The following keys can also be used:%1$s - Post\'s author\'s name%2$s - Post\'s link', 'after-the-deadline'), '<br /><strong>%%USERNAME%%</strong>', '<br /><strong>%%POSTLINK%%</strong>') . '<br />'));
if ($em_plugopts['link-users'] != 1) {
$options['link-user-to']['attributes'] = array('disabled' => 'disabled');
}
if ($em_plugopts['reply-link'] != 1) {
$options['reply-text']['attributes'] = array('disabled' => 'disabled');
}
?>
<h2><?php
_e('Easy Mentions', 'easy-mentions');
?>
</h2>
<?php
do_action('bb_admin_notices');
?>
<form method="post" class="settings options">
<fieldset>
<?php
foreach ($options as $option => $args) {
bb_option_form_element($option, $args);
}
?>
</fieldset>
<fieldset class="submit">
<?php
bb_nonce_field('em-save-chk');
?>
<input type="hidden" name="em_opts_submit" value="1"></input>
<input class="submit" type="submit" name="submit" value="Save Changes" />
</fieldset>
<p><?php
printf(__('Happy with the plugin? Why not <a href="%1$s">buy the author a cup of coffee or two</a> or get him something from his <a href="%2$s">wishlist</a>?', 'easy-mentions'), 'http://gaut.am/donate/EM/', 'http://gaut.am/wishlist/');
?>
</p>
</form>
<?php
}
示例2: wp_redirect
<?php
require 'admin-action.php';
$post_id = (int) $_GET['id'];
if (!bb_current_user_can('delete_post', $post_id)) {
wp_redirect(bb_get_uri(null, null, BB_URI_CONTEXT_HEADER));
exit;
}
bb_check_admin_referer('delete-post_' . $post_id);
$status = (int) $_GET['status'];
$bb_post = bb_get_post($post_id);
$old_status = (int) $bb_post->post_status;
if (!$bb_post) {
bb_die(__('There is a problem with that post, pardner.'));
}
if (0 == $status && 0 != $bb_post->post_status) {
// We're undeleting
add_filter('bb_delete_post', 'bb_topics_replied_on_undelete_post');
}
bb_delete_post($post_id, $status);
$message = '';
switch ($old_status) {
case 0:
switch ($status) {
case 0:
break;
case 1:
$message = 'deleted';
break;
default:
$message = 'spammed';
示例3: elseif
require BB_PATH . 'bb-admin/includes/functions.bb-upgrade.php';
$step = 'unrequired';
$forced = false;
if (isset($_POST['force']) && 1 == $_POST['force']) {
$forced = true;
} elseif (isset($_GET['force']) && 1 == $_GET['force']) {
$forced = true;
}
if (bb_get_option('bb_db_version') > bb_get_option_from_db('bb_db_version') || $forced) {
$forced_input = '';
if ($forced) {
$forced_input = '<input type="hidden" name="force" value="1" />';
}
$step = 'required';
if (strtolower($_SERVER['REQUEST_METHOD']) == 'post') {
bb_check_admin_referer('bbpress-upgrader');
define('BB_UPGRADING', true);
$bbdb->hide_errors();
$messages = bb_upgrade_all();
$bbdb->show_errors();
$upgrade_log = array(__('Beginning upgrade…'));
if (is_array($messages['messages'])) {
$upgrade_log = array_merge($upgrade_log, $messages['messages']);
}
$upgrade_log[] = '>>> ' . __('Done');
$error_log = array();
if (is_array($messages['errors'])) {
$error_log = $messages['errors'];
}
if (bb_get_option('bb_db_version') === bb_get_option_from_db('bb_db_version') && !count($error_log)) {
$step = 'complete';
示例4: bb_manage_user_fields
function bb_manage_user_fields($edit_user = '')
{
global $nxt_roles, $nxt_users_object, $bbdb;
// Cap checks
$user_roles = $nxt_roles->role_names;
$can_keep_gate = bb_current_user_can('keep_gate');
if ('post' == strtolower($_SERVER['REQUEST_METHOD'])) {
bb_check_admin_referer('user-manage');
// Instantiate required vars
$_POST = stripslashes_deep($_POST);
$create_user_errors = new nxt_Error();
// User login
$trimmed_user_login = str_replace(' ', '', $_POST['user_login']);
$user_login = sanitize_user($_POST['user_login'], true);
$user_meta['first_name'] = $_POST['first_name'];
$user_meta['last_name'] = $_POST['last_name'];
$user_display_name = $_POST['display_name'];
$user_email = $_POST['user_email'];
$user_url = $_POST['user_url'];
$user_meta['from'] = $_POST['from'];
$user_meta['occ'] = $_POST['occ'];
$user_meta['interest'] = $_POST['interest'];
$user_role = $_POST['userrole'];
$user_meta['throttle'] = $_POST['throttle'];
$user_pass1 = $_POST['pass1'];
$user_pass2 = $_POST['pass2'];
$user_status = 0;
$user_pass = false;
$user_url = $user_url ? bb_fix_link($user_url) : '';
// Check user_login
if (!isset($_GET['action']) && empty($user_login)) {
$create_user_errors->add('user_login', __('Username is a required field.'));
} else {
if ($user_login !== $trimmed_user_login) {
$create_user_errors->add('user_login', sprintf(__('%s is an invalid username. How\'s this one?'), esc_html($_POST['user_login'])));
$user_login = $trimmed_user_login;
}
}
// Check email
if (isset($user_email) && empty($user_email)) {
$create_user_errors->add('user_email', __('Email address is a required field.'));
}
// Password Sanity Check
if ((!empty($user_pass1) || !empty($user_pass2)) && $user_pass1 !== $user_pass2) {
$create_user_errors->add('pass', __('You must enter the same password twice.'));
} elseif (!isset($_GET['action']) && (empty($user_pass1) && empty($user_pass2))) {
$create_user_errors->add('pass', __('You must enter a password.'));
} elseif (isset($_GET['action']) && (empty($user_pass1) && empty($user_pass2))) {
$user_pass = '';
} else {
$user_pass = $user_pass1;
}
// No errors
if (!$create_user_errors->get_error_messages()) {
// Create or udpate
switch ($_POST['action']) {
case 'create':
$goback = bb_get_uri('bb-admin/users.php', array('created' => 'true'), BB_URI_CONTEXT_FORM_ACTION + BB_URI_CONTEXT_BB_ADMIN);
$user = $nxt_users_object->new_user(compact('user_login', 'user_email', 'user_url', 'user_nicename', 'user_status', 'user_pass'));
// Error handler
if (is_nxt_error($user)) {
bb_admin_notice($user);
unset($goback);
// Update additional user data
} else {
// Update caps
bb_update_usermeta($user['ID'], $bbdb->prefix . 'capabilities', array($user_role => true));
// Update all user meta
foreach ($user_meta as $key => $value) {
bb_update_usermeta($user['ID'], $key, $value);
}
// Don't send email if empty
if (!empty($user_pass)) {
bb_send_pass($user['ID'], $user_pass);
}
do_action('bb_new_user', $user['ID'], $user_pass);
}
break;
case 'update':
$goback = bb_get_uri('bb-admin/users.php', array('updated' => 'true'), BB_URI_CONTEXT_FORM_ACTION + BB_URI_CONTEXT_BB_ADMIN);
$user = $nxt_users_object->get_user($_GET['user_id'], array('output' => ARRAY_A));
bb_update_user($user['ID'], $user_email, $user_url, $user_display_name);
// Don't change PW if empty
if (!empty($user_pass)) {
bb_update_user_password($user['ID'], $user_pass);
}
// Error handler
if (is_nxt_error($user)) {
bb_admin_notice($user);
unset($goback);
// Update additional user data
} else {
// Update caps
bb_update_usermeta($user['ID'], $bbdb->prefix . 'capabilities', array($user_role => true));
// Update all user meta
foreach ($user_meta as $key => $value) {
bb_update_usermeta($user['ID'], $key, $value);
}
// Don't send email if empty
if (!empty($user_pass)) {
//.........这里部分代码省略.........
示例5: array
// Set some low capabilities if the current user has none
if (!isset($user->capabilities)) {
$user->capabilities = array('inactive' => true);
}
// Store the profile info keys
$profile_info_keys = bb_get_profile_info_keys('profile-edit');
// Store additional keys if the current user has access to them
if (bb_current_user_can('edit_users')) {
$profile_admin_keys = bb_get_profile_admin_keys('profile-edit');
$assignable_caps = bb_get_assignable_caps();
}
// Instantiate the error object
$errors = new nxt_Error();
if ('post' == strtolower($_SERVER['REQUEST_METHOD'])) {
$_POST = stripslashes_deep($_POST);
bb_check_admin_referer('edit-profile_' . $user_id);
// Fix the URL before sanitizing it
$user_url = bb_fix_link($_POST['user_url']);
// Sanitize the profile info keys and check for missing required data
foreach ($profile_info_keys as $key => $label) {
${$key} = apply_filters('sanitize_profile_info', $_POST[$key], $key, $_POST[$key]);
if (!${$key} && $label[0] == 1) {
$errors->add($key, sprintf(__('%s is required.'), esc_html($label[1])));
${$key} = false;
}
}
// Find out if we have a valid email address
if (isset($user_email) && !($user_email = is_email($user_email))) {
$errors->add('user_email', __('Invalid email address'), array('data' => $_POST['user_email']));
}
// Deal with errors for users who can edit others data
示例6: bb_ksd_configuration_page_process
function bb_ksd_configuration_page_process()
{
if ('post' == strtolower($_SERVER['REQUEST_METHOD']) && $_POST['action'] == 'update-akismet-settings') {
bb_check_admin_referer('options-akismet-update');
$goback = remove_query_arg(array('invalid-akismet', 'updated-akismet'), wp_get_referer());
if (!isset($_POST['akismet_stats'])) {
$_POST['akismet_stats'] = false;
}
if (true === (bool) $_POST['akismet_stats']) {
bb_update_option('akismet_stats', 1);
} else {
bb_delete_option('akismet_stats');
}
if ($_POST['akismet_key']) {
$value = stripslashes_deep(trim($_POST['akismet_key']));
if ($value) {
if (bb_akismet_verify_key($value)) {
bb_update_option('akismet_key', $value);
} else {
$goback = add_query_arg('invalid-akismet', 'true', $goback);
bb_safe_redirect($goback);
exit;
}
} else {
bb_delete_option('akismet_key');
}
} else {
bb_delete_option('akismet_key');
}
$goback = add_query_arg('updated-akismet', 'true', $goback);
bb_safe_redirect($goback);
exit;
}
if (!empty($_GET['updated-akismet'])) {
bb_admin_notice(__('<strong>Settings saved.</strong>'));
}
if (!empty($_GET['invalid-akismet'])) {
bb_admin_notice(__('<strong>The key you attempted to enter is invalid. Reverting to previous setting.</strong>'), 'error');
}
global $bb_admin_body_class;
$bb_admin_body_class = ' bb-admin-settings';
}
示例7: bb_check_admin_referer
<?php
require_once 'admin.php';
$file_source = BB_PATH . 'bb-admin/includes/defaults.bb-htaccess.php';
$file_target = BB_PATH . '.htaccess';
include $file_source;
$file_source_rules = $_rules;
// This is a string
if ('post' == strtolower($_SERVER['REQUEST_METHOD']) && $_POST['action'] == 'update') {
bb_check_admin_referer('options-permalinks-update');
foreach ((array) $_POST as $option => $value) {
if (!in_array($option, array('_wpnonce', '_wp_http_referer', 'action', 'submit'))) {
$option = trim($option);
$value = is_array($value) ? $value : trim($value);
$value = stripslashes_deep($value);
if ($value) {
bb_update_option($option, $value);
} else {
bb_delete_option($option);
}
}
}
$mod_rewrite = (string) bb_get_option('mod_rewrite');
$goback = remove_query_arg(array('updated', 'notapache', 'notmodrewrite'), wp_get_referer());
// Make sure mod_rewrite is possible on the server
if (!$is_apache) {
bb_delete_option('mod_rewrite_writable');
$goback = add_query_arg('notapache', 'true', $goback);
bb_safe_redirect($goback);
exit;
} elseif ('0' !== $mod_rewrite && !apache_mod_loaded('mod_rewrite', true)) {
示例8: bb_die
bb_die(__('You are not allowed to write new topics.'));
}
bb_check_admin_referer('create-topic');
$topic = trim($_POST['topic']);
$tags = trim($_POST['tags']);
if ('' == $topic) {
bb_die(__('Please enter a topic title'));
}
$args = array();
if (isset($post_author)) {
$args['topic_poster_name'] = $args['topic_last_poster_name'] = $post_author;
}
$topic_id = bb_new_topic($topic, $forum_id, $tags, $args);
} elseif (isset($_POST['topic_id'])) {
$topic_id = (int) $_POST['topic_id'];
bb_check_admin_referer('create-post_' . $topic_id);
}
if (bb_is_login_required() && !bb_current_user_can('write_post', $topic_id)) {
bb_die(__('You are not allowed to post. Are you logged in?'));
}
if (!topic_is_open($topic_id)) {
bb_die(__('This topic has been closed'));
}
$post_data = array('post_text' => stripslashes($_POST['post_content']), 'topic_id' => $topic_id);
foreach (array('post_author', 'post_email', 'post_url') as $field) {
if (!empty(${$field})) {
$post_data[$field] = ${$field};
}
}
$post_id = bb_insert_post($post_data);
$tags = trim($_POST['tags']);
示例9: bb_check_admin_referer
<?php
require_once 'admin.php';
if ('post' == strtolower($_SERVER['REQUEST_METHOD'])) {
$action = @$_POST['action'];
} else {
$action = false;
}
if (in_array($action, array('update-users', 'update-options'))) {
bb_check_admin_referer('options-wordpress-' . $action);
// Deal with advanced user database checkbox when it isn't checked
if (!isset($_POST['user_bbdb_advanced'])) {
$_POST['user_bbdb_advanced'] = false;
}
foreach ((array) $_POST as $option => $value) {
if (!in_array($option, array('_wpnonce', '_wp_http_referer', 'action', 'submit'))) {
$option = trim($option);
$value = is_array($value) ? $value : trim($value);
$value = stripslashes_deep($value);
if (($option == 'wp_siteurl' || $option == 'wp_home') && !empty($value)) {
$value = rtrim($value, " \t\n\r\v/") . '/';
}
if ($value) {
bb_update_option($option, $value);
} else {
bb_delete_option($option);
}
}
}
if ($action == 'update-users') {
bb_apply_wp_role_map_to_orphans();
示例10: bb_check_admin_referer
<?php
require_once 'admin.php';
if ('post' == strtolower($_SERVER['REQUEST_METHOD'])) {
bb_check_admin_referer('post-bulk');
$post_ids = array_map('absint', $_POST['post']);
$count = 0;
$action = trim($_POST['action']);
switch ($action) {
case 'delete':
foreach ($post_ids as $post_id) {
$count += (int) (bool) bb_delete_post($post_id, 1);
}
$query_vars = array('message' => 'deleted', 'count' => $count);
break;
case 'undelete':
foreach ($post_ids as $post_id) {
$count += (int) (bool) bb_delete_post($post_id, 0);
}
$query_vars = array('message' => 'undeleted', 'count' => $count);
break;
default:
if ($action) {
$query_vars = apply_filters("bulk_post__{$action}", array(), $post_ids, $action);
}
break;
}
bb_safe_redirect(add_query_arg($query_vars));
exit;
}
if (!empty($_GET['message'])) {
示例11: bb_die
<?php
require 'admin.php';
if (!bb_current_user_can('manage_tags')) {
bb_die(__('You are not allowed to manage tags.'));
}
$old_id = (int) $_POST['id'];
$tag = $_POST['tag'];
bb_check_admin_referer('merge-tag_' . $old_id);
if (!($tag = bb_get_tag($tag))) {
bb_die(__('The destination tag you specified could not be found.'));
}
if (!bb_get_tag($old_id)) {
bb_die(__('The original tag could not be found.'));
}
if ($merged = bb_merge_tags($old_id, $tag->tag_id)) {
bb_die(sprintf(__("Number of topics from which the old tag was removed: %d <br />\n"), $merged['old_count']) . sprintf(__("Number of topics to which the new tag was added: %d <br />\n"), $merged['diff_count']) . sprintf(__("Number of rows deleted from tags table:%d <br />\n"), $merged['destroyed']['tags']) . sprintf(__('<a href="%s">View Results of Merge</a>'), bb_get_tag_link()));
} else {
bb_die(printf(__("Something odd happened when attempting to merge those tags.<br />\n<a href=\"%s\">Try Again?</a>"), nxt_get_referer()));
}
示例12: bb_die
<?php
if (!isset($_GET['doit']) || 'bb-subscribe' != $_GET['doit']) {
// sanity check
bb_die(__('What are you trying to do, exactly?'));
}
if (!bb_is_subscriptions_active()) {
bb_die(__('You can not subscribe to topics.'));
}
if (!isset($_GET['topic_id'])) {
bb_die(__('Missing topic ID!'));
}
bb_auth('logged_in');
$topic_id = (int) $_GET['topic_id'];
$topic = get_topic($topic_id);
if (!$topic) {
bb_die(__('Topic not found! What are you subscribing to?'));
}
bb_check_admin_referer('toggle-subscribe_' . $topic_id);
// Okay, we should be covered now
if (in_array($_GET['and'], array('add', 'remove'))) {
bb_subscription_management($topic->topic_id, $_GET['and']);
}
nxt_redirect(get_topic_link($topic_id, 1));
exit;
示例13: bb_check_admin_referer
<?php
require_once 'admin.php';
if ('post' == strtolower($_SERVER['REQUEST_METHOD']) && $_POST['action'] == 'update') {
bb_check_admin_referer('options-writing-update');
// Deal with xmlrpc checkbox when it isn't checked
if (!isset($_POST['enable_xmlrpc'])) {
$_POST['enable_xmlrpc'] = false;
}
foreach ((array) $_POST as $option => $value) {
if (!in_array($option, array('_nxtnonce', '_nxt_http_referer', 'action', 'submit'))) {
$option = trim($option);
$value = is_array($value) ? $value : trim($value);
$value = stripslashes_deep($value);
if ($value) {
bb_update_option($option, $value);
} else {
bb_delete_option($option);
}
}
}
$goback = add_query_arg('updated', 'true', nxt_get_referer());
bb_safe_redirect($goback);
exit;
}
if (!empty($_GET['updated'])) {
bb_admin_notice(__('<strong>Settings saved.</strong>'));
}
$general_options = array('edit_lock' => array('title' => __('Lock post editing after'), 'class' => 'short', 'after' => __('minutes'), 'note' => __('A user can edit a post for this many minutes after submitting.')), 'throttle_time' => array('title' => __('Throttle time'), 'class' => 'short', 'after' => __('seconds'), 'note' => __('Users must wait this many seconds between posts. By default, moderators, administrators and keymasters are not throttled.')));
$remote_options = array('enable_xmlrpc' => array('title' => __('XML-RPC'), 'type' => 'checkbox', 'options' => array(1 => __('Enable the bbPress XML-RPC publishing protocol.'))));
$bb_admin_body_class = ' bb-admin-settings';
示例14: bb_auth
<?php
require './bb-load.php';
bb_auth('logged_in');
$tag_id = (int) @$_GET['tag'];
$user_id = (int) @$_GET['user'];
$topic_id = (int) @$_GET['topic'];
bb_check_admin_referer('remove-tag_' . $tag_id . '|' . $topic_id);
$tag = bb_get_tag($tag_id);
$topic = get_topic($topic_id);
$user = bb_get_user($user_id);
if (!$tag || !$topic) {
bb_die(__('Invalid tag or topic.'));
}
if (false !== bb_remove_topic_tag($tag_id, $user_id, $topic_id)) {
if (!($redirect = wp_get_referer())) {
$redirect = get_topic_link($topic_id);
}
bb_safe_redirect($redirect);
} else {
bb_die(__('The tag was not removed.'));
}
exit;
示例15: bb_check_admin_referer
<?php
require_once 'admin.php';
if ('post' == strtolower($_SERVER['REQUEST_METHOD'])) {
bb_check_admin_referer('topic-bulk');
$topic_ids = array_map('absint', $_POST['topic']);
$affected = 0;
$action = trim($_POST['action']);
switch ($action) {
case 'close':
foreach ($topic_ids as $topic_id) {
$affected += bb_close_topic($topic_id);
}
$query_vars = array('message' => 'closed', 'count' => $affected);
break;
case 'open':
foreach ($topic_ids as $topic_id) {
$affected += bb_open_topic($topic_id);
}
$query_vars = array('message' => 'opened', 'count' => $affected);
break;
case 'delete':
foreach ($topic_ids as $topic_id) {
$affected += (int) (bool) bb_delete_topic($topic_id, 1);
}
$query_vars = array('message' => 'deleted', 'count' => $affected);
break;
case 'undelete':
foreach ($topic_ids as $topic_id) {
$affected += (int) (bool) bb_delete_topic($topic_id, 0);
}