Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • Maddish
    Participant

    @maddish

    Did this solution really work for you?
    I’m surprised because in my case it did not.
    As in this thread other users say, on one hand the browser remember the last selected tab, and on the other, the loop displayed in the stream is still the activity-all.

    I found another solution based on cookies.

    There is a cookie named ‘bp-activity-scope’ that is used to query the activity stream posts and that must be set to ‘groups’ in order to display only the posts that belongs to groups.

    This is the script that worked for me, in which ‘My Groups’ is the default tab:

    var jq = jQuery;
    jq(document).ready( function() {
    
    	filter = jq('#activity-filter-select select').val();
    		jq.removeCookie('bp-activity-scope', {
    		path: '/'
    		});
    //change 'groups' with the cookie for the tab you want to be the default one
    // favorites , friends, etc
    	jq.cookie( 'bp-activity-scope', 'groups');
    	scope = jq.cookie('bp-activity-scope');
    	bp_activity_request(scope, filter);
    
    } );

    I wrote a post in which I explain step by step how to implement it, and also how to avoid that the activity-all tab is switched to selected when the user focus on the wwhat’s new textarea:

    http://inauditas.com/change-default-activity-stream-tab-buddypress/


    Maddish
    Participant

    @maddish

    Hi,
    You probably already solved the issue, as it’s an old question.
    Anyway, if somebody needs that, I made a plugin which allows to invite people by email, so only users with a valid invited e-mail can register.

    You can find it here:
    https://github.com/Maddish/Users-invitation

    The plugin is customized for a client, so the confirmation e-mail has been removed.

    Anyway, you can re-enable it by deleting from line 653 to the end of file, so the confirmation email will be sent.

    On line 684 there is funnction that is redirecting user to a custom welcome page.
    You can delete this function to avoid redirection or change the page id to your custom one.

    I hope to find out some time to make this options to be selected from the admin panel.
    In the meanwhile this plugin maybe can do the trick anyway.

    ` //redirect user tu custom page after register
    function bp_redirect($user) {
    $redirect_url= get_permalink(20); //change with your welcome page id
    bp_core_redirect($redirect_url);
    }
    add_action(‘bp_core_signup_user’, ‘bp_redirect’, 100, 1);
    `

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