<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[BuddyPress][7213] trunk: Reintroduces legacy forum config tab for installations still using legacy forums</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://buddypress.trac.wordpress.org/changeset/7213">7213</a></dd>
<dt>Author</dt> <dd>boonebgorges</dd>
<dt>Date</dt> <dd>2013-06-13 01:33:36 +0000 (Thu, 13 Jun 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Reintroduces legacy forum config tab for installations still using legacy forums

Without access to this page, it becomes impossible to regenerate the
bb-config.php file. We also lose the chance to preach the gospel of the new
bbPress plugin to users of bbPress 1.x when we don't have an admin panel for
the legacy component.

Fixes <a href="http://buddypress.trac.wordpress.org/ticket/4999">#4999</a>

Props r-a-y</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpcoreadminbpcorefunctionsphp">trunk/bp-core/admin/bp-core-functions.php</a></li>
<li><a href="#trunkbpforumsbpforumsloaderphp">trunk/bp-forums/bp-forums-loader.php</a></li>
<li><a href="#trunkbpforumsdeprecated16php">trunk/bp-forums/deprecated/1.6.php</a></li>
<li><a href="#trunkbpforumsdeprecated17php">trunk/bp-forums/deprecated/1.7.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpcoreadminbpcorefunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/admin/bp-core-functions.php (7212 => 7213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/admin/bp-core-functions.php        2013-06-13 01:27:01 UTC (rev 7212)
+++ trunk/bp-core/admin/bp-core-functions.php   2013-06-13 01:33:36 UTC (rev 7213)
</span><span class="lines">@@ -365,6 +365,18 @@
</span><span class="cx">          )
</span><span class="cx">  );
</span><span class="cx"> 
</span><ins>+       // If forums component is active, add additional tab
+       if ( bp_is_active( 'forums' ) && class_exists( 'BP_Forums_Component' ) ) {
+               // enqueue thickbox
+               wp_enqueue_script( 'thickbox' );
+               wp_enqueue_style( 'thickbox' );
+
+               $tabs['3'] = array(
+                       'href' => bp_get_admin_url( add_query_arg( array( 'page' => 'bb-forums-setup'  ), 'admin.php' ) ),
+                       'name' => __( 'Forums', 'buddypress' )
+               );
+       }
+
</ins><span class="cx">   // Loop through tabs and build navigation
</span><span class="cx">  foreach ( array_values( $tabs ) as $tab_data ) {
</span><span class="cx">          $is_current = (bool) ( $tab_data['name'] == $active_tab );
</span></span></pre></div>
<a id="trunkbpforumsbpforumsloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums/bp-forums-loader.php (7212 => 7213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/bp-forums-loader.php     2013-06-13 01:27:01 UTC (rev 7212)
+++ trunk/bp-forums/bp-forums-loader.php        2013-06-13 01:33:36 UTC (rev 7213)
</span><span class="lines">@@ -82,6 +82,12 @@
</span><span class="cx">          if ( !defined( 'BB_PATH' ) )
</span><span class="cx">                  $includes[] = 'bbpress-sa';
</span><span class="cx"> 
</span><ins>+               // Admin-specific code
+               if ( is_admin() ) {
+                       $includes[] = 'deprecated/1.6';
+                       $includes[] = 'deprecated/1.7';
+               }
+
</ins><span class="cx">           parent::includes( $includes );
</span><span class="cx">  }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpforumsdeprecated16php"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums/deprecated/1.6.php (7212 => 7213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/deprecated/1.6.php       2013-06-13 01:27:01 UTC (rev 7212)
+++ trunk/bp-forums/deprecated/1.6.php  2013-06-13 01:33:36 UTC (rev 7213)
</span><span class="lines">@@ -14,8 +14,26 @@
</span><span class="cx"> // Exit if accessed directly
</span><span class="cx"> if ( !defined( 'ABSPATH' ) ) exit;
</span><span class="cx"> 
</span><ins>+/**
+ * Outputs the markup for the bb-forums-admin panel
+ */
</ins><span class="cx"> function bp_forums_bbpress_admin() {
</span><span class="cx"> 
</span><ins>+       // 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' );
+       }
+
</ins><span class="cx">   $action = bp_get_admin_url( 'admin.php?page=bb-forums-setup&reinstall=1' ); ?>
</span><span class="cx"> 
</span><span class="cx">  <div class="wrap">
</span><span class="lines">@@ -37,16 +55,22 @@
</span><span class="cx"> 
</span><span class="cx">                  // Delete the bb-config.php location option
</span><span class="cx">                  bp_delete_option( 'bb-config-location' );
</span><ins>+
+                       // Now delete the bb-config.php file
+                       @unlink( ABSPATH . 'bb-config.php' );
+
+                       // show the updated wizard
</ins><span class="cx">                   bp_forums_bbpress_install_wizard();
</span><span class="cx"> 
</span><span class="cx">          else : ?>
</span><span class="cx"> 
</span><del>-                       <div>
-                               <h3><?php _e( 'Forums for Groups', 'buddypress' ) ?></h3>
</del><ins>+                        <div style="width: 45%; float: left; margin-top: 20px;">
+                               <h3><?php _e( '(Installed)', 'buddypress' ); ?> <?php _e( 'Forums for Groups', 'buddypress' ) ?></h3>
</ins><span class="cx"> 
</span><span class="cx">                          <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>
</span><del>-                               <p class="description"><?php _e( 'You may use an existing bbPress installation if you have one.', 'buddypress' ); ?></p>
</del><span class="cx"> 
</span><ins>+                               <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>
+
</ins><span class="cx">                           <h4 style="margin-bottom: 10px;"><?php _e( 'Features', 'buddypress' ); ?></h4>
</span><span class="cx">                          <ul class="description" style="list-style: square; margin-left: 30px;">
</span><span class="cx">                                  <li><?php _e( 'Group Integration',           'buddypress' ); ?></p></li>
</span><span class="lines">@@ -56,10 +80,33 @@
</span><span class="cx">                          </ul>
</span><span class="cx"> 
</span><span class="cx">                          <div>
</span><del>-                                       <a class="button button-primary" href="<?php echo $action ?>"><?php _e( 'Reinstall Group Forums', 'buddypress' ) ?></a> &nbsp;
</del><ins>+                                        <a class="button button-primary confirm" href="<?php echo $action ?>"><?php _e( 'Uninstall Group Forums', 'buddypress' ) ?></a> &nbsp;
</ins><span class="cx">                           </div>
</span><span class="cx">                  </div>
</span><span class="cx"> 
</span><ins>+                       <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> &nbsp;
+                               </div>
+                       </div>
+
</ins><span class="cx">           <?php endif; ?>
</span><span class="cx"> 
</span><span class="cx">  </div>
</span><span class="lines">@@ -67,10 +114,28 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function bp_forums_bbpress_install_wizard() {
</span><del>-       $post_url = bp_get_admin_url( 'admin.php?page=bb-forums-setup' );
</del><ins>+        $post_url                 = bp_get_admin_url( 'admin.php?page=bb-forums-setup' );
+       $bbpress_plugin_is_active = false;
</ins><span class="cx"> 
</span><span class="cx">  $step = isset( $_REQUEST['step'] ) ? $_REQUEST['step'] : '';
</span><span class="cx"> 
</span><ins>+       // The text and URL of the Site Wide Forums button differs depending on whether bbPress
+       // is running
+       if ( is_plugin_active( 'bbpress/bbpress.php' ) ) {
+               $bbpress_plugin_is_active = true;
+
+               // 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' );
+       }
+
</ins><span class="cx">   switch( $step ) {
</span><span class="cx">          case 'existing':
</span><span class="cx">                  if ( isset( $_REQUEST['doinstall'] ) && ( 1 == (int) $_REQUEST['doinstall'] ) ) {
</span><span class="lines">@@ -98,7 +163,7 @@
</span><span class="cx">          break;
</span><span class="cx"> 
</span><span class="cx">          case 'new':
</span><del>-                       if ( isset( $_REQUEST['doinstall'] ) && 1 == (int) $_REQUEST['doinstall'] ) {
</del><ins>+                        if ( isset( $_REQUEST['doinstall'] ) && 1 == (int)$_REQUEST['doinstall'] ) {
</ins><span class="cx">                           $result = bp_forums_bbpress_install();
</span><span class="cx"> 
</span><span class="cx">                          switch ( $result ) {
</span><span class="lines">@@ -141,12 +206,13 @@
</span><span class="cx">                          wp_admin_css( 'plugin-install' );
</span><span class="cx">                  ?>
</span><span class="cx"> 
</span><del>-                               <div>
</del><ins>+                                <div style="width: 45%; float: left;  margin-top: 20px;">
</ins><span class="cx">                                   <h3><?php _e( 'Forums for Groups', 'buddypress' ) ?></h3>
</span><span class="cx"> 
</span><span class="cx">                                  <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>
</span><del>-                                       <p class="description"><?php _e( 'You may use an existing bbPress installation if you have one.', 'buddypress' ); ?></p>
</del><span class="cx"> 
</span><ins>+                                       <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>
+
</ins><span class="cx">                                   <h4 style="margin-bottom: 10px;"><?php _e( 'Features', 'buddypress' ); ?></h4>
</span><span class="cx">                                  <ul class="description" style="list-style: square; margin-left: 30px;">
</span><span class="cx">                                          <li><?php _e( 'Group Integration',           'buddypress' ); ?></p></li>
</span><span class="lines">@@ -161,6 +227,28 @@
</span><span class="cx">                                  </div>
</span><span class="cx">                          </div>
</span><span class="cx"> 
</span><ins>+                               <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 button-primary <?php if ( ! $bbpress_plugin_is_active ) { echo esc_attr( 'thickbox' ); }?>" href="<?php echo esc_attr( $button_url ) ?>"><?php echo esc_html( $button_text ) ?></a> &nbsp;
+                                       </div>
+                               </div>
+
</ins><span class="cx">                   <?php }
</span><span class="cx">          break;
</span><span class="cx">  }
</span></span></pre></div>
<a id="trunkbpforumsdeprecated17php"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums/deprecated/1.7.php (7212 => 7213)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/deprecated/1.7.php       2013-06-13 01:27:01 UTC (rev 7212)
+++ trunk/bp-forums/deprecated/1.7.php  2013-06-13 01:33:36 UTC (rev 7213)
</span><span class="lines">@@ -29,235 +29,6 @@
</span><span class="cx"> }
</span><span class="cx"> add_action( bp_core_admin_hook(), 'bp_forums_add_admin_menu' );
</span><span class="cx"> 
</span><del>-/**
- * 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 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 endif; ?>
-
-               <?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 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 confirm" href="<?php echo $action ?>"><?php _e( 'Uninstall Group Forums', 'buddypress' ) ?></a> &nbsp;
-                               </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> &nbsp;
-                               </div>
-                       </div>
-
-               <?php endif; ?>
-
-               <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_install_wizard() {
-       $post_url                 = bp_get_admin_url( 'admin.php?page=bb-forums-setup' );
-       $bbpress_plugin_is_active = false;
-
-       $step = isset( $_REQUEST['step'] ) ? $_REQUEST['step'] : '';
-
-       // The text and URL of the Site Wide Forums button differs depending on whether bbPress
-       // is running
-       if ( is_plugin_active( 'bbpress/bbpress.php' ) ) {
-               $bbpress_plugin_is_active = true;
-
-               // 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' );
-       }
-
-       switch( $step ) {
-               case 'existing':
-                       if ( isset( $_REQUEST['doinstall'] ) && ( 1 == (int) $_REQUEST['doinstall'] ) ) {
-                               if ( !bp_forums_configure_existing_install() ) {
-                                       _e( 'The bb-config.php file was not found at that location, please try again.', 'buddypress' );
-                               } else {
-                                       ?>
-                                       <h3><?php _e( 'Forums were set up correctly using your existing bbPress install!', 'buddypress' ) ?></h3>
-                                       <p><?php _e( 'BuddyPress will now use its internal copy of bbPress to run the forums on your site. If you wish, you can remove your old bbPress installation files, as long as you keep the bb-config.php file in the same location.', 'buddypress' ) ?></p><?php
-                               }
-                       } else { ?>
-
-                                       <form action="" method="post">
-                                               <h3><?php _e( 'Existing bbPress Installation', 'buddypress' ) ?></h3>
-                                               <p><?php _e( "BuddyPress can make use of your existing bbPress install. Just provide the location of your <code>bb-config.php</code> file, and BuddyPress will do the rest.", 'buddypress' ) ?></p>
-                                               <p><label><code>bb-config.php</code> file location:</label><br /><input style="width: 50%" type="text" name="bbconfigloc" id="bbconfigloc" value="<?php echo str_replace( 'buddypress', '', $_SERVER['DOCUMENT_ROOT'] ) ?>" /></p>
-                                               <p><input type="submit" class="button-primary" value="<?php _e( 'Complete Installation', 'buddypress' ) ?>" /></p>
-                                               <input type="hidden" name="step" value="existing" />
-                                               <input type="hidden" name="doinstall" value="1" />
-                                               <?php wp_nonce_field( 'bp_forums_existing_install_init' ) ?>
-                                       </form>
-
-                               <?php
-                       }
-               break;
-
-               case 'new':
-                       if ( isset( $_REQUEST['doinstall'] ) && 1 == (int)$_REQUEST['doinstall'] ) {
-                               $result = bp_forums_bbpress_install();
-
-                               switch ( $result ) {
-                                       case 1:
-                                               _e( '<p>All done! Configuration settings have been saved to the file <code>bb-config.php</code> in the root of your WordPress install.</p>', 'buddypress' );
-                                               break;
-                                       default:
-                                               // Just write the contents to screen
-                                               _e( '<p>A configuration file could not be created. No problem, but you will need to save the text shown below into a file named <code>bb-config.php</code> in the root directory of your WordPress installation before you can start using the forum functionality.</p>', 'buddypress' ); ?>
-
-                                               <textarea style="display:block; margin-top: 30px; width: 80%;" rows="50"><?php echo htmlspecialchars( $result ); ?></textarea>
-
-                                       <?php
-                                               break;
-                               }
-                       } else { ?>
-
-                               <h3><?php _e( 'New bbPress Installation', 'buddypress' ) ?></h3>
-                               <p><?php _e( "You've decided to set up a new installation of bbPress for forum management in BuddyPress. This is very simple and is usually just a one click
-                               process. When you're ready, hit the link below.", 'buddypress' ) ?></p>
-                               <p><a class="button-primary" href="<?php echo wp_nonce_url( $post_url . '&step=new&doinstall=1', 'bp_forums_new_install_init' ) ?>"><?php _e( 'Complete Installation', 'buddypress' ) ?></a></p>
-
-                               <?php
-                       }
-               break;
-
-               default:
-                       if ( !file_exists( BP_PLUGIN_DIR . '/bp-forums/bbpress/' ) ) { ?>
-
-                               <div id="message" class="error">
-                                       <p><?php printf( __( 'bbPress files were not found. To install the forums component you must download a copy of bbPress and make sure it is in the folder: "%s"', 'buddypress' ), 'wp-content/plugins/buddypress/bp-forums/bbpress/' ) ?></p>
-                               </div>
-
-                       <?php } else {
-
-                               // Include the plugin install
-
-                               add_thickbox();
-                               wp_enqueue_script( 'plugin-install' );
-                               wp_admin_css( 'plugin-install' );
-                       ?>
-
-                               <div style="width: 45%; float: left;  margin-top: 20px;">
-                                       <h3><?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 $post_url . '&step=new' ?>"><?php _e( 'Install Group Forums', 'buddypress' ) ?></a> &nbsp;
-                                               <a class="button" href="<?php echo $post_url . '&step=existing' ?>"><?php _e( 'Use Existing Installation', '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 button-primary <?php if ( ! $bbpress_plugin_is_active ) { echo esc_attr( 'thickbox' ); }?>" href="<?php echo esc_attr( $button_url ) ?>"><?php echo esc_html( $button_text ) ?></a> &nbsp;
-                                       </div>
-                               </div>
-
-                       <?php }
-               break;
-       }
-}
-
</del><span class="cx"> function bp_forums_configure_existing_install() {
</span><span class="cx">  global $wpdb, $bbdb;
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>