BuddyDev

Search

[Resolved] how to change active 10 hours, 43 minutes ago with xprofile feild

  • Participant
    Level: Enlightened
    Posts: 31
    Valarie Bakkar on #6272

    Hi, is there any way to change this line “active 10 hours, 43 minutes ago” from buddypress profile? and i want to remove this line and want to set this place for occupation/or something else from xprofile feild.

  • Keymaster
    (BuddyDev Team)
    Posts: 24599
    Brajesh Singh on #6286

    Hi Valarie,
    can you please visit Dashboard->Users->Profile Fields and post the the name of the Xprofile Feid(or their id)

    It is doable, I will need those two details.

    Thank you
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 31
    Valarie Bakkar on #6294

    Wow, so really its possible? thanks a lot man… for example this is the feild ID = field_id=8382

  • Participant
    Level: Enlightened
    Posts: 31
    Valarie Bakkar on #6353

    any help?

  • Keymaster
    (BuddyDev Team)
    Posts: 24599
    Brajesh Singh on #6355

    Please use this in bp-custom.php

    
    
    function buddydev_filter_last_activity_with_profile_data( $time, $user_id ) {
    
    	$field_id = 8382;//change the field ID
    	return xprofile_get_field_data( $field_id, $user_id );
    }
    add_filter( 'bp_get_last_activity', 'buddydev_filter_last_activity_with_profile_data', 10, 2 );
    
    
  • Participant
    Level: Enlightened
    Posts: 31
    Valarie Bakkar on #6365

    wow its working, thanks a lot

  • Keymaster
    (BuddyDev Team)
    Posts: 24599
    Brajesh Singh on #6371

    That’s good to know. Marking it as resolved.

The topic ‘ [Resolved] how to change active 10 hours, 43 minutes ago with xprofile feild’ is closed to new replies.

This topic is: resolved