Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 126 through 150 (of 574 total)
  • @henrywright-1

    Member

    the way that I have the site at the moment if the user wants to click out of the community to other parts of my site there is no way back in unless they log out first

    This isn’t standard behaviour. Does this happen when you’re using the default theme?

    To redirect logged in users away from community page, try adding this snippet to your theme’s functions.php file.

    function bp_redirect_community_page() {
    global $bp;
    	if ( is_page( 'community' ) && is_user_logged_in() ) {
    		wp_redirect( $bp->loggedin_user->domain );
    		exit();
    	}
    }
    add_action( 'template_redirect', 'bp_redirect_community_page' );

    With reference to the rest of the problems you’re facing, I’d suggest opening a new thread for each different problem.

    @henrywright-1

    Member

    @gyan-gaurav I navigated around for about 2 minutes and didn’t come across page not found at all.

    @henrywright-1

    Member

    Hi @yvonnetaylor

    So let me see if I understand what you’re trying to do.

    If a user is logged in and visits your community page http://www.thedogsclub.com/testing/community/ you would like them to be redirected to the member’s activity page http://www.thedogsclub.com/members/username/activity

    If a logged out user visits the community page then do nothing. Let them stay and click the login link (if they wish to).

    Is that right?

    @henrywright-1

    Member

    Ah, you want profile group not profile field. Sorry. But it shows you the general way PHP can be used

    @henrywright-1

    Member

    Well first you’d need to write some code

    
    // find the user's role
    $user = new WP_User( bp_displayed_user_id() );
    $role = $user->roles[0];
    
    // find the profile field value you want
    $location = bp_get_profile_field_data( 'field=Location' );
    
    // perform a conditional check making sure the user has a specific role and has completed the profile field before displaying the value
    
    if ( ( $role == 'Blah' ) && ( $location ) )
        echo $location;
    

    Notes:

    • replace Blah with the role you want
    • replace Location with the name of the profile field you want
    • I have assumed all of your users have just one role assigned

    @henrywright-1

    Member

    The way to do this would be to wrap info fields in conditional statements like this

    if member type is X then
        // display info field
    In reply to: Activation email

    @henrywright-1

    Member

    Welcome pack by Paul Gibbs will allow you to customise the text in all emails that get sent out via BuddyPress
    https://wordpress.org/plugins/welcome-pack/

    With reference to the emails not getting through to users, perhaps try reverting to the default theme, deactivate all plugins (aside from BP) and see if the problem is still happening.

    @henrywright-1

    Member

    There is a plugin by BuddyDev which might help. It allows members to add an avatar on sign up

    BuddyPress Signup Avatar

    In reply to: Member login

    @henrywright-1

    Member

    You might want to provide more details of the problem. Which version of WP, BP, plugins activated? Which theme are you using?

    @henrywright-1

    Member

    Thanks for helping to test @mercime

    Trac ticket:
    https://buddypress.trac.wordpress.org/ticket/5230

    @henrywright-1

    Member

    I’m not very familiar with the groups loop (never had groups enabled) but, yes, in theory there is nothing to stop copying functions you need from the BP core, modifying them for your purpose then adding them to your theme’s functions.php file for your own custom use.

    @henrywright-1

    Member

    For the groups loop, you need to use bp_group_has_members() instead of bp_has_members()

    @henrywright-1

    Member

    bp_loggedin_user_id() will hold the exact same value as $the_user_id anyway.

    @henrywright-1

    Member

    article?

    @henrywright-1

    Member

    I noticed in your code these lines aren’t being used:

    global $bp;
    $the_user_id = $bp->loggedin_user->userdata->ID;
    $the_user_login = $bp->loggedin_user->userdata->user_login; 

    Unless you’re using $the_user_login or $the_user_id it should be safe to remove them.

    @henrywright-1

    Member

    The user ID of the admin is usually 1. That assumes you have just one administrator and that was the first user created when you set up BP. The thread ID is the ID of the private message. You can get this from the URL. It’ll end something like /view/86. It is the digit that you want.

    @henrywright-1

    Member

    You’ll need the $user_id and $thread_id; for the link to work.

    @henrywright-1

    Member

    @l-tic unless the person clicking the link is involved in the conversation, linking to a private message will surely result in a 404?

    <a href="/<?php echo bp_core_get_username( $user_id ); ?>/messages/view/<?php echo $thread_id; ?>/" title="Message">Message</a>

    @henrywright-1

    Member

    @tayenewm just a thought – do you know if the developer made any customisations to the BuddyPress core? This is quite bad practice but it is a possibility. If that has happened then there are 3 options…

    1. live with a broken sort feature
    2. try to get in contact with the developer to see what changes have been made
    3. reinstall WP and BP

    Considering point 1 is unappealing and point 2 doesn’t look possible then I’d try point 3.

    @henrywright-1

    Member

    @tayenewm there is a good chance this is down to your theme so reinstalling BuddyPress is most probably unnecessary.

    If the developer has modified any of the markup in members-loop.php then there is a good chance the modifications are what has broken the sort feature. The sort feature is dependent on certain page elements so if any class names or IDs have been changed or removed then that will be the source of your problem.

    As @hnla said, the way to resolve the issue is to revert to the default theme and work backwards, eliminating each customisation the developer has made as the source of the problem.

    @henrywright-1

    Member

    OK so perhaps it hasn’t been. I decided on using this solution if anyone else ever needs it:

    <script>
    $(document).mouseup(function (e)
    {
        var notice = $(".bp-template-notice");
    
        if (!notice.is(e.target)
            && notice.has(e.target).length === 0)
        {
            notice.hide();
        }
    	
    });
    </script>

    This will dismiss the template notice if the user clicks anywhere else on the page. i.e outside of the template notice’s containing div.

    @henrywright-1

    Member

    This will help:

    Private Messages Loop

    @henrywright-1

    Member

    @3rdaxis

    When viewing a member’s profile page, you can use bp_displayed_user_id() to get the ID of the member. This will then let you display a list of their posts or their latest post. e.g.

    $my_query = new WP_Query( 'author=' . bp_displayed_user_id() );
    
    if ( $my_query->have_posts() ) {
    	while ( $my_query->have_posts() ) {
    		$my_query->the_post();
    		echo '<li>' . get_the_title() . '</li>';
    	}
    } else {
    	// no posts found
    }
    wp_reset_postdata();

    But then note, when you navigate away from the member’s profile page, posts will no longer be displayed due to bp_displayed_user_id() no longer holding a value. To me, this would make sense as if you were viewing the Privacy Policy or About Us pages (for example) you wouldn’t want a member’s posts to show up.

    @henrywright-1

    Member

    Do you mean something like Achievements by Paul Gibbs?

    https://wordpress.org/plugins/achievements/

    @henrywright-1

    Member

    @poetrybyjade no problem. Might be worth trying again at some point though. I just tested and it works for me.

Viewing 25 replies - 126 through 150 (of 574 total)
Skip to toolbar