Changeset 7213 for trunk/bp-forums/deprecated/1.6.php
- Timestamp:
- 06/13/2013 01:33:36 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-forums/deprecated/1.6.php
r6581 r7213 15 15 if ( !defined( 'ABSPATH' ) ) exit; 16 16 17 /** 18 * Outputs the markup for the bb-forums-admin panel 19 */ 17 20 function bp_forums_bbpress_admin() { 21 22 // The text and URL of the Site Wide Forums button differs depending on whether bbPress 23 // is running 24 if ( is_plugin_active( 'bbpress/bbpress.php' ) ) { 25 // The bbPress admin page will always be on the root blog. switch_to_blog() will 26 // pass through if we're already there. 27 switch_to_blog( bp_get_root_blog_id() ); 28 $button_url = admin_url( add_query_arg( array( 'page' => 'bbpress' ), 'options-general.php' ) ); 29 restore_current_blog(); 30 31 $button_text = __( 'Configure bbPress', 'buddypress' ); 32 } else { 33 $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' ) ); 34 $button_text = __( 'Install bbPress', 'buddypress' ); 35 } 18 36 19 37 $action = bp_get_admin_url( 'admin.php?page=bb-forums-setup&reinstall=1' ); ?> … … 38 56 // Delete the bb-config.php location option 39 57 bp_delete_option( 'bb-config-location' ); 58 59 // Now delete the bb-config.php file 60 @unlink( ABSPATH . 'bb-config.php' ); 61 62 // show the updated wizard 40 63 bp_forums_bbpress_install_wizard(); 41 64 42 65 else : ?> 43 66 44 <div >45 <h3><?php _e( ' Forums for Groups', 'buddypress' ) ?></h3>67 <div style="width: 45%; float: left; margin-top: 20px;"> 68 <h3><?php _e( '(Installed)', 'buddypress' ); ?> <?php _e( 'Forums for Groups', 'buddypress' ) ?></h3> 46 69 47 70 <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> 48 <p class="description"><?php _e( 'You may use an existing bbPress installation if you have one.', 'buddypress' ); ?></p> 71 72 <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> 49 73 50 74 <h4 style="margin-bottom: 10px;"><?php _e( 'Features', 'buddypress' ); ?></h4> … … 57 81 58 82 <div> 59 <a class="button button-primary" href="<?php echo $action ?>"><?php _e( 'Reinstall Group Forums', 'buddypress' ) ?></a> 83 <a class="button button-primary confirm" href="<?php echo $action ?>"><?php _e( 'Uninstall Group Forums', 'buddypress' ) ?></a> 84 </div> 85 </div> 86 87 <div style="width: 45%; float: left; margin: 20px 0 20px 20px; padding: 0 20px 20px 20px; border: 1px solid #ddd; background-color: #fff;"> 88 <h3><?php _e( 'New! bbPress', 'buddypress' ) ?></h3> 89 <p><?php _e( 'bbPress is a brand-new forum plugin from one of the lead developers of BuddyPress.', 'buddypress' ) ?></p> 90 91 <p><?php _e( 'It boasts a bunch of cool features that the BP Legacy Discussion Forums does not have including:', 'buddypress' ) ?></p> 92 93 <ul class="description" style="list-style: square; margin-left: 30px;"> 94 <li><?php _e( 'Non-group specific forum creation', 'buddypress' ); ?></p></li> 95 <li><?php _e( 'Moderation via the WP admin dashboard', 'buddypress' ); ?></p></li> 96 <li><?php _e( 'Topic splitting', 'buddypress' ); ?></p></li> 97 <li><?php _e( 'Revisions', 'buddypress' ); ?></p></li> 98 <li><?php _e( 'Spam management', 'buddypress' ); ?></p></li> 99 <li><?php _e( 'Subscriptions', 'buddypress' ); ?></p></li> 100 <li><?php _e( 'And more!', 'buddypress' ); ?></p></li> 101 </ul> 102 103 <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> 104 105 <div> 106 <a class="button thickbox button-primary" href="<?php echo esc_attr( $button_url ) ?>"><?php echo esc_html( $button_text ) ?></a> 60 107 </div> 61 108 </div> … … 68 115 69 116 function bp_forums_bbpress_install_wizard() { 70 $post_url = bp_get_admin_url( 'admin.php?page=bb-forums-setup' ); 117 $post_url = bp_get_admin_url( 'admin.php?page=bb-forums-setup' ); 118 $bbpress_plugin_is_active = false; 71 119 72 120 $step = isset( $_REQUEST['step'] ) ? $_REQUEST['step'] : ''; 121 122 // The text and URL of the Site Wide Forums button differs depending on whether bbPress 123 // is running 124 if ( is_plugin_active( 'bbpress/bbpress.php' ) ) { 125 $bbpress_plugin_is_active = true; 126 127 // The bbPress admin page will always be on the root blog. switch_to_blog() will 128 // pass through if we're already there. 129 switch_to_blog( bp_get_root_blog_id() ); 130 $button_url = admin_url( add_query_arg( array( 'page' => 'bbpress' ), 'options-general.php' ) ); 131 restore_current_blog(); 132 133 $button_text = __( 'Configure bbPress', 'buddypress' ); 134 } else { 135 $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' ) ); 136 $button_text = __( 'Install bbPress', 'buddypress' ); 137 } 73 138 74 139 switch( $step ) { … … 99 164 100 165 case 'new': 101 if ( isset( $_REQUEST['doinstall'] ) && 1 == (int) 166 if ( isset( $_REQUEST['doinstall'] ) && 1 == (int)$_REQUEST['doinstall'] ) { 102 167 $result = bp_forums_bbpress_install(); 103 168 … … 142 207 ?> 143 208 144 <div >209 <div style="width: 45%; float: left; margin-top: 20px;"> 145 210 <h3><?php _e( 'Forums for Groups', 'buddypress' ) ?></h3> 146 211 147 212 <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> 148 <p class="description"><?php _e( 'You may use an existing bbPress installation if you have one.', 'buddypress' ); ?></p> 213 214 <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> 149 215 150 216 <h4 style="margin-bottom: 10px;"><?php _e( 'Features', 'buddypress' ); ?></h4> … … 162 228 </div> 163 229 230 <div style="width: 45%; float: left; margin: 20px 0 20px 20px; padding: 0 20px 20px 20px; border: 1px solid #ddd; background-color: #fff;"> 231 <h3><?php _e( 'New! bbPress', 'buddypress' ) ?></h3> 232 <p><?php _e( 'bbPress is a brand-new forum plugin from one of the lead developers of BuddyPress.', 'buddypress' ) ?></p> 233 234 <p><?php _e( 'It boasts a bunch of cool features that the BP Legacy Discussion Forums does not have including:', 'buddypress' ) ?></p> 235 236 <ul class="description" style="list-style: square; margin-left: 30px;"> 237 <li><?php _e( 'Non-group specific forum creation', 'buddypress' ); ?></p></li> 238 <li><?php _e( 'Moderation via the WP admin dashboard', 'buddypress' ); ?></p></li> 239 <li><?php _e( 'Topic splitting', 'buddypress' ); ?></p></li> 240 <li><?php _e( 'Revisions', 'buddypress' ); ?></p></li> 241 <li><?php _e( 'Spam management', 'buddypress' ); ?></p></li> 242 <li><?php _e( 'Subscriptions', 'buddypress' ); ?></p></li> 243 <li><?php _e( 'And more!', 'buddypress' ); ?></p></li> 244 </ul> 245 246 <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> 247 <div> 248 <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> 249 </div> 250 </div> 251 164 252 <?php } 165 253 break;
Note: See TracChangeset
for help on using the changeset viewer.