Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 24,226 through 24,250 (of 68,948 total)
  • Author
    Search Results
  • #150155
    modemlooper
    Moderator

    Awesome, but you can not use the BuddyPress logo in non-official applications.

    #150151
    lwaltzer
    Participant

    Oops. Trying again:

    /**
    * In WP 3.5+, get_blogs_of_user() is much slower than in previous versions. As
    * a result, if you have a certain number of blogs, running get_blogs_of_user()
    * will create a memory timeout. This is a particular problem because
    * get_blogs_of_user() is called on every page, because of the toolbar.
    *
    * Ideally, there would be a way to short-circuit get_blogs_of_user(), or even
    * to prevent WordPress from calling get_blogs_of_user() while loading the
    * toolbar. But there is not. As a workaround, this function intercepts a key
    * step in get_blogs_of_user() – the get_user_meta() call that gets all of a
    * user’s metadata. If we determine that this request is coming from
    * get_blogs_of_user() (which we do by examining the debug_backtrace(), a truly
    * awful technique), AND that it’s one of the generic meta queries used by
    * get_blogs_of_user(), AND that the current user has more than 75 blogs, THEN
    * we strip all of the blog capability keys from the array of metadata,
    * tricking get_blogs_of_user() into thinking that the current user has no
    * blogs at all.
    */
    function bbg_admin_bar_hack( $check, $object_id, $meta_key, $single ) {
    // Only fire when looking at get_user_meta() with no params
    if ( ! $meta_key ) {

    // check to see whether this came from get_blogs_of_user()
    $db = debug_backtrace();
    $is_get_blogs_of_user = false;
    foreach ( $db as $dbk => $dbv ) {
    if ( ‘get_blogs_of_user’ == $dbv[‘function’] ) {
    $is_get_blogs_of_user = true;
    break;
    }
    }

    if ( $is_get_blogs_of_user ) {
    // Get the real metadata, but don’t recurse
    remove_filter( ‘get_user_metadata’, ‘bbg_admin_bar_hack’, 10, 4 );
    $meta = get_user_meta( $object_id );
    add_filter( ‘get_user_metadata’, ‘bbg_admin_bar_hack’, 10, 4 );

    // How many blogs does this user have?
    static $blog_count_of_user;
    if ( ! isset( $blog_count_of_user ) && is_user_logged_in() ) {
    $blog_count_of_user = 0;
    foreach ( $meta as $mk => $mv ) {
    if ( ‘capabilities’ === substr( $mk, -12 ) ) {
    $blog_count_of_user++;
    }
    }
    }

    // We only care about those with counts > 75
    if ( $blog_count_of_user > 75 ) {
    static $clean_keys;
    if ( isset( $clean_keys ) ) {
    return $clean_keys;
    } else {
    foreach ( $meta as $mk => $mv ) {
    if ( ‘capabilities’ === substr( $mk, -12 ) ) {
    unset( $meta[ $mk ] );
    }
    }

    $clean_keys = $meta;
    return $meta;
    }
    }
    }

    }

    return $check;
    }
    add_filter( ‘get_user_metadata’, ‘bbg_admin_bar_hack’, 10, 4 );

    #150150
    lwaltzer
    Participant

    @boone figured this out for me, and hacked together a fix which I’ve pasted below.

    `

    $dbv ) {
    if ( ‘get_blogs_of_user’ == $dbv[‘function’] ) {
    $is_get_blogs_of_user = true;
    break;
    }
    }

    if ( $is_get_blogs_of_user ) {
    // Get the real metadata, but don’t recurse
    remove_filter( ‘get_user_metadata’, ‘bbg_admin_bar_hack’, 10, 4 );
    $meta = get_user_meta( $object_id );
    add_filter( ‘get_user_metadata’, ‘bbg_admin_bar_hack’, 10, 4 );

    // How many blogs does this user have?
    static $blog_count_of_user;
    if ( ! isset( $blog_count_of_user ) && is_user_logged_in() ) {
    $blog_count_of_user = 0;
    foreach ( $meta as $mk => $mv ) {
    if ( ‘capabilities’ === substr( $mk, -12 ) ) {
    $blog_count_of_user++;
    }
    }
    }

    // We only care about those with counts > 75
    if ( $blog_count_of_user > 75 ) {
    static $clean_keys;
    if ( isset( $clean_keys ) ) {
    return $clean_keys;
    } else {
    foreach ( $meta as $mk => $mv ) {
    if ( ‘capabilities’ === substr( $mk, -12 ) ) {
    unset( $meta[ $mk ] );
    }
    }

    $clean_keys = $meta;
    return $meta;
    }
    }
    }

    }

    return $check;
    }
    add_filter( ‘get_user_metadata’, ‘bbg_admin_bar_hack’, 10, 4 );

    `

    #150136
    ngoegan
    Participant

    I realized that even though they are showing up as members in my user panel, they aren’t showing as members on the site – because I never approved them. So I think my friend who is not showing up as a member probably never came back and logged in so she’s in limbo – showing up as a member who registered, but until she comes back and tries to login, Private Buddypress doesn’t send the email to me to do the final approval that makes her a member on the site itself.

    #150129
    Renato Alves
    Moderator

    Thank you @chouf1, very useful! =)

    #150122
    Anonymous User
    Inactive

    Thanks @chouf1 for your help 🙂

    Just published a new beta on github. Now you can filter the avatar list of avatars by gender thanks to a xprofile field and a little piece of code in the functions.php of your active theme : http://imathi.eu/2013/01/09/bp-avatar-suggestions-xprofile/

    #150119
    sam247
    Participant

    The only related error is
    `PHP Parse error: syntax error, unexpected ‘<' in /public_html/wp-content/themes/wp-magazine/members/index.php on line 10`

    my members/index.php code looks like this:
    `


    get_header( ‘buddypress’ ); ?>


    `

    #150118
    @mercime
    Participant

    @sam247 you’d need to check your server’s error logs. What’s posted there?

    #150117
    ngoegan
    Participant

    Thank you, I’ll try that. Another question: I have a member who shows up in the user list when I go to my Dashboard > Users. But when I go to the member section of the site they are not there. I tried re-setting her role and then setting it back in the User area but that didn’t do it. Not sure what to do. Maybe delete and have her re-register? Concerned it will happen again without my knowledge when I open for many memberships.

    Another issue I’m having is that I installed Private Buddypress, which I know you said I shouldn’t since it isn’t compatible, but I can’t use BuddyPress if it isn’t private so I need the privacy. But every morning I check and there are several new members who somehow managed to register themselves as members when I have it set to need my approval. How can I avoid this? I just delete them, but when I have a lot of members, I won’t be able to manage that and pick them out so easily.

     

    #150109
    Ben Hansen
    Participant
    modemlooper
    Moderator
    #150094

    In reply to: Secure a site

    mrjarbenne
    Participant

    That code has been kicking around the community for a while. Here’s the initial forum post that has some variations you can try:

    https://buddypress.org/support/topic/members-privacy-how-can-i-hide-members-profiles/?topic_page=2&num=15/#post-102784

    #150093

    In reply to: Register Error

    danbpfr
    Participant

    i presume the error is coming from a bad translated string, that’s why it is necessary to debug this possibility.

    To confirm this, you have to retrieve your language file (rename simply the pt_BR.mo and the Buddypress-pt_BR.mo) and WP/BP will be automatically in english.

    So when in english and the error disapeared, you know that the translation is the culprit.

     

    #150091
    modemlooper
    Moderator

    BUddyPress and bbPress both use the slug forum. Change bbPress forum slug to something else in the bbPress settings

    #150084
    mrjarbenne
    Participant

    Unlike CSS, which a child theme will override the parent theme files, a child theme will utilize both functions.php files.

    See the WordPress Codex: https://codex.wordpress.org/Child_Themes#Using_functions.php
    And the Buddypress Codex: https://codex.buddypress.org/legacy/building-a-buddypress-child-theme/

    So don’t copy it over. The functions are being applied in your child theme already. If there are additional functions you want to add in your child theme, add them to the child theme functions.php file.

    #150080
    andaluzo
    Participant

    Hi,

    thanks a lot.

    We already installed the WP Multisite and we are working with Multisite language switcher.

    So far everything is working fine.

    I just wonder if I do the installation process for Buddypress

    ‘BuddyPress was successfully activated! Please run the installation wizard.’

    For each individual site or network wide, just don´t want to srew it 🙂

    Thanks for your input !

    #150075
    Tim Hyde
    Participant

    We have just set up a multisite with BuddyPress and have each sub-site as the different languages. At present we just have French and English but the there will be more to come. (See it in action at http://artgrove.com/)

    Enable WordPress in network directory mode. You will create a site for each language required. In the settings for each site you can choose a language.

    For BuddyPress to work in this environment, you need to add the following line to wp-config:

    define( ‘BP_ENABLE_MULTIBLOG’, true);

    This makes the same single BuddyPress run across the whole wordpress network.

    We also used Multilingual press (https://wordpress.org/extend/plugins/multilingual-press/) to help with the switching between languages and for syncing translated content.

    The Codestyling Localization plugin is also very useful for translating plugins, themes and core components into target languages (https://wordpress.org/extend/plugins/codestyling-localization/).

    Of course BuddyPress user generated content will always be in the language they input in. So as pointed out above, you may wish to set up groups/forums that are targeted to specifc languages.

    #150071

    In reply to: Menu tab issue

    Versipellis
    Participant

    All I want to do is add a new tab to the menu, the code I’m going to be using to define what is displayed I can include elsewhere. The idea is this tab literally adds a single radio option for a user to choose an option from, then saves to a table I’ve created in my database.

    However, the skeleton component seems overly complicated for this, and the bp-custom.php way of doing things does nothing.

    No matter which example code I try, the only way I can get a tab to display is by putting:

    `bp_core_new_nav_item( array(
    ‘name’ => __( ‘Media Privacy’, ‘bp-media-privacy’ ),
    ‘slug’ => ‘media-privacy’,
    ‘position’ => 80,
    ‘show_for_displayed_user’ => false,
    ‘screen_function’ => ‘bp_media_privacy’,
    ‘default_subnav_slug’ => ‘media-privacy’
    ) );`

    By putting the above code directly into an included page it displays but doesn’t go to the said page. When I put it in a function and add it using add_action( ‘bp_setup_nav’, ‘my_bp_nav_adder’, 100 ); nothing happens at all.

    I’m seriously confused at this point but it is vital to have this additional tab in the front end for users to be able to change this setting. I’m using a clean install of the latest Buddypress on my wamp (not putting this on my live site until it works.)

    @chouf1 and @modemlooper, could someone possibly do a pastebin of an example, working, bp-custom.php as I cannot find one? Thank you for your help before.

    #150062
    mrjarbenne
    Participant

    If you want to block them entirely, you could use something like this:

    https://wordpress.org/extend/plugins/buddypress-block-activity-stream-types/

    mrjarbenne
    Participant

    I had r-a-y develop this for our site. It’s not in the repo, but it’s a thing of beauty.

    https://dl.dropbox.com/u/6199808/bp-lists-20120910.zip

    #150059

    In reply to: How to remove BP Links

    mrjarbenne
    Participant

    Buddypress doesn’t edit any of your templates. If you have deactivated the Buddypress Plugin, and deleted it from your plugins menu, and you still see a link, it’s in your theme. Not knowing where the link is that you are referring to, it’s difficult to tell you where it might be coming from, but I would suggest checking the footer.php file.

    #150058
    mrjarbenne
    Participant

    That would be the default behaviour of that particular URL, as you’ll see from the test BP site: http://testbp.org/members

    If you aren’t seeing that, perhaps something isn’t set up correctly. In the Buddypress Admin page, have you associated all of the components with WordPress pages?

    #150052
    yidamweb
    Participant

    Hello Ben,

    Thank you for the insight given.

    I also await advice on how to be able to continue using the “BuddyPress Registration Options” plugin – it is currently disabled because it was not allowing the public to access/read the groups/forums of the site.

    Thanks again.

    #150051
    leonardoarias
    Participant

    @morgue89

    Hi, I know you posted this long ago but I just faced the same issue, and was able to come up with a temporal fix.

    As you mentioned, there is a limit of 5 posts there, to get displayed. just change them to a bigger number. i changed to 50 so the site works, until i can find a better solution.

    To maje the change, just go to:

    wp-content/plugins/buddypress/bp-themes/bp-default/_inc/global.js
    

    then edit this code, to be 50:

    /* Hide long lists of activity comments, only show the latest five root comments. */
    function bp_dtheme_hide_comments() {
    	var comments_divs = jq('div.activity-comments');
    
    	if ( !comments_divs.length )
    		return false;
    
    	comments_divs.each( function() {
    		if ( jq(this).children('ul').children('li').length  li');
    		var comment_lis = jq(this).children('ul').children('li');
    		var comment_count = ' ';
    
    		if ( jq('li#' + parent_li.attr('id') + ' a.acomment-reply span').length )
    			var comment_count = jq('li#' + parent_li.attr('id') + ' a.acomment-reply span').html();
    
    		comment_lis.each( function(i) {
    			/* Show the latest 50 root comments */
    			if ( i < comment_lis.length - 50 ) {
    				jq(this).addClass('hidden');
    				jq(this).toggle();
    
    				if ( !i )
    					jq(this).before( '
  • ' + BP_DTheme.show_all + ' ' + comment_count + ' ' + BP_DTheme.comments + '
  • ' ); } }); }); }

    Hope its not too late to help! 🙂

    Best,

    Leo

    #150049
    modemlooper
    Moderator

    If you are serious about running your own hosted site then you will need to have a local install to do all your hacking/testing. If a plugin has not been updated to your install version DO NOT USE it unless you can code and fix problems. WordPress and BuddyPress works together OOTB but when you start adding in unknown code it can and will break.

    Why do you think ning charges? They host it and make sure the features work. That’s the price. WordPress.com same thing. You pay a small fee to not have to deal with hosting and features breaking.

    BuddyPress currently has no hosted solution so my comment about having a local test environment is they way to make sure new features/plugins wont kill your site.

    Also, you need to protect user data and having bad plugins that could leak user data is a site killer. They will loose trust, delete and never return.

Viewing 25 results - 24,226 through 24,250 (of 68,948 total)
Skip to toolbar