Forum Replies Created
-
In reply to: Edit fields in members directory
It would be better if you added your custom code to
bp-custom.phprather than to a theme. (When the theme is updated, you’ll lose your changes.)About
bp-custom.php: https://codex.buddypress.org/themes/bp-custom-php/To insert those fields, you’ll just have to change you code, replacing
'field=Location'with the name of your profile field. Here’s some more info: https://codex.buddypress.org/themes/guides/displaying-extended-profile-fields-on-member-profiles/In reply to: Change details bp_last_activityThat’s an interesting idea. It seems like it should be possible, because BuddyPress is using a JavaScript library called
livestampto generate those strings. It relies onmoment.jsfor localization (localization usually means translation, but could also mean “custom messages”). I think you could change the “relative time thresholds” as described here:
http://momentjs.com/docs/#/customization/relative-time-threshold/In reply to: deny access to subscriber profileOK, that’s a different issue, ha ha. You’ll have to instead of preventing access to the entire user profile, prevent access to the user profile tab on the user’s profile. Clear, right?
You’ll need to use the Navigation API.
This should get you close: https://gist.github.com/dcavins/e7708f2a58aab16b61bbf7b06acf9756
In reply to: Post Update in groups sometimes hangsCheck the plugin’s GitHub page, where work is currently ongoing to solve the issue.
In reply to: Mobile friendly registration?CSS. Something like this will fix up the default form:
@media (max-width: 600px) { #buddypress .standard-form #profile-details-section, #buddypress .standard-form #basic-details-section { float: left; width: 100%; } }In reply to: Buttons Turn Grey when HoveringHi, it looks like this rule is what’s active when hovering on your registration form, so I suspect it’s what you’ll need to override:
https://buddypress.trac.wordpress.org/browser/tags/2.9.3/src/bp-templates/bp-legacy/css/buddypress.css#L956In reply to: Display email in frontendThe user can edit his or her email address via their profile > settings tab. You could add a link to that page like you’re doing above, with a link like “Change your Email Address” or similar.
I’m not sure what you mean about radio buttons. They should look like this:
• Option One
• Option Two
• Option ThreeAnd those items are called “options” in the profile field manager.
In reply to: Post Update in groups sometimes hangsIf you’re using BuddyPress Group Email Subscriptions, posting updates can take a long time because the plugin has to do a bunch of work to create the email notifications for all the group members. The devs are working to resolve the issue, but my crystal ball says that’s what you problem is, lacking more information.
In reply to: deny access to subscriber profileHa,
bp_is_profile()isn’t a function. This works:
https://gist.github.com/dcavins/c5bb41691846b809c30c72230c3c5adfIn reply to: New user Activation email is not receivedHi there-
There’s a known issue with outlook/hotmail emails being rejected:
https://buddypress.trac.wordpress.org/ticket/7697#comment:7A fix is forthcoming (but there’s no timetable for that update).
In reply to: deny access to subscriber profileHa, that’s because there was an extra semi-colon. Try this:
add_action( 'wp', function() { if ( bp_is_profile() ) { $user_meta = get_userdata( bp_displayed_user_id() ); if ( in_array( 'subscriber', $user_meta->roles ) ) { wp_redirect( home_url() ); exit; } } }, 1 );What I was saying about roles is that WordPress handles roles. BuddyPress doesn’t create or really use them that much.
Make sure you’re seeing what your subscriber users see. As a site admin, you can see everything. As a limited user, private forums don’t show up, unless the user has access to it.
In reply to: Groups – Create Not Working ProperlyHi @franciscofgb, if you’re having a caching issue, you’ll have to solve it from the caching end. If that’s not the issue, try deactivating your other plugins one at a time to see if the issue resolves itself. In a vanilla BP install, I’ve never run into the problem you’re describing.
In reply to: deny access to subscriber profileHere’s some untested code that should prevent anyone from visiting the profile of a subscriber user. Roles are not a BP construct, so you’ve got to look to WordPress for that info.
add_action( 'wp', function() { if ( bp_is_profile() ) { $user_meta = get_userdata( bp_displayed_user_id() ); if ( in_array( 'subscriber', $user_meta->roles; ) ) { wp_redirect( home_url() ); exit; } } }, 1 );In reply to: add link to Skype account to user profileBoone wrote something that might be helpful: https://github.com/boonebgorges/bp-social-media-profiles/
It automatically converts some social site links in extended profile fields into the right kind of link.
In reply to: Set textfield max charactersThat depends on where you’re using it. You could use a
bp_signup_validatefilter to check that a username has certain characteristics. But for profile fields or other places, you’d have to enforce it some other way.Here’s an example of how you might disalloe long usernames:
add_action('bp_signup_validate', function() { if ( isset( $_POST[ 'signup_username' ] ) && strlen( $_POST[ 'signup_username' ] ) > 60 ) { $bp = buddypress(); $bp->signup->errors['signup_username'] = 'Geez, your username is really long.'; } } );Forums created in association with private or hidden groups are created as private forums. (They’ll only show up in the big forums list if you can see them.) Forums associated with public groups are not private–anyone can visit your-group/forum. They will show up in the big list. Visit
/wp-admin/edit.php?post_type=forumto verify that private forums are set to private.In reply to: Group user list doesn’t work correctlyHere’s another report of this with a suggested fix: https://buddypress.trac.wordpress.org/ticket/7704
In reply to: Error in notification buddypressYou might looks at adding an email using the BuddyPress email system: https://codex.buddypress.org/emails/custom-emails/
In reply to: User Tag in ProfileMaybe you could use friend relationships for this. If the “friend” terminology doesn’t make sense for your use, there is a plugin that creates one-way relationships called “follows” https://wordpress.org/plugins/buddypress-followers/
In reply to: Allow Moderators to see private messages?Hi James, I guess it depends on what a moderator is. (I can only think of Group Mods in BP, not sure what would count as a site-wide moderator.)
The ability to see private messages is controlled by the check
bp_current_user_can( 'bp_moderate' )which is true for site or network admins.You could probably filter that value for some other role, like editor, but it would be a bit complicated to make it work only for private messages. Here’s more information about working with the WP capabilities system: http://mannieschumpert.com/blog/wordpress-capabilities-magic-with-map_meta_cap/
In reply to: Let users react to forum posts?The forum functionality is provided by bbPress. I’m not aware of any plugins that add the feature you’re requesting, but the bbPress forums are probably a better place to ask:
https://bbpress.org/forums/In reply to: email verificationIf you are asking about bbPress, try the bbPress forum.
If you’re asking about removing the BuddyPress email verification step for new accounts, there are several plugins that do that:
In reply to: Duplicate Description in user fieldIt looks like your
buddypress/members/register.phpfile is based on an old version of the template (that had the field description hardcoded in the template). You’ll need to remove this line:
<p class="description"><?php bp_the_profile_field_description(); ?></p>in that file.
In reply to: BuddyPress and Custom HTML emailsThere is an issue with hotmail/outlook rejecting activation emails (See the fix here: https://buddypress.trac.wordpress.org/changeset/11862).
Otherwise, the best way to customize your emails is explained here: https://codex.buddypress.org/emails/