function bp_forums_bbpress_admin() { global $bp; ?> <div class="wrap"> <h2><?php _e( 'Forums Setup', 'buddypress' ) ?></h2> <?php if ( isset( $_POST['submit'] ) ) : ?> <div id="message" class="updated fade"> <p><?php _e( 'Settings Saved.', 'buddypress' ) ?></p> </div> <?php endif; if ( isset( $_REQUEST['reinstall'] ) || !bp_forums_is_installed_correctly() ) { update_site_option( 'bb-config-location', false ); bp_forums_bbpress_install_wizard(); } else { $reinstall = network_admin_url( 'admin.php?page=bb-forums-setup&reinstall=1' ); ?> <p><?php printf( __( 'bbPress forum integration in BuddyPress has been set up correctly. If you are having problems you can <a href="%s" title="Reinstall bbPress">re-install</a>', 'buddypress' ), $reinstall ); ?> <p><?php _e( 'NOTE: The forums directory will only work if your bbPress tables are in the same database as your WordPress tables. If you are not using an existing bbPress install you can ignore this message.', 'buddypress' ) ?></p> <?php } ?> </div> <?php }
/** * Outputs the markup for the bb-forums-admin panel */ function bp_forums_bbpress_admin() { // The text and URL of the Site Wide Forums button differs depending on whether bbPress // is running if (is_plugin_active('bbpress/bbpress.php')) { // The bbPress admin page will always be on the root blog. switch_to_blog() will // pass through if we're already there. switch_to_blog(bp_get_root_blog_id()); $button_url = admin_url(add_query_arg(array('page' => 'bbpress'), 'options-general.php')); restore_current_blog(); $button_text = __('Configure bbPress', 'buddypress'); } else { $button_url = bp_get_admin_url(add_query_arg(array('tab' => 'plugin-information', 'plugin' => 'bbpress', 'TB_iframe' => 'true', 'width' => '640', 'height' => '500'), 'plugin-install.php')); $button_text = __('Install bbPress', 'buddypress'); } $action = bp_get_admin_url('admin.php?page=bb-forums-setup&reinstall=1'); ?> <div class="wrap"> <?php screen_icon('buddypress'); ?> <h2 class="nav-tab-wrapper"><?php bp_core_admin_tabs(__('Forums', 'buddypress')); ?> </h2> <?php if (isset($_POST['submit'])) { ?> <div id="message" class="updated fade"> <p><?php _e('Settings Saved.', 'buddypress'); ?> </p> </div> <?php } ?> <?php if (isset($_REQUEST['reinstall']) || !bp_forums_is_installed_correctly()) { // Delete the bb-config.php location option bp_delete_option('bb-config-location'); // Now delete the bb-config.php file @unlink(ABSPATH . 'bb-config.php'); // show the updated wizard bp_forums_bbpress_install_wizard(); } else { ?> <div style="width: 45%; float: left; margin-top: 20px;"> <h3><?php _e('(Installed)', 'buddypress'); ?> <?php _e('Forums for Groups', 'buddypress'); ?> </h3> <p><?php _e('Give each individual group its own discussion forum. Choose this if you\'d like to keep your members\' conversations separated into distinct areas.', 'buddypress'); ?> </p> <p><?php _e('Note: This component is retired and will not be receiving any updates in the future. Only use this component if your current site relies on it.', 'buddypress'); ?> </p> <h4 style="margin-bottom: 10px;"><?php _e('Features', 'buddypress'); ?> </h4> <ul class="description" style="list-style: square; margin-left: 30px;"> <li><?php _e('Group Integration', 'buddypress'); ?> </p></li> <li><?php _e('Member Profile Integration', 'buddypress'); ?> </p></li> <li><?php _e('Activity Stream Integration', 'buddypress'); ?> </p></li> <li><?php _e('@ Mention Integration', 'buddypress'); ?> </p></li> </ul> <div> <a class="button button-primary confirm" href="<?php echo $action; ?> "><?php _e('Uninstall Group Forums', 'buddypress'); ?> </a> </div> </div> <div style="width: 45%; float: left; margin: 20px 0 20px 20px; padding: 0 20px 20px 20px; border: 1px solid #ddd; background-color: #fff;"> <h3><?php _e('New! bbPress', 'buddypress'); ?> </h3> <p><?php _e('bbPress is a brand-new forum plugin from one of the lead developers of BuddyPress.', 'buddypress'); ?> </p> <p><?php _e('It boasts a bunch of cool features that the BP Legacy Discussion Forums does not have including:', 'buddypress'); ?> </p> <ul class="description" style="list-style: square; margin-left: 30px;"> <li><?php _e('Non-group specific forum creation', 'buddypress'); ?> </p></li> <li><?php _e('Moderation via the WP admin dashboard', 'buddypress'); ?> </p></li> <li><?php _e('Topic splitting', 'buddypress'); ?> </p></li> <li><?php _e('Revisions', 'buddypress'); ?> </p></li> <li><?php _e('Spam management', 'buddypress'); ?> </p></li> <li><?php _e('Subscriptions', 'buddypress'); ?> </p></li> <li><?php _e('And more!', 'buddypress'); ?> </p></li> </ul> <p><?php printf(__('If you decide to use bbPress, you will need to deactivate the legacy group forum component. For more info, <a href="%s">read this codex article</a>.', 'buddypress'), 'http://codex.buddypress.org/user/setting-up-a-new-installation/installing-group-and-sitewide-forums/using-bbpress-2-2-with-buddypress/'); ?> </p> <div> <a class="button thickbox button-primary" href="<?php echo esc_attr($button_url); ?> "><?php echo esc_html($button_text); ?> </a> </div> </div> <?php } ?> </div> <?php }
/** * Outputs the markup for the bb-forums-admin panel */ function bp_forums_bbpress_admin() { global $bp; // The text and URL of the Site Wide Forums button differs depending on whether bbPress // is running if (is_plugin_active('bbpress/bbpress.php')) { // The bbPress admin page will always be on the root blog. switch_to_blog() will // pass through if we're already there. switch_to_blog(bp_get_root_blog_id()); $button_url = admin_url(add_query_arg(array('page' => 'bbpress'), 'options-general.php')); restore_current_blog(); $button_text = __('Configure Site Wide Forums', 'buddypress'); } else { $button_url = bp_get_admin_url(add_query_arg(array('tab' => 'plugin-information', 'plugin' => 'bbpress', 'TB_iframe' => 'true', 'width' => '640', 'height' => '500'), 'plugin-install.php')); $button_text = __('Install Site Wide Forums', 'buddypress'); } $action = bp_get_admin_url('admin.php?page=bb-forums-setup&reinstall=1'); ?> <div class="wrap"> <?php screen_icon('buddypress'); ?> <h2 class="nav-tab-wrapper"><?php bp_core_admin_tabs(__('Forums', 'buddypress')); ?> </h2> <?php if (isset($_POST['submit'])) { ?> <div id="message" class="updated fade"> <p><?php _e('Settings Saved.', 'buddypress'); ?> </p> </div> <?php } ?> <?php if (isset($_REQUEST['reinstall']) || !bp_forums_is_installed_correctly()) { // Delete the bb-config.php location option bp_delete_option('bb-config-location'); bp_forums_bbpress_install_wizard(); } else { ?> <div style="width: 45%; float: left; margin-top: 20px;"> <h3><?php _e('(Installed)', 'buddypress'); ?> <?php _e('Forums for Groups', 'buddypress'); ?> </h3> <p><?php _e('Give each individual group its own discussion forum. Choose this if you\'d like to keep your members\' conversations separated into distinct areas.', 'buddypress'); ?> </p> <p class="description"><?php _e('You may use an existing bbPress installation if you have one.', 'buddypress'); ?> </p> <h4 style="margin-bottom: 10px;"><?php _e('Features', 'buddypress'); ?> </h4> <ul class="description" style="list-style: square; margin-left: 30px;"> <li><?php _e('Group Integration', 'buddypress'); ?> </p></li> <li><?php _e('Member Profile Integration', 'buddypress'); ?> </p></li> <li><?php _e('Activity Stream Integration', 'buddypress'); ?> </p></li> <li><?php _e('@ Mention Integration', 'buddypress'); ?> </p></li> </ul> <div> <a class="button button-primary" href="<?php echo $action; ?> "><?php _e('Uninstall Group Forums', 'buddypress'); ?> </a> </div> </div> <div style="width: 45%; float: left; margin: 20px 0 20px 20px; padding: 0 20px 20px 20px; border: 1px solid #ddd; background-color: #fff;"> <h3><?php _e('New! Site Wide Forums', 'buddypress'); ?> </h3> <p><?php _e('Your site will have central forums that are not isolated to any specific group. Choose this if you\'d like to have a central forum area for your members.', 'buddypress'); ?> </p> <p class="description"><?php _e('You may activate both Group and Site Wide forums, but this may create a poor experience for your members.', 'buddypress'); ?> </p> <h4 style="margin-bottom: 10px;"><?php _e('Features', 'buddypress'); ?> </h4> <ul class="description" style="list-style: square; margin-left: 30px;"> <li><?php _e('Central Discussion Area', 'buddypress'); ?> </p></li> <li><?php _e('Forum Plugins Available', 'buddypress'); ?> </p></li> <li><?php _e('Activity Stream Integration', 'buddypress'); ?> </p></li> <li><?php _e('@ Mention Integration', 'buddypress'); ?> </p></li> </ul> <div> <a class="button thickbox button-primary" href="<?php echo esc_attr($button_url); ?> "><?php echo esc_html($button_text); ?> </a> </div> </div> <?php } ?> <p class="clear description"><?php printf(__('Need help deciding between Group Forums and Site Wide Forums? Visit <a href="%s">the BuddyPress codex</a> for more information.', 'buddypress'), 'http://codex.buddypress.org/getting-started/installing-group-and-sitewide-forums/'); ?> </p> </div> <?php }
function bp_forums_bbpress_admin() { global $bp; $action = bp_get_admin_url('admin.php?page=bb-forums-setup&reinstall=1'); ?> <div class="wrap"> <?php screen_icon('buddypress'); ?> <h2 class="nav-tab-wrapper"><?php bp_core_admin_tabs(__('Forums', 'buddypress')); ?> </h2> <?php if (isset($_POST['submit'])) { ?> <div id="message" class="updated fade"> <p><?php _e('Settings Saved.', 'buddypress'); ?> </p> </div> <?php } ?> <?php if (isset($_REQUEST['reinstall']) || !bp_forums_is_installed_correctly()) { // Delete the bb-config.php location option bp_delete_option('bb-config-location'); bp_forums_bbpress_install_wizard(); } else { ?> <div style="width: 45%; float: left; margin-top: 20px;"> <h3><?php _e('(Installed)', 'buddypress'); ?> <?php _e('Forums for Groups', 'buddypress'); ?> </h3> <p><?php _e('Give each individual group its own discussion forum. Choose this if you\'d like to keep your members\' conversations separated into distinct areas.', 'buddypress'); ?> </p> <p class="description"><?php _e('You may use an existing bbPress installation if you have one.', 'buddypress'); ?> </p> <h4 style="margin-bottom: 10px;"><?php _e('Features', 'buddypress'); ?> </h4> <ul class="description" style="list-style: square; margin-left: 30px;"> <li><?php _e('Group Integration', 'buddypress'); ?> </p></li> <li><?php _e('Member Profile Integration', 'buddypress'); ?> </p></li> <li><?php _e('Activity Stream Integration', 'buddypress'); ?> </p></li> <li><?php _e('@ Mention Integration', 'buddypress'); ?> </p></li> </ul> <div> <a class="button button-primary" href="<?php echo $action; ?> "><?php _e('Uninstall Group Forums', 'buddypress'); ?> </a> </div> </div> <div style="width: 45%; float: left; margin: 20px 0 20px 20px; padding: 0 20px 20px 20px; border: 1px solid #ddd; background-color: #fff;"> <h3><?php _e('New! Site Wide Forums', 'buddypress'); ?> </h3> <p><?php _e('Your site will have central forums that are not isolated to any specific group. Choose this if you\'d like to have a central forum area for your members.', 'buddypress'); ?> </p> <p class="description"><?php _e('You may activate both Group and Site Wide forums, but this may create a poor experience for your members.', 'buddypress'); ?> </p> <h4 style="margin-bottom: 10px;"><?php _e('Features', 'buddypress'); ?> </h4> <ul class="description" style="list-style: square; margin-left: 30px;"> <li><?php _e('Central Discussion Area', 'buddypress'); ?> </p></li> <li><?php _e('Forum Plugins Available', 'buddypress'); ?> </p></li> <li><?php _e('Activity Stream Integration', 'buddypress'); ?> </p></li> <li><?php _e('@ Mention Integration', 'buddypress'); ?> </p></li> </ul> <div> <a class="button thickbox button-primary" href="<?php bp_admin_url(add_query_arg(array('tab' => 'plugin-information', 'plugin' => 'bbpress', 'TB_iframe' => 'true', 'width' => '640', 'height' => '500'), 'plugin-install.php')); ?> "><?php _e('Install Site Wide Forums', 'buddypress'); ?> </a> </div> </div> <?php } ?> </div> <?php }