Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • @ezbizniz

    Participant

    I disabled the default BP function to add all blogs to BP DB table with `add_site_option(‘bp-blogs-first-install’, 1);`

    Instead I do my own BP blogs installation for each blog during upgrade:

    `function bp_blogs_install_after_multisite_upgrade($blog_id) {
    echo(‘Blog ID ‘ . $blog_id . ‘:
    ‘);
    if(!get_blog_option($blog_id, ‘bp-blog-recorded’)) {
    $users = get_users_of_blog( $blog_id );

    if ( $users ) {
    foreach ( (array)$users as $user ) {
    $role = unserialize( $user->meta_value );

    if ( !isset( $role ) )
    bp_blogs_record_blog( $blog_id, $user->user_id, true );
    }

    add_blog_option($blog_id, ‘bp-blog-recorded’, ‘true’);
    echo(‘Blog ID ‘ . $blog_id . ‘ added to BuddyPress database.
    ‘);
    }
    } else {
    echo(‘Blog ID ‘ . $blog_id . ‘ already in BuddyPress.
    ‘);
    }
    }

    add_site_option(‘bp-blogs-first-install’, 1);
    add_action(‘wpmu_upgrade_site’, ‘bp_blogs_install_after_multisite_upgrade’);
    `

    @ezbizniz

    Participant

    Thanks for your suggestions hnla, I’ll try them.

    @ezbizniz

    Participant

    Any idea what I should set the memory_limit to?

    @ezbizniz

    Participant

    These are my resource limits in php.ini:
    max_execution_time = 30
    max_input_time = 120
    memory_limit = 256M

Viewing 4 replies - 1 through 4 (of 4 total)
Skip to toolbar