Skip to main content

Activities widget

The Activities Widget renders activity streams on the page. These streams can be customised in multiple ways:

  1. By specific user
  2. With reward activities only
  3. With behaviour activities only
  4. By tags or tagUuid

Activities widget showing a stream of user activities The Activities Widget displaying a stream of user activities with timestamps

Implementation

To render the Activities Widget, add a call to the Mambo activities() function in the mamboCallbacks() array. The example below shows all available options. None of these options are required, so you could simply use: Mambo('.selector').activities().

JavaScript

Configuration options

Each option is explained in detail below. None of these options are required.

Display options

OptionDescriptionDefault ValueSample Value
heightSets the height of the activities element in pixels.500400
titleOverrides the default title of the widget.N/AMy Rewards
picClassOverrides the default icon used when broken profile images are identified.mambo-sprite mambo-silhouette-lgmy-picture-icon
countDetermines the number of activities to retrieve.3035

Points information

OptionDescriptionDefault ValueSample Value
hasEarnPointsDetermines whether the "How do I earn Points?" link is displayed. Recommended to leave enabled.truefalse
earnPointsUrlProvides an alternative behaviour for the "How do I earn Points?" link. By default, this opens a popup with available behaviours. If set, the link will open the specified URL instead.N/Ahttp://mydomain.com/profile/user

Tag filtering

OptionDescriptionDefault ValueSample Value
tagsFilters activities by one or more tags. For more details, refer to the Tag APIs.N/A['tagA','tagB']
tagUuidFilters activities by a specific user's tags. For more details, refer to the Tag APIs.N/AuniqueUserId

Content filtering options

OptionDescriptionDefault ValueSample Value
filterOpts.withBehavioursDetermines whether behaviour activities should be shown in the stream.truefalse
filterOpts.withRewardsDetermines whether reward activities should be shown in the stream.truefalse
filterOpts.withActivitiesDetermines whether point, gift and bounty activities should be shown in the stream.truefalse
filterOpts.withPointActivityDetermines whether point activities should be shown in the stream.falsetrue
filterOpts.withContentOnlyShows only behaviours with associated content in the stream. When false (default), all behaviours are shown, with behaviour names displayed for those without content.falsetrue
filterOpts.withUuidLoads activities for a specific user.N/Ajohn@doe.com
filterOpts.hideBehavioursHides specific behaviours in the widget by behaviour ID. Useful for excluding simple behaviours.N/A['behaviour_id']
filterOpts.hideRewardsHides specific rewards in the widget by reward ID.N/A['reward_id']