Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1,651 through 1,675 (of 2,756 total)
  • In reply to: Filter members loop

    @henrywright

    Moderator

    Brajesh seems to have done most of the heavy lifting for what you want. He uses the bp_ajax_querystring filter, so lets borrow his idea and make our own function to exclude friends from the loop.

    function rosyteddy_exclude_users( $querystring = false, $object = false ) {
    
        // Only do this for the members loop.
        if ( $object != 'members' )
            return $querystring;
    
        // Get an array of friend IDs for the logged-in user.
        $ids = friends_get_friend_user_ids( get_current_user_id() );
    
        // Make the array a comma sep list.
        $ids = implode( ',', $ids );
    
        $args = wp_parse_args( $querystring );
    
        if ( ! empty( $args['exclude'] ) )
            $args['exclude'] = $args['exclude'] . ',' . $ids;
        else
            $args['exclude'] = $ids;
    
        $querystring = build_query( $args );
    
        return $querystring;
    }
    add_action( 'bp_ajax_querystring', 'rosyteddy_exclude_users', 20, 2 );

    Note: I haven’t tested.

    In reply to: Filter members loop

    @henrywright

    Moderator

    Hi @rosyteddy

    I haven’t tried it, but I think it’ll work if you put it in a page template. See here for more info.

    Regarding the functionality you want, you’d need to do something like this:

    $ids = '1, 2, 5, 33, 43';

    if ( bp_has_members( 'exclude=' . $ids ) ) :

    Where $ids is a comma separated list of user IDs who are not friends.

    In reply to: Filter members loop

    @henrywright

    Moderator

    Hi @barodscheff

    You can just copy the code from here and paste it in to your page template (say page-poodles.php). You can then go about filtering the returned members as you see fit.

    @henrywright

    Moderator

    Hi @pieter

    Try this

    function filter_private_message_email_body( $email_content, $sender_name, $subject, $content, $message_link, $settings_link, $ud ) {
    
        $content = substr( $content , 0, 140 );
    
        $email_content = sprintf( __(
    '%1$s sent you a new message:
    Subject: %2$s
    "%3$s"
    To view and read your messages please log in and visit: %4$s
    ---------------------
    ', 'buddypress' ), $sender_name, $subject, $content, $message_link );
    
        return $email_content;
    }
    add_filter( 'messages_notification_new_message_message', 'filter_private_message_email_body', 10, 7 );

    This will make the message 140 characters. Feel free to change the 140 to another number.

    @henrywright

    Moderator

    Hi @julieborgeot

    From what you’ve described, you’ve done everything right. With the Twenty Thirteen theme installed, and no plugins activated, you shouldn’t be seeing this problem. My best guess is it’s something related to MAMP. I’m not a Mac user (I use LAMP) so can’t help you test this, but I know there will be lots of users on here that use MAMP so hopefully someone will see this and be able to offer some ideas.

    @henrywright

    Moderator

    Hi @tse11

    Looking at the plugin’s source, I can see the function etivite_bp_activity_bump_time_since() filters bp_activity_time_since. The bump date is updated by function etivite_bp_activity_bump_comment_posted().

    I realise the plugin may be 2+ years old but have you tried contacting the plugin author to see if any support is available?

    In reply to: Member Count

    @henrywright

    Moderator

    Hi @robjsinger

    Can you try with Twenty Fifteen and no plugins activated (aside from BP) and let me know what you find? The problem could be theme-related or perhaps due to a plugin conflict.

    @henrywright

    Moderator

    It isn’t possible ‘out-of-the-box’. There may be a plugin that does that for you but I haven’t seen one myself. I think your best bet is to search the Plugin Directory for some kind of media management plugin that works with BuddyPress and has options for limiting storage space.

    https://wordpress.org/plugins/

    In reply to: Users gallery

    @henrywright

    Moderator

    @henrywright

    Moderator

    Hi @numumar

    You’ll need more than two templates. As an overview, you’d have a theme which would consist of a number of templates. Then you’d have your BuddyPress-specific templates.

    Take a look at these articles to get started:

    @henrywright

    Moderator

    Hey @morteza13055

    Just wondering what you mean by “define a maximum total space for each profile”?

    Are you referring to on screen space (real estate) or back-end storage space? etc

    In reply to: BuddyPress and Divi

    @henrywright

    Moderator

    Hi @dorothykbiz

    Which screenshots are you referring to?

    @henrywright

    Moderator

    Word Press is so advanced, its kind of complicated at times.

    I agree it can be complicated at times, but if you consider what you’re trying to do, then you could also say that WordPress does a lot of the heavy lifting for us 😀

    @henrywright

    Moderator

    The comparison operator you’re using === checks if $entry[1] and xprofile_get_field_data(2, $user_id) are equal AND are of the same type. Even if they are ‘equal’, if one is type string and one is type int then your comparison will be false. If type isn’t important to you, then just use ==.

    Just something I’d mention for you to keep in mind.

    @henrywright

    Moderator

    Hi @whoaloic

    What do you mean by “note”?

    Messages can be either public or private. Private messages work kind of like chat, and can be seen only by the ‘thread’ participants. Public message are ‘front-end’. You can public message someone by prefixing their username with the @ symbol. Public messages are also known as mentions.

    Regarding favourites, see this Trac ticket for how the feature will be improved over the next few versions.

    Hope this information helps.

    In reply to: Users gallery

    @henrywright

    Moderator

    Hi @mocmocmk

    A popular plugin to manage media seems to be rtMedia. I think you can display a gallery with the [rtmedia_gallery] shortcode

    @henrywright

    Moderator

    Hi @sofijagb

    That particular email’s message isn’t filterable but the function which sends the email is pluggable, which means you can write your own function. For more info on pluggable function in WordPress, check out:

    https://codex.wordpress.org/Pluggable_Functions

    The function you’ll need to override is wp_new_user_notification()

    Hope this info helps!

    In reply to: Google Indexing

    @henrywright

    Moderator

    To resolve this, you’ll need to look at the member pages which aren’t being indexed (look at their templates, URLs, sitemap entries) and work out what is different to the pages that are being indexed. I think you mentioned there could be an issue with the sitemap, so that’s another avenue to investigate. Perhaps try installing a different XML sitemap. Personally, I’ve used XML Sitemap which has always been reliable (and support from the author is very good as you’ll be able to see from the resolved tickets I’ve opened on that support forum). Then there is Google XML Sitemaps which has 1m+ active installs, so that looks popular

    In reply to: Cookies and BuddyPress

    @henrywright

    Moderator

    Hi @prometheus-fire

    I wrote a reply to a similar question not long ago.

    Ref: https://buddypress.org/support/topic/bp-default-cookie-usage/#post-186554

    In reply to: Google Indexing

    @henrywright

    Moderator

    @mugwumpman I just tried searching google for “independenthostels abernethybunkhouse” and can see that the member page for abernethybunkhouse is now being returned in the list of results.

    In reply to: Google Indexing

    @henrywright

    Moderator

    Are you using a sitemap at all? Google might need to be told about your member pages if their spider isn’t automatically picking them up. Alternatively, check if they are indexed but just have a very low rank. Or my last thought is your theme might have some crawler-blocking script on it. Usually Flash type stuff would be a culprit

    @henrywright

    Moderator

    Yes, your theme’s functions.php file is where it should go. Glad you got it to work.

    In reply to: Google Indexing

    @henrywright

    Moderator

    Hi @independent

    What does your robots.txt file look like?

    @henrywright

    Moderator
    function leanneoleary_custom_post_types( $post_types ) {
        $post_types[] = 'files';
        return $post_types;
    }
    add_filter ( 'bp_blogs_record_post_post_types', 'leanneoleary_custom_post_types' );

    If your custom post type is files, then just try that? You’ll need to ensure the Site tracking component is enabled via WP admin.

    @henrywright

    Moderator

    Hi @leanneoleary

    bp_blogs_record_post_post_types filters the post types to track. The function you posted is telling the Blogs component to track videos and pictures.

    bp_activity_add() simply adds items to the activity stream. See here for how it’s used.

    Now, I think posts of type videos and pictures will be automatically added to the stream due to activity_publish_custom_post_types(). But, if they aren’t you’ll need to use bp_activity_add() as well.

    Does this help?

Viewing 25 replies - 1,651 through 1,675 (of 2,756 total)
Skip to toolbar