function terms_of_service_get() { bb_send_headers(); bb_get_header(); ?> <h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?> "><?php bb_option('name'); ?> </a> » <?php _e('Terms of Service'); ?> </h3> <div class="indent"> <h2 id="register"><?php _e('Terms of Service'); ?> </h2> <div id="terms_of_service" style="padding:0.5em 1em 1em 1em; margin:0em 3em; background: #eee; color: #000;"> <?php @readfile(rtrim(dirname(__FILE__), ' /\\') . '/terms-of-service.html'); echo '</div></div>'; bb_get_footer(); exit; }
function bb_attachments_init() { global $bbdb, $bb_attachments; if (isset($_GET['bb_attachments_diagnostic']) || isset($_GET['bb_attachments_debug'])) { include 'debug.php'; } if (isset($_GET['bbat_delete'])) { bb_attachments_delete(); } if (isset($_GET['bb_attachments'])) { if (isset($_GET['bbat'])) { if (isset($_GET['inline'])) { bb_attachments_inline(); } else { bb_attachments_download(); } } else { if (bb_attachments_location() != 'edit.php') { bb_repermalink(); bb_send_headers(); bb_get_header(); bb_attachments($post_id); bb_get_footer(); exit; } } } if ($bb_attachments['style']) { add_action('bb_head', 'bb_attachments_add_css'); } // add css if present (including Kakumei 0.9.0.2 LI fix!) if ($bb_attachments['title'] && !is_topic() && !is_bb_feed()) { add_filter('topic_title', 'bb_attachments_title', 200); } if (isset($_GET["new"]) || is_topic() || is_forum()) { add_action('bb_topic.php', 'bb_attachments_cache'); add_filter('post_text', 'bb_attachments_post_footer', 4); add_filter('post_edit_uri', 'bb_attachments_link'); if (bb_current_user_can($bb_attachments['role']['upload'])) { add_action('post_edit_form', 'bb_attachments'); // auto-insert on post edit form if ($bb_attachments['upload_on_new']) { add_action('post_form', 'bb_attachments_upload_form'); // auto-insert on new post form add_action('pre_post_form', 'bb_attachments_enctype'); // multipart workaround on new post form // insane bbPress workaround - adds multipart enctype to the new post form via uri patch function bb_attachments_enctype() { global $topic, $forum; if (is_topic() && bb_current_user_can('write_post', $topic->topic_id) || !is_topic() && bb_current_user_can('write_topic', $forum->forum_id)) { add_filter('bb_get_uri', 'bb_attachments_uri_10', 999, 3); add_filter('bb_get_option_uri', 'bb_attachments_uri', 999); add_action('post_form', 'bb_attachments_remove_uri', 999); add_action('post_post_form', 'bb_attachments_remove_uri', 999); } } function bb_attachments_uri_10($uri, $resource = '', $context = '') { if (strpos($uri, "bb-post.php") !== false && $context && defined('BB_URI_CONTEXT_FORM_ACTION') && $context == BB_URI_CONTEXT_FORM_ACTION) { bb_attachments_remove_uri(); return $uri . '" enctype="multipart/form-data" hack="'; } return $uri; } function bb_attachments_uri($uri) { // if (strpos($uri,'bb-post.php')===false) {return $uri;} bb_attachments_remove_uri(); return $uri . 'bb-post.php" enctype="multipart/form-data" hack="'; } function bb_attachments_remove_uri($x = "") { remove_filter('bb_get_option_uri', 'bb_attachments_uri', 999); remove_filter('bb_get_uri', 'bb_attachments_uri_10', 999); } } } } // end else }
* Get details of the current user */ bb_current_user(); /** * Initialise CRON */ if (!function_exists('nxt_schedule_single_event')) { require_once BACKPRESS_PATH . 'functions.nxt-cron.php'; } if (!defined('DOING_CRON') || !DOING_CRON) { nxt_cron(); } /** * The currently viewed page number */ $page = bb_get_uri_page(); /** * Initialisation complete API hook */ do_action('bb_init'); /** * Block user if they deserve it */ if (bb_is_user_logged_in() && bb_has_broken_pass()) { bb_block_current_user(); } /** * Send HTTP headers */ bb_send_headers();