Search Results for 'buddypress'
-
Search Results
-
Topic: Change words
How can I change these phrases given in the fields?
WordPress – v. 4.9.5
BuddyPress – v. 2.9.4
Site – https://puhkavi.com/
EditHi
I discovered that users (spammers in this case) can send private messages and spam other users even though their accounts are yet to be activated by WordPress.
Is this how Buddypress is designed or is this a bug?Regards
Hi- I’m about to ask a question which I’m sure has already been addressed on here, and I’m just not finding it. I know you can register CPTs with BuddyPress, but can you leverage this connection to allow members to limit the visibility of custom posts they are the author of? This is different from activity visibility.
In other words, User A only wants their friends to see their custom posts, and can assign these permissions, just like stuff on their profile.
Even if there isn’t an off the shelf way to accomplish this, I’m thinking that there has to be some hooks. Thanks!
Topic: Registration not working
Hello,
Im having an issue with BuddyPress Registration. When filled out, it wont go anywhere and it wont have a message like “Thank you for Registering” … It isnt registering the user, nor going to the email used to sign up with.
Is it legal to create a WordPress BuddyPress website using plugins like “BP Activity Share”and “Activity reactions For Buddypress”? As these plugins create share and reaction functionality just like Facebook.
Hello Buddypress community,
I am trying to remove the “last active” section of the membersloop. I have the membersloop file in my child theme within the buddypress->members folders. After deleting the correct code I saved the file and cleared all caches, but the changes are not taking effect.
Web page: http://mobileweb.guru/webdev/crowdwel/member-directory/
I have pasted my code below:
<?php
/**
* BuddyPress – Members Loop
*
* Querystring is set via AJAX in _inc/ajax.php – bp_legacy_theme_object_filter()
*
* @package BuddyPress
* @subpackage bp-legacy
*//**
* Fires before the display of the members loop.
*
* @since 1.2.0
*/
do_action( ‘bp_before_members_loop’ ); ?><?php if ( bp_get_current_member_type() ) : ?>
<p class=”current-member-type”><?php bp_current_member_type_message() ?></p>
<?php endif; ?><?php if ( bp_has_members( bp_ajax_querystring( ‘members’ ) ) ) : ?>
<div id=”pag-top” class=”pagination”>
<div class=”pag-count” id=”member-dir-count-top”>
<?php bp_members_pagination_count(); ?>
</div>
<div class=”pagination-links” id=”member-dir-pag-top”>
<?php bp_members_pagination_links(); ?>
</div>
</div>
<?php
/**
* Fires before the display of the members list.
*
* @since 1.1.0
*/
do_action( ‘bp_before_directory_members_list’ ); ?><ul id=”members-list” class=”item-list” aria-live=”assertive” aria-relevant=”all”>
<?php while ( bp_members() ) : bp_the_member(); ?>
<li <?php bp_member_class(); ?>>
<div class=”item-avatar”>
“><?php bp_member_avatar(); ?>
</div><div class=”item”>
<div class=”item-title”>
“><?php bp_member_name(); ?></div>
<?php
/**
* Fires inside the display of a directory member item.
*
* @since 1.1.0
*/
do_action( ‘bp_directory_members_item’ ); ?><?php
/***
* If you want to show specific profile fields here you can,
* but it’ll add an extra query for each member in the loop
* (only one regardless of the number of fields you show):
*
* bp_member_profile_data( ‘field=the field name’ );
*/
?>
</div><div class=”action”>
<?php
/**
* Fires inside the members action HTML markup to display actions.
*
* @since 1.1.0
*/
do_action( ‘bp_directory_members_actions’ ); ?></div>
<div class=”clear”></div>
<?php endwhile; ?>
<?php
/**
* Fires after the display of the members list.
*
* @since 1.1.0
*/
do_action( ‘bp_after_directory_members_list’ ); ?><?php bp_member_hidden_fields(); ?>
<div id=”pag-bottom” class=”pagination”>
<div class=”pag-count” id=”member-dir-count-bottom”>
<?php bp_members_pagination_count(); ?>
</div>
<div class=”pagination-links” id=”member-dir-pag-bottom”>
<?php bp_members_pagination_links(); ?>
</div>
</div>
<?php else: ?>
<div id=”message” class=”info”>
<p><?php _e( “Sorry, no members were found.”, ‘buddypress’ ); ?></p>
</div><?php endif; ?>
<?php
/**
* Fires after the display of the members loop.
*
* @since 1.2.0
*/
do_action( ‘bp_after_members_loop’ );I’d like to make it so that when a user clicks on their avatar on their profile page, a modal window appears in which they have the option to change their profile picture. In other words, I’d like to transclude the content of
/profile/change-avatar/into a modal window that appears when a user clicks their avatar on their profile page.Is there a shortcode for the change avatar functionality? If so, I can potentially put it into a modal box that pops up upon clicking the avatar. If there is no such shortcode, how can I get it there myself?
Hi,
I’m receiving the error 404 on each page for buddypress (profile, notifications, etc.)
I’ve searched the forum and found e.g. the tip with the permalinks. Mine are: /index.php/%category%/%postname%/
Any other ideas what this could be?I used before only bbpress forum but I decided to add also buddypress. I have old bbpress user profile custom fields that I created.
How to make they works on buddypress user profiles?
I don’t want to use default buddypress fields creator because I want to display some extra stuff like icons and extra text based on selected value, and default profile fields creator doesn’t offer this.
Here is code that I used:
// Display on User Edit Page add_action("bbp_user_edit_after_contact", "edit_gender_field"); function edit_gender_field() { // a random selection of genders $genders = array("Male", "Female"); // selected gender, if any $user_gender = bbp_get_displayed_user_field('u_gender'); ?> <label for="gender"><?php _e('Gender'); ?></label> <select name="gender" id="gender"> <option value="">Select your gender</option> <?php foreach ($genders as $gender) : ?> <option <?php selected($user_gender, $gender); ?>><?php echo esc_attr($gender); ?></option> <?php endforeach; ?> </select> <?php } // Save when updating // Our profile add_action("personal_options_update", "save_gender_value"); // Other users' profiles add_action("edit_user_profile_update", "save_gender_value"); function save_gender_value($user_id) { // exclude profile.php/user-edit update if (is_admin()) return; // update preference if (isset($_POST['gender']) && $_POST['gender']) { return update_user_meta($user_id, "u_gender", sanitize_text_field($_POST['gender'])); } else { return delete_user_meta($user_id, "u_gender"); } } // Display on User Profile Page add_action("bbp_user_profile_gender", "display_gender_value"); function display_gender_value() { // selected gender, if any $user_gender = bbp_get_displayed_user_field('u_gender'); // making sure user has set their gender first if (!trim($user_gender)) return; // all good if ($user_gender == 'Male') { return printf('Some stuff to display if user is %s', esc_attr($user_gender)); } if ($user_gender == 'Female') { return printf('Some stuff to display if user is %s', esc_attr($user_gender)); } }I guess that I should change action
personal_options_update. I found in web something like thatxprofile_data_before_savebut it doesn’t work.Also I think that I should change
bbp_get_displayed_user_field. I changed toxprofile_get_field_databut it doesn’t work too.Maybe I’m doing something wrong. Please help me if you know how to make it work.
Hello
I’ve installed a theme “travel log ” with buddypress. But the problem is when you go to register page ,it always show the contents of right sidebar as showed in blog pages like search,recent articles,Categories,comment,…
Not beauty and Clarity. It’s same when you create a new group,for example like this
https://mmdgo.com/forums/How to remove thess sidebar contents for register page and group page?
The page I need help with: https://mmdgo.com/%e6%b3%a8%e5%86%8c/
Hi,
Below two code, i can create buddypress activity for Book CPT (1st code) with title (2nd code) … Member A publish new “best horror book last 10 years” ( with Title)
I have 2 question:
1st: When anyone comment this activity : It shows Member B comment a “Book” i could not success the display post title instead of “Book (CPT)” . i need to dispaly Member B comment “best horror book last 10 years”
2nd question If 1st can possible ‘bp_activity_new_comment’ => __( ‘%1$s commented BOOK‘, ‘custom-textdomain’ ), is possible Member B comment on the “best horror book last 10 years” by Member A (with post author name or avatar) … mİLLİON Thanks
cODE1
// allow tracking of our CPT
add_post_type_support( ‘book’, ‘buddypress-activity’ );
// creating the dropdown filter on activity and members page
function customize_page_tracking_args() {
// Check if the Activity component is active before using it.
if ( ! bp_is_active( ‘activity’ ) ) {
return;
}
bp_activity_set_post_type_tracking_args( ‘book’, array(
‘component_id’ => ‘activity’, // unique ID
‘action_id’ => ‘new_book’, // new_$post_type where new_ is mandatory
‘comment_action_id’ => ‘new_mot_comment’,
‘bp_activity_comments_admin_filter’ => __( ‘Comments about book’, ‘custom-textdomain’ ), // label for the Admin dropdown filter
‘bp_activity_comments_front_filter’ => __( ‘Book Comments’, ‘custom-textdomain’ ), // label for the Front dropdown filter
‘bp_activity_new_comment’ => __( ‘%1$s commented BOOK‘, ‘custom-textdomain’ ),
‘bp_activity_admin_filter’ => __( ‘Published a new BOOK’, ‘text-domain’ ),
‘bp_activity_front_filter’ => __( ‘bOOK’, ‘text-domain’ ),
‘contexts’ => array( ‘activity’, ‘member’ ), // swa & member activity page
‘activity_comment’ => true,
‘bp_activity_new_post’ => __( ‘%1$s publish a new bOOK‘, ‘text-domain’ ),
‘position’ => 100,
) );
}
add_action( ‘init’, ‘customize_page_tracking_args’, 999 );
code2 FOR DISPLAY NEW BOOK PUBLISHED WITH TITLE
function monkey1980_include_post_type_title( $action, $activity ) {
if ( empty( $activity->id ) ) {
return $action;
}
if ( ‘new_book’ != $activity->type ) {
return $action;
}
preg_match_all( ‘/<a.*?>([^>]*)<\/a>/’, $activity->action, $matches );
if ( empty( $matches[1][1] ) || ‘Book’ != $matches[1][1] ) {
return $action;
}
$post_type_title = bp_activity_get_meta( $activity->id, ‘post_title’ );
if ( empty( $post_type_title ) ) {
switch_to_blog( $activity->item_id );
$post_type_title = get_post_field( ‘post_title’, $activity->secondary_item_id );
// We have a title save it in activity meta to avoid switching blogs too much
if ( ! empty( $post_type_title ) ) {
bp_activity_update_meta( $activity->id, ‘post_title’, $post_type_title );
}
restore_current_blog();
}
return str_replace( $matches[1][1], esc_html( $post_type_title ), $activity->action );
}
add_filter( ‘bp_activity_custom_post_type_post_action’, ‘monkey1980_include_post_type_title’, 10, 2 );