Forum Replies Created
-
Make sure this exists on the page before the query:
global $wpdb;then try: “SELECT user_id FROM wp_bp_xprofile_data WHERE field_id = 13 AND value = ‘Yes'”;
or “SELECT user_id FROM wp_bp_xprofile_data WHERE field_id = 13 AND value = $attend_value”;
I don’t recall if you have to implode the $get_these_members array before passing it to bp_has_members, so check that too if the above queries don’t work.
In reply to: Profile Avatar Showing Wrong ImageI don’t think avatar folders are deleted when a user deletes their account.
But that shouldn’t matter because avatar folders are based on user_ids which are auto-incremented.Are you saying that all new members end up with the image in this folder:
/wp-content/uploads/avatars/10Do you have the same image selected as the default avatar under Settings > Discussion ?
Try changing that setting.
Try deleting the ‘over 15 avatar folders with images from old test users’
Try clearing your browser cacheIn reply to: How can I add additional info to members page?You may be interested in this premium plugin: BuddyProfileData
From PhiloPress
read:
try:
<h2 class="author-title"><?php printf( _x( 'by %s', 'Posts by...', 'buddypress' ), bp_core_get_userlink( $author_id ) ); ?></h2>In reply to: Geting input values in Edit Profile pageRemove all the changes listed above that you made to edit.php.
In functions.php, paste this:
function something_updated_profile( $user_id, $posted_field_ids, $errors ) { if ( empty( $errors ) ) { print_r( $posted_field_ids ); echo "<br>user id: " . $user_id . "<br>"; print_r( $_POST ); } } add_action('xprofile_updated_profile', 'something_updated_profile', 1, 3);read this:
https://codex.wordpress.org/Function_Reference/do_actionIn reply to: Geting input values in Edit Profile pageuse this hook:
do_action( 'xprofile_updated_profile', bp_displayed_user_id(), $posted_field_ids, $errors );found in:
buddypress\bp-xprofile\bp-xprofile-screens.php L. 125In reply to: Adding Dynamic Profile Link to Main Menu ItemTry using: bp_get_loggedin_user_username() instead of bp_loggedin_user_username().
bp_loggedin_user_username() will echo the name so it will be out of the sequence you expect.
In reply to: Flat Portal themeNice demo.
I like Flat Portfolio.>It uses Conditional queries for the privacy options
So not the usual slug checking ?The idea of a theme specifically for a portal with access options is interesting.
I’ll bet it’s tough to get noticed in the huge number of themes available, but good luck.In reply to: [Resolved] Filter email message contentTry this:
function change_bp_new_message_email_content($email_content, $sender_name, $subject, $content, $message_link, $settings_link) { $email_content = sprintf( __( 'You have one new message: Subject: %1$s "%2$s" To view and read your messages please log in and visit: %3$s --------------------- ', 'buddypress' ), $subject, $content, $message_link ); return $email_content; } add_filter('messages_notification_new_message_message', 'change_bp_new_message_email_content', 1, 6);In reply to: Disable notice to all users?Create a template over-ride for this file:
\buddypress\bp-templates\bp-legacy\buddypress\members\single\messages\compose.phpThen delete or comment out this:
<?php if ( bp_current_user_can( 'bp_moderate' ) ) : ?> <input type="checkbox" id="send-notice" name="send-notice" value="1" /> <?php _e( "This is a notice to all users.", "buddypress" ); ?> <?php endif; ?>In reply to: Members Only Content on a Page/Post> reveal new content to logged in members.
What kind of content? New content on the same page/post?
Access to members area?Provide a Use Case.
In reply to: How to disable Group Activity updates?change this:
<?php bp_get_template_part( 'activity/post-form' ); ?>to this:
<?php //bp_get_template_part( 'activity/post-form' ); ?>or just delete this:
<?php if ( is_user_logged_in() && bp_group_is_member() ) : ?> <?php bp_get_template_part( 'activity/post-form' ); ?> <?php endif; ?>In reply to: Add another edit screen under group admin settingsWhat screen are you using to create the custom post type “events” ?
In reply to: Add another edit screen under group admin settingsTricky one.
Does it have to be on a separate page?
Have you tried using jQuery to reveal a hidden div that shows the cpt fields and populates it with the selected event ?In reply to: Editing the BuddyPress site pagesCreate a folder in your theme called ‘buddypress’
Copy a single file into that folder.
For example, copy this file:
buddypress\bp-templates\bp-legacy\buddypress\members\members-loop.phpinto this folder:
yourtheme/buddypress/members/Then make a change to that file.
In reply to: Merge a BP site into a Non-BP siteTo be clear: the non-bp magazine site is a WP site?
This can be done but will be somewhat tricky.
You’ll need database access via something like phpMyAdmin.
I suggest it will be safer to merge the 2 sites into a third site.
I’m not aware of any docs re this type of merge.untested:
$activity_action = sprintf( __( '%1$s wroteDD a new post, %2$s, in %3$s', 'buddypress' ), bp_core_get_userlink( (int) $post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>', get_the_category_list( ', ', '', $post->ID ) );In reply to: Stop friend request after declining@elpix
There is a premium plugin from PhiloPress that lets members block each other.
Once a member has blocked you, there is no way to send a friendship request to that member until they unblock you.In reply to: Private Portal with BuddyPressSo you want to block
yoursite.com/members/
and
yoursite.com/activity/
from users who aren’t admins or editors ?But allow everyone to view
yoursite.com/members/my-profile?Then you might try putting a current_user_can conditional directly in the over-ride templates for those two pages.
[there surely is a way to write a function to do this, but it escapes me at the moment]
In reply to: Private Portal with BuddyPressPerhaps a simpler way, given that she wants to check for both admin and editor, is to test against a cap that both admin and editor have.
Something like: `function bp_my_restrict() {
if ( !current_user_can(‘edit_posts’) ) {
if ( bp_is_current_component(‘members’) || bp_is_current_component(‘activity’) ) {
bp_core_redirect( home_url() );
}
}
}
add_action(‘wp’,’bp_my_restrict’);`In reply to: Added a new tab but link doesn't work@eflouret
>Do you think that moving the templates to the main theme is wrong?No, it’s what you should do when you want to customize templates.
I thought you did it solely as part of your attempt to get the new nav item working.If you want, you can add new templates to that dir.
And call a template from your show_content function:function show_content() { locate_template( array( 'buddypress/members/single/my-trips.php' ), true ); }In reply to: Show members with certain roleChange break; to continue;
In reply to: Adding event to activity streamAgain – What are you using to create the form for submitting a review?
In reply to: Added a new tab but link doesn't work1. Not necessary
4. Try:
global $bp; bp_core_new_nav_item( array( 'name' => 'My Trips', 'slug' => 'mytrips', 'position' => 75, 'show_for_displayed_user' => true, 'screen_function' => 'my_trips_link', 'parent_url' => $bp->loggedin_user->domain . '/', 'parent_slug' => $bp->profile->slug, 'default_subnav_slug' => 'mytrips' ) );