Buddypress Profile Widget For Blogs
I am glad to introduce today, our all new, the Buddypress Profile Widget for Blog Plugins.
The credit goes to Mercime and Bowe for the props π
What It does
It allows Blog admins to show their buddypress profile on their blogs using this widget. To be more precise I have named it "Bp profile Widget for blogs".
How to Use It
Requirements:
Buddypress Must be activated sitewide on the wpmu installation to use this feature.
Download it from here http://wordpress.org/extend/plugins/bp-profile-widget-for-blogs/
Installation
1. Unzip the archive file "bp-profile-widget-for-blogs.zip";
2. Upload the folder "bp-profile-widget-for-blogs" to wp-content/plugins
3. Login as Site Admin, Go to dashboard->Plugins->Installed Plugins
Click on the "Activate sitewide" for "Bp profile Widget Plugin".
Alternatively,Β you may use the wordpress plugin Installer and Install it.
4. Now go to appearance->Widgets and Add the widget "Bp Profile for Blogs"
here is How it looks on the blog
It will automatically list all the xprofile fields and a User can either Hide fields or Show. So the power is in your hands π
If you don't mind and think this is useful, please do rate on WordPress.org repository.
Let me know your suggestions/comments for improvement π
Slick Plugin!
One improvement would be to make an email address become a mailto link.
It works on my site from the member profile view, but not with your widget.
Do you have code that we could insert?
Thanks!
-Greg
hi Greg
Thanks for the comment. Most appreciated. I will look into the code and update it for mail to link for email address.
If you want to edit the code, Just have a look at the widget code and edit it. I will most probably update it tomorrow for the mailto.
Thanks
Brajesh
Actually,
The plugin makes all of the fields "clickable"…meaning that when someone hits, for example, my email address, then get a 404.
See http://gregfielding.housingstorm.com to see what I mean.
THoughts?
Thank you,
Greg Fielding
I understand it now. The issue is I have simply used the profile loop.
Profile loop makes the fields linked. I will modify the code a little and make it non linked.
Also,
We're using Custom Profile Filters for Buddypress.
That will work with this plugin without any issue.
Thanks for the quick responses Brajesh.
One more question…what happens when a blog has multiple authors?
You are most welcome :
That's a Nice Question, This plugin does not lists authors but lists admins.
If a blog has multiple admins, They will be listed below each other.
Do you have suggestions about that, please let me know, I can improve π
Thanks
Brajesh
So if a site has 2 admins, they will both show up in the widget?
This is a great plugin that I can see all of my users using.
Couple of quick thoughts…
We want to make sure email and website links are active. And, it would be great if the "name" link went back to the buddypress profile page.
Well done,
Greg
Thanks π
Yes, both the admins will be shown in the list with their profile fields.
I am sure, I am going to update it tomorrow and add the support for the things you mentioned above π
Thanks
Brajesh
Thank you for the cool plugin, Brajesh as always. You are too generous inlcuding me there, I'm not worthy oh coding master π Cheers.
haha mercime, you deserved that π You were the first one to point me in the direction.
Glad we found this. We had been using something before that just went out with the new bp. Thanks for it.
Thanks for the comment. I am glad It worked for you π
We had before a link to "Edit" profile and also the user nav menu with admin bar notifications menu. Could that be included as an option?
so you meant to say, when a user is logged in and is on his on blog, he should get the edit link and notifications ? is that right. I think, I am going to work on this plugin for a few features Greg mentioned above after finishing my other plugin, so I will appreciate all the ideas/suggestions.
Yes that'll be useful. I'm noticing now that I will prefer to put this in the template as i had it before so its always present. Any option that could be added to achieve this manually would be a good feature.
Thanks!
Brajesh,
Not meaning to rush you so please don't take it that way…will you do a new post when this plugin is updated?
I don't want to miss it π
-Greg
hi Greg, I will leave a comment here and I will be updating on the wp repository, so you will get the notification. Well, allow me a few hours, going to update it now π
Hi Brajesh!
First of all – This Plugin is amazing! Thank you very much for all the great stuff you offer here! π
I've running a website for volunteers who work all over the world. The site is non-commercial and the volunteers write about there time abroad. I'm for example in Jerusalem.
I Would like to use this Plugin. But I have different themes and I would like to hardcode the Plugin into the diebar.php of all the themes. So the visitors could see directly who is writing and where is she/he.
But I don't know how to modify this Plugin to get it into the sidebar. There are some fields I want to show and some I would like to hide.
Another idear is to get the country of the admin of a blog into the header. So if someone searches on BP for "Blogs" -> "Israel" BP could find it directly. At the moment you just can find blogs in reason of the titel the admin uses.
It would be so nice if you could help me a little bit… π
Wish you all the best and a lot of greetings from Jerusalem
Philipp
hi Phillip
Thanks for the comment π
I will be glad to assist you.
here is how you hard code it into the sidebar
$allowed_fields=array("show_avatar"=>"yes","field_1"=>"yes","field_2"=>"yes");
BpDev_BPProfile_Widget::bpdev_show_blog_profile($allowed_fields);
Please note, passing, the field id with the value "yes" makes the field visible for the current blog admin.
In the above example, It will show the field_i and field_2(field_1 is usually the full name)
Similarly you can extend it to nay fields.
For the second idea, seems good one, thinking about that π will let you know, if I come to some solution for that.
Yes this is what we were looking for too. Hardcode into sidebar from our earlier comment. Thanks!
Anyway that avatar could be click thru to profile and exchange table/tr/td for divs so we can re-style more easily.
Thank you so much! It's working fine.
But one question: I would like to put some space between the longest fieldname and the fielddata.
At the moment it as this:
CountryIsrael
Gender Male
The other Point: It would be such great if you could take a look, if it's possible to add the fields to the title, as I wrote before.
I think, that meny people would love to see it and meny of my users wrote why they can't find a blog from e.g. "Israel".
Thank you so much!
Philipp
Im getting this error…am I doing something wrong?
Warning: Invalid argument supplied for foreach() in /home/senior/public_html/wp-content/plugins/bp-profile-widget-for-blogs/bp-profile-for-blogs.php on line 113
I get the same errors
which version of Bp and wpmu you both are using, Please let me know.
Thanks
Brajesh
Hi,
Im using the latest WPMU 2.9.2 and Buddypress 1.2.2.1
Best,
Jafar
Please upgrade to version 1.1 which should be available in the wordpress.org repo in 5 minutes.
let me know if you still find any problem.
Thanks
Brajesh
The "name" points to http://SUBDOMAIN.DOMAIN.com/members/?s=NAME which ofcourse is a 404 link since only http://DOMAIN.com/members/?s=NAME works
Hi Edward
Thanks for reminding.
yes, this is something I need to change, will update here in next couple of days, currently it links the names(as done by bp automatically). That is the issue.
hi Edward
The linking is no more an issue in version 1.1, just stripped linking of fields.
Brajesh,
I'm getting an error on a specific blog and I'm not sure why. I've tried several themes and the problem persists. I'm guessing it has to do with the member:
Warning: Invalid argument supplied for foreach() in /home/housings/public_html/wp-content/plugins/bp-profile-widget-for-blogs/bp-profile-for-blogs.php on line 113
hi Greg
testing it with bp 1.2.2 now, will be posting an update soon.
Thanks
Brajesh
Updated the widget. It should be available in wordpress.org repo in a minute.
Improvement:- Should not throw the error.
No more linking of the profile data.
Brajesh,
This is probably the result of other problems I have, but I got this error when upgrading
Unpacking the update.
Installing the latest version.
Deactivating the plugin.
Warning: Cannot modify header information – headers already sent by (output started at /home/housings/public_html/wp-admin/admin-header.php:18) in /home/housings/public_html/wp-includes/pluggable.php on line 868
Removing the old version of the plugin.
Plugin upgraded successfully.
Attempting reactivation of the plugin
Plugin reactivated successfully.
hi Greg
Not sure about this problem. I just upgraded and did not see this issue.
Please do let me know, if the upgraded plugin works or not.
Thanks
Brajesh
Thank you for this excellent plugin! This is a very important piece to the whole buddypress puzzle!
For those who are looking to hardcode it so it shows in all blogs, I would like to suggest another plugin I found very useful, it's the blog defaults plugin (there are two of them, slightly different ways of deploying similar options across blogs).
I just installed with MU 2.9.2 and buddypress 1.2.2.1 – enabled sitewide, it shows in one test blog with the title "my profile" – but it is blank, nothing displays.. is this an issue with the version I am running?
hi Steve Media
Thanks for the comment. yes, instead of hardcoding, that blog defaults is much better to have same list of plugins themes/widgets across multiple blogs.
There are some issues with bp 1.2.1+wpmu in which the user level is not set for the admin users for the blog when the first time the blog is created. This is weird, but it is something I just found.
So, I will need to modify this plugin for wpmu2.9.2+bp .12.3. Please give m this weekend and i will be updating this π
Thanks
Brajesh
Brajesh,
I've just upgraded to BP 1.2.3. The profile widgets still work on existing blogs, but are blank on new ones.
Is this expected and the plugin needs an update? or might it be some other problem that I have?
Thanks!
hi Greg
Thanks for reporting. I checked with Bp 1.2.3. yes, there is a problem. When a blog is first created, I see the wp_user_level is not set, that's why this is causing the issue.
Please allow me this weekend to go by other option for finding admin users.
Thanks
Brajesh
Great plugin! Would love to know when this aspect is fixed.
hi Nathan
Thanks for the comment. I am working on finding the admin users by role. I have got even success but the finding users by role for blog is very much inefficient than the one I originally used(I used level_10). If I can not find a better option, will be updating it tonight with the roles thing.
updated in the plugin for buddypress 1.2.3.
Let me know if you find any issues.
Thanks
Brajesh
Hi Brajesh, thanks for working on an update.
Here's what comes up for me:
Warning: array_map() [function.array-map]: Argument #2 should be an array in /wp-content/plugins/bp-profile-widget-for-blogs/bp-profile-for-blogs.php on line 110
Warning: Invalid argument supplied for foreach() in /wp-content/plugins/bp-profile-widget-for-blogs/bp-profile-for-blogs.php on line 112
hi Nathan
Are you using it with wordpress Mu. This error should not occur on wpmu, If you are on single wp, the this error may occur. Let me know if you are on mu and which version of Mu.
Sorry, should have included that.
I'm on WPMU 2.9.2, Buddypress 1.2.3.
Using WPMU with sub-directories, not subdomains (if that matters)
Please put this line before line 110.
if(!is_array($role))
return;
It will solve the issue for now, but it would be great , if you can use a print_r on line 109 and get a dump of the value of $role
print_r($role);
As far as I see, if there is a blog, there must be some users with some role for the blog, and If it is not so, that means there must be something wrong with your installation/some plugin interfering with role.
Hi brajesh.
my problem is like as Nathan's problem .
i add
if(!is_array($role))
return;
before line 110
now , profile widgets is empty !!
Regards
Reza
hi Reza
Can you please provide me a dump of $role using either var_dump or print_r.
That will help me to see where the issue is. There is something which is wrong with roles I guess, Do you use any plugin like role manager etc.
Hello,
Thank you for the wonderful plugin.
I have a couple of questions.
1. I cannot see name, about and company fields, but only name.
2. Even if I check "name" it only shows his/her username, not the real name.
Did I do anything wrong?
Thank you.
Phil
hi Phil
Thanks for the comment.
1.Please check the widget options from appearance->add widget, when you add widget, you will get option in the widget to select which fields you want to show, you should tick the checkbox to make the fields visible.
2. It takes the name from BuddyPress xprofile, so please check and let me know if it is not showing the name shown by Buddypress.
Thanks
Brajesh
Hello Brajesh,
Thank you for your reply.
Please take a look at my screen capture.
As you can see from this picture, the only option that is available to me is the name.
http://img.skitch.com/20100501-xy2ae4y9nhjg2cx984bj7j6ju1.jpg
Even if I checked the name, all I can see is my username, not my first or last name. I entered my real name in the profile field.
http://img.skitch.com/20100501-pj644tmegmdhahtkiadabu7phf.jpg
Thank you.
Phil
hi Phil
Just checked your site too.
You are not getting other field in the widget since you have not created xprofile fields. You can create a few from wp-admin->BudyPress->Profile fields
2. On your site, I checked the activity stream and it is also using the username not the Full Name, so I guess, It has to do with the theme you are using. I am not seeing anywhere full name on your site(used by BP). Sio Please check again and make sure you enable the fields properly.
Hello I added one fields.
How can I add these fields for my existing members? I went to wp-admin > Users > Authors & Users. But there is no field to add new information.
Could you give me some tips please?
Thank you for your support.
Phil
@Phil
It is available from their buddypress profile like yoursite.com/members/membernme, There you can edit their profile, but the better thing is let the users do it them self.
it will be very helpfull if you provide a way to show that widget inside a wordpress page or post, i mean, like writting [profrile] inside post….
if you know the way please tell me.
tanks
Thanks for the comment Julian.
Currently, you can use the php functions to do that.Please check this one.
https://buddydev.com/buddypress/buddypress-profile-widget-for-blogs/comment-page-1/#comment-1054
In the next version, I will allow to use the short code, so thanks for the suggestion π
Is there a next version right now? I'm just looking to mover the widget to the top of the main page.
Do you want to Use shortcode ?
Well, Ya that would be ideal. I just made created an additional sidebar and placed your widget inside of that as a work around but a shortcode would be awesome.
Hello Brajesh,
I was trying your plugin with:
WordPress 3.0-RC1-15069 (Single)
BuddyPress 1.2.4.1
The widgets part of the plug allows me to selected which fields I wish to be displayed.
But when the widget is being displayed NO fields are shown π
Are you planning on updating the plugin to work with WP 3.x?
Thanks,
~ Pat
hi Pat
Thanks for the comment.
This plugin is not yet upgraded for wp 3.0 so you may encounter problems.
Please wait for a few more days, once wp3 is stable, I will update the plugin.
Hi Brajesh,
Any update on when this will be updated for 3.0. I'm having similar problems.
Hi Jim,
I am sorry, I completely missed to update this plugin.
I will update it within 2 days.
Thanks for reminding.
Brajesh
Hey Brajesh,
Thanks so much for a wonderful application.
How is the update development going? I'm launching a site tomorrow, and would like to implement it tonight if it's available.
Hi Jim,
I just updated this widget. It should be available in the wp repo in 5 to 10 minutes. Please upgrade. It will work with wp 3.0.1 and also allows you to list admins/any roles for current blog.
hope that helps.
Thanks
Brajesh
Excellent plugin, I think this is exactly what I've been looking for.
I'm currently building a community site where the blog owners will not all be admins though, some may be authors or editors depending on their membership levels. This is done to make it easyer to give different membership levels the appropriate level of service. None of them will have access to the wordpress admin panels.
It would be lovely if you could make it so the plugin would show editors and authors as well, each blog will only have one of these, either one author or one editor.
What would be very cool is if the links for inbox, groups, "edit profile" and so on could be shown to the logged in owner of the blog, and the "add friend" and "send message" links, the usual stuff for visitors, could be shown to those not owning the blog. It would be like a complete profile block with actions that could be placed in the blogs sidebar. Is this possible?
hi Rune,
Now you can list admins/authors/editors/ any other type of users with this plugin. I have just updated it and 1.2.1 enables that.
I will add the links section in next update. Just did not want to clutter the widget with settings.
The plugin is only showing my profile, not the profile of the blog's author.
Ah, I get it – the plugin is for blog admins only. Trouble is on my site there's only one main blog with users posting entries to the main URL. With this plugin every user's blog post shows my admin info.
Would it be possible to hack this plugin in any way so that it shows the user's/blog author's profile and not the admins?
Thanks.
Hi Henry.
Yes, absolutely. That's easy.
Please edit bp-profile-for-blogs and add the following code at the beginning of function "get_admin_users_for_current_blog" i.e on line 103 and on single post, it will list the current post author profile.
global $post;
if(is_single()){
$admins[]=$post->post_author;
return $admins;
}
Great, thanks a lot. I removed the { and it seems to work.
Any idea how I can retain paragraph breaks in the About section and make links automatically clickable, as they are in people's profiles?
I know CSS might be beyond your help, but thought I'd check.
Thx again.
HI Henry
The Links are deliberately made non clickable as it used to produce 404 as in most of the cases on profile page for auto linking test(that is an issue with bp, it auto links texts). I had removed that feature in newer release. It was already there in the first release.
For about page formatting.
.my-blog-profile p{/*use the css thing here*/}
Hope that helps.
Thanks
Brajesh
Hey Brajesh,
Thanks so much for the update to 3.0.1! One thing, I noticed, though, the avatars don't seem to be working. Any ideas?
Hello,
we use the plugin to show authors end editors on a separate page – not in the sidebar. It would be nice, to be able to sort the list alphabetical order.
Any suggestion is appreciated. And thanks for the great plugin.
Michael
it doesnt work i just installed it from wordpress.org and it doesnt show in my widgets list under appearence. im using wp 3.1.3
Hi
Appreciate your feedback on this.
I just tested by downloading it and on my wordpress 3.1.3 Multisite it appears in widget section and seems to be working fine. Are you trying to use it with Standard wordpress not the multisite ?
Please make sure you have enabled it Network Wide.
awesome plugin brajesh… real nice!
i realise my question is not related to the plugin directly… but wondergin if you can help me out.
On the "blogs" page in your buddypress… it lists out all the blogs across the network, along with the primary admin's avatar pic, and the blog name, along with the latest post and link to visit the blog… how can i also diaply the "NAME" of the blog admin on there.
Tried searching everywhere, but cant seem to get this one… any help would be greatly appreciated!
hello, this is just the thing i was looking for.. but i was wanting to hardcode it in the theme sidebar as well.
i tried the following:
"yes","field_1"=>"yes","field_2"=>"yes");
BpDev_BPProfile_Widget::bpdev_show_blog_profile($allowed_fields); ?>
and it didn't work. any ideas on how to do this?
also i was wondering if there was a way to change the text linking to the bp profile to say "visit my profile" instead of the name?
thanks in advance. π
also i forgot.. someone else had asked above as well but i didn't see an answer.. is it possible to make the avatar clickable to the bp profile?
thanks again.
Dear Brajesh,
Its a wonderful plugin; thank you very much. I have one problem though. De avatar should be placed before the name in order to get a neat list. This is how it looks now http://kennisportal.sednasoftware.com/category/blog
How can I change this?
Thank you very much in advance!
Hi, on my site it lists "Profile" at the top of the index page. Any way to remove that?
http://www.selfpublishingreview.com/blog/category/publishing-features/
Thanks,
Henry
Hi, Thank you fot the amazing plugin, I actually downloaded and it basically works but on my sidebar it shows all the users of the website (I mean like chosen membership level), I would like to show the profile information for only the logged in user, how do I make that possible? Please help.
It doesnt work i just installed it and doesnt show in my widgets list under appearence. im using WP 3.1.3 Multisite and Buddypress 1.5.1
Sorry WP version is 3.2.1
Please use version 1.2.2.
I have just updated it on wp.or repo and should be available in 10-15 minutes. That will fix the issue.
Hope that helps.
Is there any way to set it to show the author of the post? That's how it used to work – doesn't seem to work anymore.
Trying again: setting the widget to Contributor has a list of contributors, not just the post author. No other setting works. The beta site:
http://www.sprbeta.com/2012/01/sfsfsdf/
is profile widget for blogs still being supported here or ?
I noticed last reply over a year ago & Brajesh is usually on top of things pretty fast…
need to figure this out asap to go to private beta as its an important part in our set up case..
anyone dealing with my sort of an issue i posted above, any suggestions ?
THANK YOU AHEAD OF TIME BRAJESH OR ANYBODY WHO MAY HELP !
This isn't working with latest version of wordpress. Also, using it with any front -end page builder doesn't work as it calls the function βwp_dropdown_rolesβ which is only defined in the admin environment. Since itβs trying to call it on the front-end, a fatal error is being thrown causing the widget to bug out.
The author could circumvent this by adding the following code before that callβ¦
require_once 'wp-admin/includes/template.php';
Hi FF,
Thank you for reporting. It could be the case as the plugin was written around 5 years ago, I will certainly look into it and update this week.
Thank you for your suggestion about the fix too π
Regards
Brajesh
Please help. For some reason the widget only shows up to the Profile Fields Visibility header and the list of fields do not show up.
Hi Samuel,
I am sorry for the trouble. Seems some conflict.
Please post in our forum with more details(are you using any plugin/code for profile field privacy or conditions)
Thank you
Brajesh