Forum Replies Created
-
In reply to: Group Forums, Only Admin can post.
It sounds like your user integration is not right. Go over everything again step by step in the topic https://buddypress.org/forums/topic.php?id=471 again.
In reply to: Temporal error with plugin.php on new blogsI’m running what you are and it doesn’t generate that error for me. This should probably be addressed in the wpmu forums or trac Oliver.
In reply to: Xprofile: Just show first Letter of last nameThis seems to work for everything except site wide activity:
function my_fullname_filter($name){
$name_a = explode(\’ \’, $name);
// if there is at least two parts to the name
if (count($name_a) == 2){
// replace the last part of the name with the first letter of the last part
$name_a[count($name_a)-1] = substr($name_a[count($name_a)-1], 0, 1);
// put it all back together
$name = implode(\’ \’, $name_a);
}
return $name;
}
add_filter(\’bp_fetch_user_fullname\’,\’my_fullname_filter\’);
The activity displays store the user\’s profile link in the activity table pre-generated and there is no opportunity to filter things that already exist there. You\’ll either have to wipe the activity tables or just wait till they filter out. New activity will have the filtered full name.
In reply to: HOW TO: change order of the sign-up extra fieldsA Terms of Service plugin and a Captcha are not part of bp. They do whatever they do based on whatever they decide, when they decide to do it. Normally they detect events triggered in the signup process and insert their services where they determine best.
I don’t think anybody here can help you. Perhaps you should contact the plugin authors or look a the code to determine how they operate and modify their behavior.
Here’s two functions that change the way the admin bar displays user blogs.
// sort array of blog objs by $blog->role according to the order of $blog_roles
// roles not included in $blog_roles array will not be displayed
function filter_blogs_by_role($blogs){
global $bp, $blog_roles;
$blog_roles[] = __( 'Admin', 'buddypress' );
$blog_roles[] = __( 'Editor', 'buddypress' );
$blog_roles[] = __( 'Author', 'buddypress' );
$blog_roles[] = __( 'Contributor', 'buddypress' );
$blog_roles[] = __( 'Subscriber', 'buddypress' );
// get roles
foreach ($blogs as $blog){
$blog->role = get_blog_role_for_user( $bp->loggedin_user->id, $blog->userblog_id );
}
// eliminate roles not in $blog_roles
foreach ($blogs as $key => $value){
if (!in_array($value->role, $blog_roles))
unset($blogs[$key]);
}
// sort by $blog_roles sequence if there are any left
if ($blogs){
usort($blogs, 'compare_roles');
}
return $blogs;
}
// i love php.net. stolen from php.net usort manual, user mkr at binarywerks dot dk's
// contribution for priority list comparision function.
function compare_roles($a, $b){
global $blog_roles;
foreach($blog_roles as $key => $value){
if($a->role==$value){
return 0;
break;
}
if($b->role==$value){
return 1;
break;
}
}
}You can put those two fns in your bp-custom.php file. The fn filter_blogs_by_role() does the work and the fn compare_roles() is just a helper fn.
filter_blogs_by_role() takes the array of blog objects returned by the fn get_blogs_of_user() in the admin bar’s bp_adminbar_blogs_menu() fn. It first gets all the roles for the user’s blogs and then removes all of the roles that are not listed in the $blog_roles array. That way you can eliminate some roles such as ‘Subscriber’ if you want. Next it sorts the blogs by the sequence of roles defined in $blog_roles. However you list them in that array is how they will display in the admin menu.
1) So, put those two fns in bp-custom.php
2) Arrange the roles defined by $blog_roles in the fn filter_blogs_by_role() however you want the roles to appear in the menu
3) Comment out the roles you do *not* want to appear in the menu
4) Put the call to filter_blogs_by_role() on line 133 in bp-core-adminbar.php like this:
if ( !$blogs = wp_cache_get( 'bp_blogs_of_user_' . $bp->loggedin_user->id, 'bp' ) ) {
$blogs = get_blogs_of_user( $bp->loggedin_user->id );
wp_cache_set( 'bp_blogs_of_user_' . $bp->loggedin_user->id, $blogs, 'bp' );
}
$blogs = filter_blogs_by_role($blogs);Just in case the forums trash the code I also stuck it here: http://pastie.org/445729
You can pick and choose which bp components to install. If all you want is Friends and XProfile then only install those. You do not have to use the bp home theme at all. It’s optional. You can use whatever wp themes you like on your blogs.
The member theme is not optional however. That’s what gives your users access to the profiles and friend functionality.
Here some things I noticed about your site. You are running two plugins that use js which could interfere with the operation of the wpmu backend media popup. Geopress and Lightbox. Plugins that run js sometimes don’t play nice together. Try disabling those to see if the problem clears up.
Also the bp-events plugin doesn’t seem to be loading it’s css. Looks like the const BP_PLUGIN_URL is not defined. That’s an indication that you are running something less than the current trunk. The bp-events plugin seems to assume that you are running svn trunk bp. BP_PLUGIN_URL is only defined in recent trunk versions of bp.
Deep and I are in irc now people.
In reply to: Excerpt function in RC2I seem to be confused here. Where are you trying to show this sitewide activity? In any case the sitewide activity widget was not designed to be called as a template function.
I’m not sure that the plugin issue has anything to do with repetitive activity table creation. However this:
[Mon Apr 13 09:35:55 2009] [error] [client xxx.xxx.xx.xxx] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’
Should be of concern.This is an apache configuration problem.
This is what IRC is for people. #buddypress irc.freenode.net
We are posting around each other.
What version of wpmu are you using and are you using the wp object cache? Disable object caching and flush the existing cache directory. There was a bug in wpmu until recently in the 2.7 trunk that tries to load plugins that don’t exist anymore.
Did you just delete the invite friends plugin? I’m thinking that you may not have deleted the entire plugin. There seems to be a php file in /mu-plugins called bp-invitefriends.php and then the files in the directory /bp-invitefriends
Make sure you deleted the file in the /mu-plugins dir and the files in the plugin directory.
What version bp and wpmu deep? Any custom code or new plugins installed? What changes happened recently?
You have to be using a version of bp prior to trunk rev 1265 because bp no longer uses individual user activity tables.
In reply to: Slip to catologies managementYou have a blog that you allow people to have the role of Author. You want to restrict your authors to posting in certain categories only? Buddypress doesn’t have this capability but I’m sure you will be able to find such a plugin in the wp plugin directory: https://wordpress.org/extend/plugins/
In reply to: Lock to create a group of member?Are you saying you want to limit who can create new groups? Maybe that is what you are asking.
In reply to: SecurityYou disabled registration in the wpmu admin area: Site Admin > Options > Allow New Registrations with that option set to what?
1) Disabled
2) Enabled. Blogs and user accounts can be created.
3) Only user account can be created.
4) Only logged in users can create new blogs.
Now you have 4 new users on your site? If you choose option 2 or option 3 then people will still be able to register for accounts on your site.
Are you sure they are users or just people creating comments on your blog posts?
People seem to use the role manager plugin for this kind of use Anointed. There are lots of this type of plugin available for wp.
http://www.im-web-gefunden.de/wordpress-plugins/role-manager/
Oliver, I’m running that exact setup and blog post from the home blog and other blogs show up just fine in sitewide activity. Are you saying that blogs other than the wpmu root blog are not showing activity?
Do you have some kind of blog privacy plugin running?
In reply to: Excerpt function in RC2get_sitewide_activity() isn’t a function. It’s a method of the class BP_Activity_Activity and can only be called like $activity = BP_Activity_Activity::get_sitewide_activity()
It’s not going to give you what you are looking for. The new patch I put in trac will though. See my post above this.
In reply to: Securing components from non logged in usersPeter you have to be running the latest trunk for the change to the members slug to be effective. On anything less it will make the function fail. Recent trunk does not live in /mu-plugins. Leave it like it is on your site.
In reply to: Excerpt function in RC2I created a function that lives in the BP_Activity_Activity class that gets recent group activity. I uploaded it as a patch in trac https://trac.buddypress.org/ticket/668
get_sitewide_activity() returns all sorts of activity not related to that group. The new function that I uploaded gets just the activity for the specified group. If you apply that patch to the bp-activity-classes.php file and build some template php around it then you’ll get your activity display.
$activity = BP_Activity_Activity::get_activity_for_group( $site_groups_template->group, 2 );
That call above would work in the group directory template file. You’ll have to build something to display the returned $activity items like the site wide activity widget does.
See bp-activity-widgets.php for a guide. This little template tag below displays some raw unformated activity.
function my_the_site_group_activity($limit = 2){
global $site_groups_template;
$activity = BP_Activity_Activity::get_activity_for_group( $site_groups_template->group, $limit );
foreach ((array)$activity as $item){
echo apply_filters( ‘bp_activity_content’, bp_activity_content_filter( $item[‘content’], $item[‘date_recorded’], ”, true, false, true ) );
}
}
You can put that fn in your bp-custom.php file and try it out. I just stuck it in a div under the description tag in groups-loop.php for testing.
In reply to: Securing components from non logged in usersNOTE: to people running the latest trunk or anything past rev 1273 the constant MEMBERS_SLUG is no longer valid and the oci_restrict_access() fn will not work. Change MEMBERS_SLUG to BP_MEMBERS_SLUG and it’ll work again. The constants changed.
In reply to: Excerpt function in RC2Thanks for the css. I haven’t tried it yet. Got sidetracked. Does any of that fix the overflow of text problem? If so then post the fix in trac as a patch or comment here: https://trac.buddypress.org/ticket/665
The problem with the sitewide activity is that you can get all the activities you want but it’s not really formatted for easy detection of specific group activities. The only indication that it’s from a specific group is the bp_activity_sitewide table fields ‘primary_link’ and ‘component_name’.
The component_name will be ‘groups’ and the primary_link will be something like this: http://ourcommoninterest.dev/groups/public
Take a look at bp-activity-classes.php get_sitewide_activity()
You can’t just make a call to a canned function with some parameters and get stuff for a specific group.
In reply to: Excerpt function in RC2I see. I don’t think that the groups component has specific template functions for activity. Users and site wide is all if I remember correctly. You can always build one that filters group related stuff out of sitewide for just that group. I gotta go look.