Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hide Reply button on certain activity types


  • chr313
    Member

    @chr313

    Hi everyone, I’m trying to hide the reply button on the activity stream where the activity type = ‘new_forum_post’ or ‘new_forum_topic’. I can see in the wp_bp_activity table the field type but I do not know how to check for this field in bp.

    In wp-content/themes/bp-addata/activity/entry.php around line 30 I found the conditional for the reply link, I just need to add some more conditionals to check if the activity is type ‘new_forum_post’ or ‘new_forum_topic’ to not show the reply button. I have the code below which i thought i had pulled the field i needed to preform the check on that type field.

    http://chr313.powweb.com/1.2.9/

    Thank you for the any help,


    if ( (is_user_logged_in() && bp_activity_can_comment()) && ($activity_obj->type != 'new_forum_post') ) :
    reply button
    endif;

Viewing 5 replies - 1 through 5 (of 5 total)

  • rich
    Member

    @etivite

    you can disable commenting on forum posts + blog post via the bp settings.

    otherwise
    https://wordpress.org/extend/plugins/buddypress-activity-stream-extras/ – you can select the activity types to disable replies on.


    chr313
    Member

    @chr313

    @etivite duh wow sorry i did not see that option. This will work, thanks again!


    chr313
    Member

    @chr313

    @etivite one last question does your plugin allow to hide replys on the creation of groups and join of group notifications on the activity stream? I did notice the option under setting removed the replys to the forum posts and new forums posts which is perfect, but not the creation and joining notifications.

    Thank you,


    rich
    Member

    @etivite

    the block activity types plugin will stop those items from being saved into the database.


    chr313
    Member

    @chr313

    @etivite thank you. I found your plugin page as well. Has a lot of things that I need. Thank you for all your help, have a great thanksgiving!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Hide Reply button on certain activity types’ is closed to new replies.
Skip to toolbar