Make a plugin or put it in your functions.php.
function pc_get_userrole ($user_id) {
$user = new WP_User($user_id);
$userclean = $user->roles[0];
return $userclean;
}
Call it like this.
echo pc_get_userrole(bp_current_user_id());
Not sure how well it works, but it worked well enough for me.
Hello all,
Working on a plugin for buddypress where I need to be able to run specific code when some accesses for example http://www.example.org/RUN-CODE. I know this can be done with a shortcode in a page but would prefer not to use this method. Any ideas?
Thanks in advance
I’m trying to do the same thing. No one seems to uderstand or is able to help out though. If I ever figure this out, I’ll post it in here.
I’m with David and nexia. Try it. I think there is room for a site that groups social communities. For example, Meetup.com is a generic site that allows you to create a social gathering around say hiking. But once you join, you learn about gatherings around mountain biking. Because it’s likely that hikers may mountain-bike, by putting the two together you’ve added value. Putting them together makes it easier for people to find each other and interact. This is true with some sports sites as well. I could see that model working. Check out communityengine.org which uses Ruby. This is just a collection of communities based on the interests of the developer, but the concept could be expanded.
MU and Buddypress could get this stuff done but be prepared for extensive plugin development. If you have funding, that shouldn’t be that bad.
As for the viability of the service, the model lately has been grow fast through viral exposure of a simple, free service. Once critical mass is achieved, anything is possible (or so the model suggests). Monetization is almost secondary, so you need deep pockets (particularly to take on media). Protection from competition is based on size, installed user base and acquisition of content (e.g. videos).
I’d say go for it, but start with maybe 3 networks. I’m using Buddypress because I have background in PHP/MySQL and I don’t want to use Rails, but you might consider communityengine or something similar if you don’t care.
I’m no guru, so I hope someone else comes along to help more. However, what Justin indicated in his post should work for BP just like WP. In fact the “role” is created in WP through Members Plugin anyway.
I would play with echoing the member role name (assuming you’ve assigned one). Once that is echoed, you should be able to use a function based off the thread to assign a ‘$role’.’.png’ file for the icon. It shouldn’t matter that it’s the profile page unless there is a loop problem with that page.
If you have an appropriate development environment, Justin will probably help you get the Members plugin to echo the role on a WP page , but he’s not a BP guru, so you may be back here for the second step.
You should make it a plugin, then add this to the plugin and activate. If you’d like to see a working implementation then check out these plugins:
https://wordpress.org/extend/plugins/buddypress-group-twitter
https://wordpress.org/extend/plugins/bp-groupblog
https://wordpress.org/extend/plugins/external-group-blogs
You should be saving extra group information as groupmeta:
bp_groups_update_groupmeta( $group_id, 'name', $value );
Check this thread in Plugins forum https://buddypress.org/forums/topic/buddypress-contents-10-plugin-released-tags-categories-in-bp
Burt is MIA and there are other users who have at least done some updating.
There doesn’t seem to be a clear line between creating/extending and plugins so searching forums is key.
I’ll again put in a plug for BPCONTENTS going core.
OK, I know adding this to core might be a big project to take on, but it seems that if BP and WP are really going to be flexible CMS’s, this kind of functionality is needed.
Custom post types, member types, group types and blog types.
It seems crazy that most sites would want to moderate anyone getting a blog or starting a group about anything. What I hate about some of the ning sites I see is duplicative groups and groups about nothing. Poor quality blog posts everywhere. Not a good user experience if you ask me.
I’m nowhere near good enough to take this on, but it’s needed. For example, I need different member levels (e.g. teacher, principal, student) with different “rights.” Different group types (e.g. classroom, school, extracurricular). Different blog types (e.g. homework, school news, dances/parties). Students shouldn’t be able to create school groups and teachers shouldn’t create blogs on parties/dances. Something like Justin Tadlock’s Members Plugin could be used to manage rights of specific content types including the content type user/member.
BPCONTENTS was/is a step on this direction that should be available for all well organized social networking sites. The fact that Facebook doesn’t allow different levels of “friend” access is problematic and BP should do better. I hope this gets on the roadmap list or at least as a supported plugin.
[. . . stepping off of soapbox ]
Yes, I’m having same problem in WPMU 2.8.4a and buddypress 1.1.3. Looks like this might have been addressed once at beginning of year (https://trac.buddypress.org/changeset/1083), but it’s cropped up again?
Moderators: should we post as bug?
I hope you get somewhere on this. I want Buddypress, but not MU. No choice at the moment, but I’ll only have one blog. I am thinking of guest authors, but not separate blogs. I am thinking of a way to use points or achievements as a way to access the ability to blog. That will save me some moderation time I hope. Without this solution, I plan to have to moderate initial posts to see if I want the authors content. Probably need to do that anyway in the beginning, but with growth, I’d like to relax that restriction.
Hey guys,
I’m writing a new component for BuddyPress which would allow users to upload media (be it MP3 audios, documents, videos) and for these to be linked to their account, viewable by other users, comment-able, rate-able, share-able, etc.
I’ve downloaded the Skeleton Component and had a look through… I’m competent with PHP, MySQL and markup, but I wanted to get some advice from BP gurus re: how to approach this, since my knowledge of how BP works could be better…
I understand the general structure of Buddypress and have been playing around with theming it for a few weeks now…
The basic functionality I want to start with, is just allowing users to upload content, saving it on the site, creating database entries and allowing the content to be viewed by other users. Also to have the wire on the content… so each piece of the uploaded content would have its own page.
Are there any features in BuddyPress that were specifically designed for this?
I’m feeling pretty overwhelmed I guess, so if anyone could offer any clarity I’d be really grateful.
Thanks in advance!
Wow, those ajax functions must make that server nuts..
Am I allowed to copy this theme and make it a buddypress theme?
I tried resaving it … I’m not sure where the ‘change to previous’ option is. Does it make a difference that I’m using the subdomain option to load the blogs?
I’m just finishing up a post on how to do backups.
“I thought about the index.html as well, but that would still make people loose their posts they are editing when upgrade is taken place (or is failing), wouldn’t it?”
Hopefully you’ll have booted them out & warned them.
Don’t upgrade on the middle of a Thursday, for instance. First thing Monday morning, early on a Saturday – those are times I pick, though I also have the advantage of being in an earlier timezone than my users.
“So you also do not (even) deactivate the BP-plugins?”
I mostly do MU sites, but yeah. I’d just keep on going… (Do the instructions say to deactivate it? I can’t say I ever looked…)
I tyr the auto-upgrades first, and then if needed (or if it’s a big upgrade) I do it manually. Much safer.
“By the way, myself and some others had a white screen of death last upgrade. Not just just main blog, but all blogs, the moment I clicked the de-activate BuddyPress button. Apparently this could have been prevented by switching theme first”
Yep. the theme is looking for BP and you turned it off.
Kind of predictable, really.
I did a post here about backups, mostly via ssh, if someone wants to give it a read-over.
http://wpmututorials.com/basics/how-to-backup-wpmu/
Thanks Andrea. Sorry I have ‘inspired’ you do make a blogpost, but yes, it has become inevitable now 
I agree with the notice, better to let people know. I thought about the index.html as well, but that would still make people loose their posts they are editing when upgrade is taken place (or is failing), wouldn’t it? have you ever tried the automated upgrade?
>Some of us with large sites do not deactivate all plugins and then reactivate later. With hundreds or thousands of blogs, it’d be a nightmare.
So you also do not (even) deactivate the BP-plugins?
>The moving of the theme only occurred during BP 1.1. Shouldn’t have to do it next time.
It is still in the upgrade instructions though and I assume that if there are theme changes this might make sense or not? I do hope somebody cleverer than me could make this process automated as well.
By the way, myself and some others had a white screen of death last upgrade. Not just just main blog, but all blogs, the moment I clicked the de-activate BuddyPress button. Apparently this could have been prevented by switching theme first. At that time I was not using a cloned child theme (now I am), so maybe that caused it.
Just shooting some ideas for your upcoming post 
Cheers, Harry
This is nothing but an white space issue.
Check for the white spaces after closing tags of php(that may be on different line than the 3).
best bet ,disable all other plugins except buddypress ,if the error is there,It is because you have got white spaces in your header.php
Hope,that should help.
I am using WPMU 2.8.6 & BP 1.1.2.
I just noticed that the adminbar and my footer has disappeared from the buddypress home page and main blog on my website.
I know that it was working till a couple of days ago. Unfortunately, I cant think of anything else I might have changed except for some theme tweaks on header.php and home.php of the front page theme. I reverted these changes (even tried using the default theme) but it didn’t work so I don’t think its a theme problem.
Using firebug, I see that the footer is not being called at all but I cannot understand why this may be so. Also, firebug is not reporting any (new) errors.
I would appreciate any help in this matter. The site is at http://bit.ly/Vjkd6
Thanks in advance!
Last time I upgraded, all sites went blank (not just main blog), it apparently had to do with not switching the main theme before deactivating.
I am on a live site, but with few users. I wonder how others handle their upgrades as it cost me an hour or so to delete stuff, re-upload, move themes, find the problems and fix them.
Apparently the one-click upgrade does not work (see also http://buddypress.org/blog/news/buddypress-1-1-3/#comments) and with a growing number of plugins, the basic fact of deactivating and later reactivating all plugins, moving themes etc is taking a lot of time in itself even if the core upgrade goes well.
So how do people with a larger live site handle this?
(1) Do you really back up all your database files (mine are already huge with just a few users, can’t imagine how big large live sites’ SQL must be) and file folders?
(2) Do you make an announcement on your site as all BP plugins (and main themes?) will not be working during upgrade?
(3) Do you use an ‘Under Construction’ Theme to switch to temporarily (if so, can you share it?) or just let the site go blank and filled with errors for whatever time it takes to fix everything?
Looking forward to hear some ‘best practices, wil help a lot of people I think.. Thanks!
http://klickmd.de/
Online network for local youth groups and associations Magdeburg/Germany.
KlickMD based on WordPress MU + Buddypress + Event Plugin.
Achievements coming out this weekend. Just going to see if I can get some translations done first. Mainly a compatibility release with current BuddyPress and a few changes to admin interface. Plan is to get another version out just after BP 1.2 with more changes.
@Andrea and @JJJ, thanks for the suggestions, I’ll play around with the permissions but I suspect that’s not it, simply because it hasn’t been a problem when uploading the stable version of BP in near identical circumstances. Also, yes, other plugin do appear and can be activated.
Getting an install up and running with trunk would be useful in giving me a headstart on working out how close that version of BP will be to doing what I need, but it is not an absolute necessity.
Actually, at this stage, I probably need to bit the bullet and do a regular SVN install like everyone else – if it turns out that using that route solves the problem, I will post here to tell others who might run into the same problem.
hey everyone,
i just upgraded to the latest version of buddypress and love it.
quick question:
i only want to display the users latest comments he/she made on blogs, and not everything like »added a friend« etc.
is there a way to do that?