Loading...
 
Skip to main content

Activities

Activities are recorded instances of events
Events are not automatically recorded as an activity, activity rules must be set for events that should be recorded.
Events are executed even if there is no activity rule linked to them.
Activities can be displayed in activity streams

Basic activities

Copy to clipboard
//Basic activities defined in lib/activity/activitylib.php array( 'activity_basic_tracker_create' => 'tiki.trackeritem.create', 'activity_basic_tracker_update' => 'tiki.trackeritem.update', 'activity_basic_user_follow_add' => 'tiki.user.follow.add', 'activity_basic_user_follow_incoming' => 'tiki.user.follow.incoming', 'activity_basic_user_friend_add' => 'tiki.user.friend.add', );

It is possible to enabled/disable recording of basic events using the Social Networks tab at Community control panel (tiki-admin.php?page=community)

Custom activities

It is possible to record custom activity rules using the Social Networks tab at Community control panel (tiki-admin.php?page=community)

Copy to clipboard
//to record an event place this in to the rule (event-record event args)
Rule typeDescription
sampleSample events are not recorded as an activity. Use this if you want to disable a rule.
basicRecorded as an activity, but the arguments can not be changed. Use this if you want use a rule "as it is".
advancedRecorded as an activity and you can modify the arguments as you like. Get familiar with advanced rating language. Use this to customize an event
notifyRecorded as an activity and also available for notifications. Use this if you want to allow users to subscribe to event related notifications

Database

Activities are stored in tiki_activity_stream table
Activity rules are stored in tiki_activity_stream_rules table

Display

Activities are displayed using smarty tpl files (see templates/activity/ folder)

Copy to clipboard
//sample tpl file used for displaying tiki.comment.post event type {activityframe activity=$activity heading="{tr _0=$activity.user|userlink}%0 posted a comment to{/tr}"} <p>{object_link type=$activity.type id=$activity.object}</p> {if is_array($activity.aggregate)} <small>{$activity.aggregate.user|userlink}</small> {/if} {/activityframe}