BuddyDev

Search

Sitewide Activity Shortcode

  • Participant
    Level: Master
    Posts: 413
    Venutius on #5863

    Hi Brajesh, I’m struggling again, in this example, how would I exclude activity updates from the view?

    [su_box title=”Group Comments” style=”soft” box_color=”#a05060″ title_color=”#ffffff”][activity-stream object=groups primary_id=9 per_page=10 exclude=”activity_update” allow_posting=1][/su_box]

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #5879

    Hi George,
    Thank you for posting.

    The shortcode does not have a way to exclude action but you can include multiple actions. In other words, the exclude is used for excluding activity ids and not for the activity action/type.

    You can restrict the shortcode to limit to certain actions by using

    
    
    action="activity_update,activity_comment, other type etc"
    

    Hope that helps.

  • Participant
    Level: Master
    Posts: 413
    Venutius on #5883

    Thanks Brajesh, is there somewhere I can see a list of those available actions?

  • Participant
    Level: Master
    Posts: 413
    Venutius on #5884

    I added the following settings but it’s only showing the joined group, I’m not seeing new forum entries, am I doing it right?

    [activity-stream object=groups primary_id=9 per_page=5 action=”joined_group,new_forum_topic,new_forum_post”]

  • Participant
    Level: Master
    Posts: 413
    Venutius on #5885

    If I look at the standard drop down filter, I can see there are filter items for Updates, Group Updates, Group Memberships, Recent Gallery Updates, Show New Group File Directory, Show Group File Library Edits, Topics, Replies, New Docs, Doc Edits and Doc Comments. I’d like to display all of these except Updates, where would I get the right syntax for the action entry for your shortcode? Any ideas?

  • Participant
    Level: Master
    Posts: 413
    Venutius on #6105

    Hi Brajesh, I’m wanting to do a review of this plugin, but before I do I’d like to play with the action filters. Is there a list somewhere of available action filter types that can be used in this shortcode?

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #6119

    Hi George,

    Please take a look at all the options here

    https://github.com/sbrajesh/bp-activity-shortcode/blob/master/bp-activity-as-shortcode.php#L53

    The action filters are variable and depends on your installation. A New type can be added by any plugin. So, There is no fixed type. If you are loooking for the builtin activity type support by BuddyPess core, Please take a look at the dropdown or you may run this query in phpmyadmin

    
    SELECT DISTINCT type FROM <code>wp_bp_activity</code> ;
    
    

    That will give you all the filters used on your current site.

    Hope that helps.

You must be logged in to reply to this topic.

This topic is: not resolved