Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'disable registration'

Viewing 8 results - 426 through 433 (of 433 total)
  • Author
    Search Results
  • #39867

    I would do this by going into /member-themes/buddypress-member/blogs/create.php and doing…

    <?php if ( bp_blog_signup_enabled() ) : ?>
    <?php
    global $bp;
    $blogs = bp_blogs_get_blogs_for_user($bp->loggedin_user->id);
    if ($blogs['count'] != 9)
    {
    bp_show_blog_signup_form();
    }
    else
    {
    ?>
    <div id="message" class="info">
    <?php _e( 'Limit nine blogs per member. If you would like another, please contact an Admin for assistance.', 'buddypress' ); ?>

    </div>
    <?php
    }
    ?>

    <?php else: ?>

    <div id="message" class="info">
    <?php _e( 'Blog registration is currently disabled', 'buddypress' ); ?>

    </div>

    <?php endif; ?>

    Just remember not to overwrite the member theme if you do a BuddyPress update. ;)

    #39313
    dpsweb
    Member

    SORRY!!! I did this and the error went away:

    WPMU Admin Options > Allow New Registrations : Disabled.

    WPMU Admin LDAP Options > Disable Public Signup : NO

    What happens now is when a user clicks on the signup button it takes them to the WPMU login page. They login and it uses LDAP. There is no local user account signups as everything appears to be going through the LDAP plugin to authenticate.

    #38478

    In reply to: Only one blog for user

    Burt Adsit
    Participant

    OK people this seems to work. This requires modifying the member theme since I didn’t find any actions in bp to hook this into so here goes:

    In the member theme the file:

    /buddypress-member/blogs/create.php

    There is this chunk of code:

    <?php if ( bp_blog_signup_enabled() ) : ?>

    ..(some other stuff here)..

    <?php else: ?>

    <div id=”message” class=”info”>

    <p><?php _e( ‘Blog registration is currently disabled’, ‘buddypress’ ); ?></p>

    </div>

    <?php endif; ?>

    Replace the ..(some other stuff here).. with this:

    <?php

    global $bp;

    $blogs = bp_blogs_get_blogs_for_user($bp->loggedin_user->id);

    if (!$blogs)

    {

    bp_show_blog_signup_form();

    }

    else

    {

    ?>

    <div id=”message” class=”info”>

    <p><?php _e( ‘Limit one Blog per member’, ‘buddypress’ ); ?></p>

    </div>

    <?php

    }

    ?>

    This is the entire little create.php file in pastie: http://pastie.org/396083

    This was a: “quick ya we should have that and I’ve got to get to the store and get some boxes because I’m moving from Michigan where we have a snow storm today and Virginia where I’m moving to comes to a screeching halt when they get 1″ of snow and I gotta run now” solution.

    When I get back from the store I’ll help clean up the damage this might cause. This does work for me in a quick test.

    gogoplata
    Participant

    It works for the main blog too, thought the search function isn’t all that useful given there would only be a single blog but all the other functions work with the main blog.

    All you’d need to do to get this setup is to change the default role for the main blog from subscriber to contributor and disable blog registration. Also, you may want to hack at the code to remove things such as the blog directory, the list of user blogs, etc. but this is optional.

    #35059
    Burt Adsit
    Participant

    There is only an option to turn off the adminbar for logged out users. Yes/No for them. Otherwise it’s Yes for everywhere in mu. The adminbar gets generated at every page load in mu. You could disable it completely by default someplace in code and then in the pages that you want it to appear on, enable it before the wp_head() call that your theme makes in header.php

    bp registers its need for attention by the calls:

    add_action( ‘wp_footer’, ‘bp_core_admin_bar’ );

    add_action( ‘wp_head’, ‘bp_core_add_css’ );

    You could un-register these calls someplace like functions.php in your theme to turn off the adminbar globally:

    remove_action( ‘wp_footer’, ‘bp_core_admin_bar’ );

    remove_action( ‘wp_head’, ‘bp_core_add_css’ );

    Then in your theme, on the specific pages you want to show the adminbar register the adminbar again before the call to wp_head():

    add_action( ‘wp_footer’, ‘bp_core_admin_bar’ );

    add_action( ‘wp_head’, ‘bp_core_add_css’ );

    In your theme you’ll have to add some logic in header.php to detect what page is being displayed and make the event registration calls.

    So, in functions.php un-register the calls and in header.php before wp_head() re-register them. They’ll get turned off again when functions.php loads the next time and the sequence starts again.

    #33823

    In reply to: No Blog Registration

    gogoplata
    Participant

    I should note, though, that the “Creat a Blog” function doesn’t work, it’s just a link to a page that says registrations are disabled.

    #33822

    In reply to: No Blog Registration

    gogoplata
    Participant

    Right, that’s the only downside. I only disabled it temporarily, which is why I still installed the blog component but if you never intend on allowing blogs not having it installed is probably for the best.

    #33805

    In reply to: No Blog Registration

    gogoplata
    Participant

    I still installed bp-blogs, but disabled registrations and it worked perfectly.

Viewing 8 results - 426 through 433 (of 433 total)
Skip to toolbar