Changeset 2076 for branches/1.1/bp-forums/bp-forums-bbpress.php
- Timestamp:
- 11/02/2009 06:56:42 PM (17 years ago)
- File:
-
- 1 edited
-
branches/1.1/bp-forums/bp-forums-bbpress.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.1/bp-forums/bp-forums-bbpress.php
r1905 r2076 5 5 global $bb, $bbdb, $bb_table_prefix, $bb_current_user; 6 6 global $bb_roles, $wp_taxonomy_object; 7 7 8 8 /* Return if we've already run this function. */ 9 9 if ( is_object( $bbdb ) && is_object( $bb_roles ) ) 10 10 return; 11 11 12 12 if ( !bp_forums_is_installed_correctly() ) 13 13 return false; 14 14 15 15 define( 'BB_PATH', BP_PLUGIN_DIR . '/bp-forums/bbpress/' ); 16 16 define( 'BACKPRESS_PATH', BP_PLUGIN_DIR . '/bp-forums/bbpress/bb-includes/backpress/' ); … … 20 20 require_once( BB_PATH . BB_INC . 'class.bb-query.php' ); 21 21 require_once( BB_PATH . BB_INC . 'class.bb-walker.php' ); 22 22 23 23 require_once( BB_PATH . BB_INC . 'functions.bb-core.php' ); 24 24 require_once( BB_PATH . BB_INC . 'functions.bb-forums.php' ); … … 31 31 require_once( BB_PATH . BB_INC . 'functions.bb-formatting.php' ); 32 32 require_once( BB_PATH . BB_INC . 'functions.bb-template.php' ); 33 33 34 34 require_once( BACKPRESS_PATH . 'class.wp-taxonomy.php' ); 35 35 require_once( BB_PATH . BB_INC . 'class.bb-taxonomy.php' ); 36 36 37 37 $bb = new stdClass(); 38 38 require_once( $bp->forums->bbconfig ); … … 40 40 // Setup the global database connection 41 41 $bbdb = new BPDB ( BBDB_USER, BBDB_PASSWORD, BBDB_NAME, BBDB_HOST ); 42 42 43 43 /* Set the table names */ 44 44 $bbdb->forums = $bb_table_prefix . 'forums'; … … 49 49 $bbdb->term_taxonomy = $bb_table_prefix . 'term_taxonomy'; 50 50 $bbdb->topics = $bb_table_prefix . 'topics'; 51 51 52 52 if ( isset( $bb->custom_user_table ) ) 53 53 $bbdb->users = $bb->custom_user_table; 54 54 else 55 55 $bbdb->users = $wpdb->users; 56 56 57 57 if ( isset( $bb->custom_user_meta_table ) ) 58 58 $bbdb->usermeta = $bb->custom_user_meta_table; 59 59 else 60 60 $bbdb->usermeta = $wpdb->usermeta; 61 61 62 62 $bbdb->prefix = $bb_table_prefix; 63 63 … … 67 67 if ( !$tables_installed = (boolean) $bbdb->get_results( 'DESCRIBE `' . $bbdb->forums . '`;', ARRAY_A ) ) 68 68 require_once( ABSPATH . 'wp-admin/upgrade-functions.php' ); 69 69 70 70 require_once( BB_PATH . 'bb-admin/includes/functions.bb-admin.php' ); 71 71 72 72 if ( is_object( $wp_roles ) ) { 73 73 $bb_roles =& $wp_roles; … … 84 84 if ( !isset( $wp_taxonomy_object ) ) 85 85 $wp_taxonomy_object = new BB_Taxonomy( $bbdb ); 86 86 87 87 $wp_taxonomy_object->register_taxonomy( 'bb_topic_tag', 'bb_topic' ); 88 88 … … 96 96 97 97 dbDelta( $bb_queries ); 98 98 99 99 require_once( BB_PATH . 'bb-admin/includes/functions.bb-upgrade.php' ); 100 100 bb_update_db_version(); 101 101 102 102 /* Set the site admins as the keymasters */ 103 103 $site_admins = get_site_option( 'site_admins', array('admin') ); … … 107 107 // Create the first forum. 108 108 bb_new_forum( array( 'forum_name' => 'Default Forum' ) ); 109 109 110 110 // Set the site URI 111 111 bb_update_option( 'uri', BB_URL ); … … 129 129 $args = wp_parse_args( $args, $defaults ); 130 130 extract( $args, EXTR_SKIP ); 131 131 132 132 return update_usermeta( $id, $meta_key, $meta_value ); 133 133 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)