BuddyDev

Search

[Resolved] Conflict of BP Moderation Tools with Theme

  • Participant
    Level: Enlightened
    Posts: 83
    Princy Cromacio on #42037

    Hi There,
    As Shared Before, I use Metafans Theme.

    The Button to Report Activties aren’t Shown on the Sitewide Activty Page, as the Theme Customizes the Activity Cards a Lot.! Do Let Me Know if There’s Anything I Can do.

    Thanks in Advance 🙂
    Cromacio

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2459
    Ravi on #42040

    Hello Princy,

    Thank you for posting. I will take a look at the problem and will let you know.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2459
    Ravi on #42048

    Hello Princy,

    Try the following code:

    
    
    add_action( 'bp_footer_actions', function () {
    
    	if ( ! function_exists( 'bpmts_moderation_tools' ) || ! bpmts_is_item_valid_reportable_type( 'bp_activity', bp_get_activity_id() ) ) {
    		return;
    	}
    
    	$activity_ui = new PressThemes\ModerationTools\Reportable_Types\BuddyPress\Activity\Handlers\Activity_UI_Helper();
    
    	$activity_ui->add_button();
    } );
    

    Let me know if it works or not.

    Regards
    Ravi

  • Participant
    Level: Enlightened
    Posts: 83
    Princy Cromacio on #42053

    Hi Ravi,
    Thanks for This.

    The Button is Enabled for Sure, But the Image on the Button doesn’t Get Displayed.
    And Even I Could Find Two Different Buttons with Same. Tried Disabling Moderation Tools, And None of Them Remain.

    I Could Hide the Extra Button using CSS, as Both of them Have Different Classes.
    Just Needed Help with the Display of Image/Icon of the Report Button.

    Thanks. 🙂
    Cromacio

  • Participant
    Level: Enlightened
    Posts: 83
    Princy Cromacio on #42054

    If You Need to See What I Meant- https://prnt.sc/22xs5xd

    If I Can Add It to The Header Section of Activity Card, Where The Mark as Favourite Button is Shown, instead of the Usual Button at Bottom of Activity, It Would be More Better to Prevent False Reports. This Will Be My Secondary Question though, What I Need is About the Image, if The Issue is Due to Incorrect or Missing Image File from my Server, Could I I Hide the Icon Entirely?

    Thank You

  • Participant
    Level: Enlightened
    Posts: 83
    Princy Cromacio on #42055
    This reply has been marked as private.
  • Participant
    Level: Enlightened
    Posts: 83
    Princy Cromacio on #42074

    Hi Ravi,
    Thank You for the Code,

    Thought that the Button was Called Twice in the Code,
    and Worked Perfectly after removing Last Line.

    Thank You 🙂

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2459
    Ravi on #42075

    Hello Princy,

    Thank you for the acknowledgment. I am glad that the issue is resolved.

    Regards
    Ravi

You must be logged in to reply to this topic.

This topic is: resolved