Activity

  • Christopher Williams replied to the topic Activity page: number of items, how to adjust? in the forum BuddyBoss 3.0 10 years, 1 month ago

    BuddyPress Activity Shortcode allows you to embed buddypress activities in posts/pages using shortcodes.
    Here is a sample use example
    [activity-stream]
    That will list the most recent 5 activities.

    Here is the way you can specify options
    [activity-stream option_name=option_val option_name2=option_val2 and so on]
    The accepted parameters:-
    title(string) :- what should be the title of the activities section
    pagination(int):- 0 or 1(do you want to hide or show the activity pagination at the bottom of the list)
    display_comments(sting, int):- possible values are threaded|stream|0(use 0 to hide activity comments)
    include(int|string):- individual activity id or comma separated list of activities, useful in case you want to list specific activities
    exclude(int|string):-individual activity id or comma separated list of activities, useful in case you want to exclude specific activities from the list
    sort(string):- ASC|DESC (how to sort the activities in ascending or descending order)
    page (int):- which page to load, e.g 1st page or 10th page of activity
    per_page(int):- How many activities per page(default is 5)
    max(int):- Limit the maximum no. of activities to be included in the list
    scope(string):- – pre-built activity filters for a user (possible values are friends/groups/favorites/mentions)
    user_id(int):- If you want to list a particular user’s activity
    object(string):- object to filter on e.g. groups, profile, status, friends(what type of activity is this)
    action(string):- action to filter on e.g. activity_update, new_forum_post, profile_updated(why this activity was created)
    primary_id(int):- object ID to filter on e.g. a group_id or forum_id or blog_id etc. We will see the use in a minute.
    secondary_id(int):- secondary object ID to filter on e.g. a post_id(I don’t think you are going to use it)
    search_terms(String):- In case you want to list the results of activity search
    We will see some examples in a minute. Before that, I will just like to clarify that you can use the combination of above options to list any type of activity you want.
    Examples:-

    List all activities of user with user_id=1
    [activity-stream user_id=1]
    List 10 recent activities per page:-
    [activity-stream per_page=10]
    List activities containing word “awesome”
    [activity-stream search_terms=’awesome’]
    List all group activities:-
    [activity-stream object=groups]
    List all activities of the group Batman Fan club(Assuming that the group id is 2)
    [activity-stream object=groups primary_id=2]

    It’s up to you to explore the possibilities. I am happy to help any way i can