Forum Replies Created
-
And, for anyone interested, here are other Buddypress specific functions it has – very impressed btw:
1. control the Buddypress member profile page meta title such as %%bp_user_full_name%% | %%sitename%% or whatever you prefer
2. also allows you to edit the Buddypress member profile meta description as well
3. include Groups in sitemaps
4. includes Profiles in sitemaps (as noted in previous post)(Just wanted to share this in case you wanted to know in advance as this plugin is only available to paid WPMU Dev subscribers. This is in addition to all the other standard seo related features but listing Buddypress specific features above in case you wanted to know)
For anyone interested, switching to WMPU Dev’s Smartcrawl has allowed us to automatically add all members to the sitemap. It also allows you to exclude specific roles in case you have Admins you’d like to exclude from the sitemap. While Yoast has been our goto plugin, Smartcrawl appears to hold it’s own – especially when it comes to Buddypress. Here’s a link for more info.
However, if anyone knows how @mugwumpman was able to create the members-sitemap.xml and work with Yoast, would still be great to know – thx!
@ashrod, hope this helps. This fades in a tooltip by animating the member’s name in a black box with arrow pointing up towards the avatar on hover. It may need tweaking for your site and hope other’s can improve and optimize this further. I needed a quick solution to work with the Woffice theme by Alkaweb and is working well for me so far.
If you want to see this in action, just copy this and go to Woffice demo site using Firefox + Firebug and copy paste into the style editor tab and hover over the who’s online avatar to see the tooltip.
.avatar-block a { width: 50px; height: 50px; /* change to whatever your avatar size is */ display: inline-block; position: relative; } .avatar-block a:after { content: attr(data-bp-tooltip); font-size: 10px; position: absolute; z-index: 999; background: #000; color: #e0e0e0; padding: 2px 5px; line-height: 15px; opacity: 0; transition: opacity 0.4s ease-out; top: 55px; /* based on a 50x50 avatar and places the tooltip 5px below */ text-align: center; margin-left: -50%; left: 0; width: 100px; pointer-events: none; border-radius: 3px; } .avatar-block a:before { /* this is the arrow pointing up */ content: ''; position: absolute; left: 20px; top: 50px; /* based on a 50x50 avatar and places the tooltip 5px below */ width: 0; height: 0; transition: opacity 0.4s ease-out; opacity: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 5px solid #000; clear: both; z-index: 999; pointer-events: none; } .widget.buddypress div.avatar-block { overflow: visible !important; } .avatar-block a:hover:before, .avatar-block a:hover:after { opacity: 1; } .avatar-block .item-avatar { display: inline-block; }
Thanks very much Henry, greatly appreciated.
Apologies for the delay – we have since added Buddydev.com’s Member Types Pro and Profile Visibility Manager so that we can update access on the fly with the various types of users we are growing into.
I’ve save your code for future though and thx again!
@flashvilla, hope this helps:
I’m using Gravity Forms to display a contact form on each member profile page and dynamically populating a hidden field with the member’s email address.
Here’s info on dynamically populating a field in GF
Their example:
add_filter( 'gform_field_value_your_parameter', 'my_custom_population_function' ); function my_custom_population_function( $value ) { return 'boom!'; }
I have changed this to:
add_filter('gform_field_value_bp_member_email', 'bp_member_email'); function bp_member_email($value){ return bp_get_displayed_user_email(); }
In Gravityforms, I have then created a hidden field and in the advanced tab of that field, checked “Allow field to be populated dynamically” and entered the “Parameter Name:” as “bp_member_email”
Then, in the notifications, the “Send to Email” should be changed from a standard email to a Gravityform tag. You can get that by clicking the little arrow key beside many fields such as “From Name” box. Find the name of your hidden field and click that. It should give you something like this: {BP Member Email:7} where “BP Member Email” is the name I gave the hidden field – yours will be whatever you named it.
You’ll also need to embed the form to your child theme: /themes/yourchildtheme/buddypress/members/single/home.php
Details on how to embed into your theme can be found here. Example: (where 1 is the ID of your form and 12 is the starting tabindex)
<?php gravity_form(1, false, false, false, '', true, 12); ?>
If this worked, you can view the source code of the member page and you’ll see the member’s email as an input value in the hidden field.
Hope this helps!
Please note: if you can’t have the person’s email displayed publicly in the source code for privacy (even though it’s not visible on the site), you will need an alternative method. Members on my site all have their emails visible so it’s not an issue for me.
Note some steps could be missing here but hope this helps with the general direction 🙂
1. Look for “Users” in left sidebar of WordPress wp-admin area
2. Click “Profile Fields” and there should be a box which you might have named “Terms of Use” – NOTE: if you changed the “Name (Primary) (Required)” to your terms of use field, you should change this back as it syncs with the person’s name
3. Click the blue button “Add New Field” and name it “By registering to ThoseCrazyVegans.net, you agree to the <a href="/terms-of-use/">Terms of Use</a>
” (the title accepts HTML at least for now)
4. Then, choose “Checkboxes” for the “Type” below it and type “Yes, I agree to the terms of use” and don’t check Default Value
5. You can also choose “requirement” as required
6. Choose “enforce field visibility”
7. Then click updateI use a different method for registering but hope this helps.
(Sorry having difficulties posting to the forum. Apologies for duplicate replies… Wish there was a way to delete)
UPDATE: found possible solution (?) by going into profile fields section in both dashboards and clicking “edit” and “update” for the required name section. This then appears to have reset things. Now the name updates in both Extended Profile tab and the WordPress default Profile tab when making an edit in the member profile page.​
FYI: I have found several times now that there are strange quirks but I’m sure it is 99% user error (mine) but not everything is straightforward such as this above. To find this method took quite some time trying every standard option and the last was clicking every option over again…
So close isn’t it? This and scheduling could be an answer to a multi BuddyPress network on separate servers… WPMU offers 30 day free membership to check it out. They require a credit card to signup, but well worth it for all their other tools.
@rhythmelody, in case you’re interested to vote up a request for this feature to be added to WPMU’s User Sync plugin, pls head over to their site here.
In the meantime, we have opted for a multisite ourselves.
I believe you could add the terms and a checkbox as a requirement as part of the BuddyPress Extended Profile. Instead of the text box you added for “terms of use”, you can remove that and add a single checkbox with the words “by registering…”. Hope this helps!
@rjt1985, wondering if you are still having any issues or if you have found the specific reason it worked itself out.
We were experiencing a similar issue but could not find the reason. Our solution was to use GravityForms (developer version) instead by creating a custom registration form which also works directly with BuddyPress extended profiles.
Much appreciated @eskamediawork!
Btw, the option provided in your link works really well especially if you have a subscription to WPMU to ensure the plugin receives updates through their membership.
And just in case for those looking for a non-plugin option, hope the wp-config option works well too.
Thx for the suggestion!
Update: we have found that with a multisite with multiblog enabled to share the member list from the parent across all the child sites, code to filter out roles such as “administrator” only work if that user is also added to the child site.
Example:
Does not work in this scenario:
– parent site setup with user “johnadmin” with admin role is hidden on parent site directory
– child site without this user created does not hide him from the site directoryWorks in this scenario:
– parent site setup with user “johnadmin” with admin role is hidden on parent site directory
– child site ALSO setup with user “johnadmin” with admin role is hidden on child site directoryFor anyone wondering, the code that is partially working for us is below found at buddydev.com. This code has been added to the functions.php in the child site so that we can control what the child site loop shows individually. (example: parent shows everyone, child 1 shows only subscribers, child 2 only shows x, child 3 only shows y, etc.)
Would super appreciate any suggestions thx!
add_filter( 'bp_after_has_members_parse_args', 'buddydev_exclude_users_by_role' ); function buddydev_exclude_users_by_role( $args ) { //do not exclude in admin if( is_admin() && ! defined( 'DOING_AJAX' ) ) { return $args; } $excluded = isset( $args['exclude'] )? $args['exclude'] : array(); if( !is_array( $excluded ) ) { $excluded = explode(',', $excluded ); } //$role = 'administrator';//change to the role to be excluded $user_ids = get_users( array( 'role__in' => ['administrator' , 'contributor' , 'author', 'editor'] ,'fields'=>'ID') ); $excluded = array_merge( $excluded, $user_ids ); $args['exclude'] = $excluded; return $args; }
If you simply looking to redirect people from 1 url to another, perhaps you could try the Redirection plugin?
Update: I have tried as many methods found in this Support Forum including bp-custom.php, functions.php, different wp-config.php options.
The one that worked for us is via a wp-config.php modification with code from @boonebgorges here: buddypress.trac.wordpress.org/ticket/4252
// This assumes that the blog in question is #1. If it's not, the path will // have blogs.dir in it define( 'BP_AVATAR_UPLOAD_PATH', '/var/www/html/example/wp-content/uploads' ); // Again, assuming you're coming from #1. To pull from a different blog, // it'll be example.com/secondaryblog/files or something like that define( 'BP_AVATAR_URL', 'http://example.com/wp-content/uploads' );
Also wanted to share that if we add bp-custom.php and add various fixes suggested by others it results in a fatal error with a call to undefined bp_core… perhaps there is a different issue causing other fixes to not work for us… Open to try other suggestions but so far so good with fix above.
(apologies for the double post – pls delete if possible thx)
Answering my own question:
Yes: enabling multiblog can work on a password protected site and public site.
(if this post can be deleted pls delete)
+1
We would like to know how to do this as well.