Search Results for 'buddypress'
-
AuthorSearch Results
-
January 10, 2013 at 5:54 pm #150155
In reply to: BuddyDroid – BuddyPress for Android
modemlooper
ModeratorAwesome, but you can not use the BuddyPress logo in non-official applications.
January 10, 2013 at 5:40 pm #150151In reply to: [Resolved] BuddyPress kills my 3.5 upgrade
lwaltzer
ParticipantOops. 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 );January 10, 2013 at 5:39 pm #150150In reply to: [Resolved] BuddyPress kills my 3.5 upgrade
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 );`
January 10, 2013 at 11:45 am #150136In reply to: Not exactly "a few easy clicks"
ngoegan
ParticipantI 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.
January 10, 2013 at 1:22 am #150129Renato Alves
ModeratorThank you @chouf1, very useful! =)
January 9, 2013 at 10:16 pm #150122In reply to: Seeking some beta tester
Anonymous User
InactiveThanks @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/
January 9, 2013 at 9:18 pm #150119In reply to: /members/ show member list
sam247
ParticipantJanuary 9, 2013 at 8:59 pm #150118In reply to: /members/ show member list
January 9, 2013 at 8:46 pm #150117In reply to: Not exactly "a few easy clicks"
ngoegan
ParticipantThank 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.
January 9, 2013 at 6:12 pm #150109Ben Hansen
Participantthis might help:
BuddyPress Global/Sitewide Unified search update for BuddyPress 1.5+
also i hear good things about this plugin:
January 9, 2013 at 6:09 pm #150107modemlooper
ModeratorJanuary 9, 2013 at 4:24 pm #150094In reply to: Secure a site
mrjarbenne
ParticipantThat code has been kicking around the community for a while. Here’s the initial forum post that has some variations you can try:
January 9, 2013 at 4:06 pm #150093In reply to: Register Error
danbpfr
Participanti 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.
January 9, 2013 at 3:36 pm #150091In reply to: Not exactly "a few easy clicks"
modemlooper
ModeratorBUddyPress and bbPress both use the slug forum. Change bbPress forum slug to something else in the bbPress settings
January 9, 2013 at 2:52 pm #150084In reply to: [Resolved] Copying functions.php to child theme
mrjarbenne
ParticipantUnlike 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.
January 9, 2013 at 1:56 pm #150080In reply to: Installation on Multisite
andaluzo
ParticipantHi,
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 !
January 9, 2013 at 11:08 am #150075In reply to: Installation on Multisite
Tim Hyde
ParticipantWe 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.
January 9, 2013 at 10:31 am #150071In reply to: Menu tab issue
Versipellis
ParticipantAll 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.
January 9, 2013 at 4:01 am #150062In reply to: Filtering activity stream
mrjarbenne
ParticipantIf you want to block them entirely, you could use something like this:
https://wordpress.org/extend/plugins/buddypress-block-activity-stream-types/
January 9, 2013 at 3:37 am #150061mrjarbenne
ParticipantI had r-a-y develop this for our site. It’s not in the repo, but it’s a thing of beauty.
January 9, 2013 at 3:23 am #150059In reply to: How to remove BP Links
mrjarbenne
ParticipantBuddypress 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.
January 9, 2013 at 3:19 am #150058In reply to: /members/ show member list
mrjarbenne
ParticipantThat 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?
January 9, 2013 at 2:22 am #150052In reply to: How to allow guest access to groups/forums
yidamweb
ParticipantHello 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.
January 9, 2013 at 1:44 am #150051In reply to: Comments are not working!
leonardoarias
ParticipantHi, 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
January 9, 2013 at 1:29 am #150049In reply to: Not exactly "a few easy clicks"
modemlooper
ModeratorIf 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.
-
AuthorSearch Results