Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hack: Remove Reply/Favorite buttons from activity stream on certain types

  • quick and dirty hack (if a better way, please let me know – php is not my forte)

    add a function to your hacks/function.php file with the excluded activity types

    function my_denied_activity_meta_check($type) {
    return in_array($type, array( 'bp_link_vote', 'friendship_created', 'new_forum_post') );
    }

    then on the theme file activity/entry.php add this to the if statement (for either/or comment/favorite links)

    !my_denied_activity_meta_check( bp_get_activity_type() )

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thank you for this hack. It does exactly what I need it to!

    Can’t help but think this is simply overcomplicated for the end result! (not your attempt per se rich) Just makes me think there are simpler approaches and roll on a re think of the API and templating.

    yeah this is a bit old but i agree – there needs to be a better way to control activity_types and what you can do with them (from commenting, meta actions, etc)

    Perhaps your way does work, but then it needs to be permenant along with a sort of light switch series of user configurable parameters in the activity entry loop sort of:
    ## user config options ##
    // 0 = off 1 = on
    $bp_link_vote = ‘0’;

    That’s not correct but I do something similar quite often with other stuff, I think there’s a far simpler approach for the end user somewhere.

    Haven’t really time to think this through but your approach is correct but the conceptual one isn’t? how about two arrays one containing all the meta actions in functions.php the second is in the entry.php – in the second the user sets the the ones they want/don’t want then the two arrays are compared.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Hack: Remove Reply/Favorite buttons from activity stream on certain types’ is closed to new replies.
Skip to toolbar