New
PeoplePress is here. Community building for WordPress, reimagined. Fast, modern, and built for the communities you've always wanted to run.
See it live

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25513
    Brajesh Singh on in reply to: [Resolved] Location one file in buddypress #21565

    🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    You are welcome 🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    Hi Pause,
    Here is how you can loop on that array and print the values.

    
    foreach ( $user_ids as $user_id ) {
    	echo "For User:".bp_core_get_user_displayname( $user_id ). ' Data:' . xprofile_get_field_data("Field Name", $user_id );
    
    }
    

    I thought the question was related to how do you get the ids to loop around it. This is just an example. You will need to create your own displayable content loop.

    Also, the previous code can be used any place. It does not need to be used in any loop. Since we are using BP_User_Query, BuddyPress needs to be active on teh site.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513
    Brajesh Singh on in reply to: [Resolved] comment plugin #21562
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    Hi Michaël,
    Thank you for the suggestion.

    It seems to me that this is more suited for our BuddyPress Moderation Tools plugin. Since we already have the functionality of user account moderation, we can add the option for site admins to restricted moderated user’s activity.

    The One Click Mark spammer is a tiny tool which marks a user as spammer(once a user is marked spammer, they can not login, their all data gets removed).

    I will be adding the option to restrict commenting for moderated user within next 2 releases of the moderation tools.

    Please correct me if I misunderstood the question.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513
    Brajesh Singh on in reply to: Branded Login for Buddypress #21560

    Hi Denna,

    Thank you for the question.

    I am not sure why the plugin is deactivating. Did you notice any pattern? Does it happen on saving some BuddyPress settings or something you can tell me.

    About the design, the plugin is aimed at theme developers. It helps adding 3 pages in theme which are themeable. The plugin mostly acts as router/action handler and does not handle the design part.

    That’s why you haven’t seen the optiosn.

    From our previous discussion, I recall that you prefer non code solutions. My suggestion will be to use a login customizer plugin that is mostly aimed at site admins to create better experience.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    Hi Vanessa,
    Thank you for using MediaPress.

    The width is hardcoded in css and that’s why it has scaled to 400px.

    I have moved away from this scaling and in the upcoming version, MediaPress uses flexbox layout in the lightbox to provide better experience.

    https://github.com/buddydev/mediapress/commit/d9245a4f7809a5459f39f49d60346683265fd721

    To apply this for now, Please replace wp-content/plugin/mediapress/assets/css/mpp-core.css with the contents from this page.

    https://raw.githubusercontent.com/buddydev/mediapress/master/assets/css/mpp-core.css

    Please let me know if that works or not?

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    The code gives you an array of the user ids who have that specific data in their profile. Now, you can loop through it anywhere and print the related information for users. It can be used at any place.

    You need to decide on what you want to fetch and print for each user.

    Please look at xprofile_get_field_data() for fetching field data for a user.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513
    Brajesh Singh on in reply to: Cannot retrieve xprofile field data #21545

    Hi,
    Can you please visit the profile of the specific user(You are passing as the second parameter) and confirm that on view profile the data is being shown for new fields?

    The possible reasons are:-
    1. Either data is not set for the given user for the new fields.
    2. Or the Field name is not being parsed to field id. Try using Field id(numeric value in place of field name).

    Let me know what you find.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25513

    Hi,
    Thank you for the patience.

    You can use the following query to fetch all users which have checked a specific option

    
    	$user_query = new BP_User_Query(
    		array(
    			'xprofile_query'  => array(
    				array(
    					'field'   => 16, // field id or name.
    					'value'   => 'multiselectbox 1', // value.
    					'compare' => 'LIKE',
    				),
    			),
    			'populate_extras' => false,
    		)
    	);
    
    	$user_ids = $user_query->user_ids;
    

    Make sure to change the value and the field id with your own.

    I hope you can take care of the loop to display the users from there.

    Regards
    Brajesh