Shape the future of Social networking with WordPress: Join Project Midnight Sun! The next generation platform for community building with WordPress!

BuddyDev

Search

Replies

  • Participant
    Level: Guru
    Posts: 922
    Tosin on in reply to: [Resolved] Buddyblog activity button #47683

    Hi I just noticed the the link also appears in the activities of other members instead of only displaying in the activity of the current logged in user

  • Participant
    Level: Guru
    Posts: 922
    Tosin on in reply to: [Resolved] Buddyblog activity button #47681

    Thanks Ravi

     add_action( 'bp_activity_entry_meta', function () {
    	global $activities_template;
    
    	if ( 'new_classified' == $activities_template->activity->type ) {
    		echo "<a href='https://www.site.com/manage-listings/' class='advert-edit-link'>Manage / Edit Ad</a>";
    	}
    } );
  • Participant
    Level: Guru
    Posts: 922
    Tosin on in reply to: [Resolved] Buddyblog activity button #47665

    Sure Brajesh I will do as instructed

    Apologies for the inconvenience

  • Participant
    Level: Guru
    Posts: 922
    Tosin on in reply to: [Resolved] Buddyblog activity button #47662

    Kind reminder sir thanks

  • Participant
    Level: Guru
    Posts: 922
    Tosin on in reply to: Buddyblog delete attached media #47633

    Hello sir,

    Any resolution yet

    Thanks

  • Participant
    Level: Guru
    Posts: 922
    Tosin on in reply to: [Resolved] Buddyblog activity button #47626

    I’ll take to your advice thanks sir

    just one more support needed

    How can I also add another activity meta button in (new_classified) activities linking to this page (manage-listings), this button would only be displayed in the activity type (new_classified) and not (new_blog_post)

    Thanks

  • Participant
    Level: Guru
    Posts: 922
    Tosin on in reply to: [Resolved] Buddyblog activity button #47595

    Would it also be possible to add the delete button to activity feed

  • Participant
    Level: Guru
    Posts: 922
    Tosin on in reply to: [Resolved] Buddyblog activity button #47594

    Hi Ravi

    Please kindly ignore as buddyblog was deactivated from the sitewide activity page

    This is now resolved

  • Participant
    Level: Guru
    Posts: 922
    Tosin on in reply to: [Resolved] Buddyblog activity button #47593

    I got the second one figured out by changing bp_activity_entry_meta

    Updated code below

     /* Add buddyblog edit button to activity feed */
    add_action( 'bp_activity_entry_meta', function () {
    	global $activities_template;
    
    	if ( ! function_exists( 'bblpro_get_post_edit_link' ) || empty( $activities_template->activity ) || empty( $activities_template->activity->secondary_item_id ) ) {
    		return;
    	}
    
    	$post_id = $activities_template->activity->secondary_item_id;
    	$form_id = bblpro_post_get_form_id( $post_id );
    
    	if ( $form_id ) {
    		echo bblpro_get_post_edit_link( $post_id, array( 'label' => esc_html( 'Edit / Promote Post' ) ) );
    	}
    } ); 

    Now I just need to display the button in the sitewide activity directory

  • Participant
    Level: Guru
    Posts: 922
    Tosin on in reply to: [Resolved] Buddyblog activity button #47592

    Hello Ravi,

    Thanks for the code but I need 2 adjustments

    1. I also want the button to show in the sitewide activity directory

    2. The button is being displayed in the (activity-inner) section instead of (activity-meta) section. I want the link to be displayed in the activity-meta area as an activity-meta button

    Thanks