Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)

  • Simon Wheatley
    Participant

    @simonwheatley

    Hi Madloki,

    The “don’t cache pages for logged in users” is a fairly sensible one to have ticked, obviously. :) It’s just to give maximum flexibility I think, as the plugin is used across many different kinds of sites.

    If you look in the WP Super Cache settings, in the “Accepted Filenames & Rejected URIs” section, you can probably specify part of a URL (perhaps “forum”) which should mean a page isn’t cached. You can check whether a page has been cached by looking at the bottom of the HTML source code, where it should say in an HTML comment.

    Good luck!

    S


    Simon Wheatley
    Participant

    @simonwheatley

    The plugin is proof of concept code, you need to decide under what circumstances you want to allow group creation. At the moment, as you say, everyone is restricted… perhaps you want to base it on user capabilities? Have a look at the WordPress function current_user_can (support forum tag) and use this in rgc_validate_group_creation something like this (untested):

    // Stop the creation of a group unless the current user can manage options

    function rgc_validate_creation( $allowed, $group_details ) {

    // User is OK to continue if they can manage options

    if ( current_user_can( 'manage_options' ) )

    return true;

    // Otherwise they can't

    bp_core_add_message( 'Sorry, you are not allowed to create groups.', 'error' );

    return false;

    }


    Simon Wheatley
    Participant

    @simonwheatley

    OK, but bear in mind you will be editing the core files, which is Not A Good Thing ™.

    Apply this diff to plugins/buddypress/bp-groups.php: https://trac.buddypress.org/attachment/ticket/1150/hook-to-stop-group-creation.diff

    Then use this plugin code as the basis for your own restrictions based on whatever you want: https://trac.buddypress.org/attachment/ticket/1150/restrict-group-creation.php


    Simon Wheatley
    Participant

    @simonwheatley

    Doh! Good point. I did say untested. ;)

    You could try adding the line to your functions.php in the theme?


    Simon Wheatley
    Participant

    @simonwheatley

    If the front end is blank white but the admin section is visible, it might be because the theme directory has been moved from where WP is expecting to see it… try going to the appearance section and resetting the theme.


    Simon Wheatley
    Participant

    @simonwheatley

    I’ve proposed a patch to add a hook which would allow the restriction of group creation through a plugin, and provided a plugin which demonstrates it’s use in this trac ticket: https://trac.buddypress.org/ticket/1150

    How does it look?

    (Also, not sure whether trac keywords should be comma separated?)


    Simon Wheatley
    Participant

    @simonwheatley

    WPSC has a “don’t cache for logged in users” setting, which you might want to use given the nature of a BP site.

    I’ve seen various people also recommending WP Object Caching, which can reduce the load on the DB server and might be worth looking into *if* your performance bottleneck is the DB… if it isn’t, then it could make matters worse. Use the page generation time and (to a lesser extent) the number of queries information that the default templates show in an HTML comment at the bottom of most templates to test your options both with and without whatever caching you put in.

    Useful links: Overview of WP Object Cache from 2006 for an intro, various flavours of Object Cache (APC, eAccelerator, filesystem) (if you dig around you’ll also find one which works with memcached).


    Simon Wheatley
    Participant

    @simonwheatley

    You could (probably, I haven’t tested this) use the following in wp-config.php to remove the admin bar from the WP Admin area only:

    if ( is_admin() ) define( 'BP_DISABLE_ADMIN_BAR', true );


    Simon Wheatley
    Participant

    @simonwheatley

    You can add the following to your wp-config.php file:

    define( 'BP_DISABLE_ADMIN_BAR', true );


    Simon Wheatley
    Participant

    @simonwheatley

    Argh! I thought I’d exhaustively checked all the functions in BuddyPress before embarking on mine. Oh well.

    Thanks Andy!

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