Feature proposal #3817
closedAPI based triggers
Description
Implement triggers for easily adding new activity through API (same way you'd call CB Captcha for example). Implement triggers for display and access so activity can be altered externally (e.g. allow 3rd party extensions and CB plugins to add activity and change that activities display and access).
Updated by krileon almost 12 years ago
- Target version changed from 3.0.0 to 2.2.0
Updated by krileon almost 12 years ago
- Status changed from Assigned to Resolved
- % Done changed from 0 to 100
Implemented the following triggers.
activity_onBeforeMessageDisplay
activity_onAfterMessageDisplay
activity_onBeforeItemDisplay
activity_onAfterItemDisplay
activity_onBeforeUpdateActivity
activity_onBeforeCreateActivity
activity_onAfterUpdateActivity
activity_onAfterCreateActivity
activity_onBeforeDeleteActivity
activity_onAfterDeleteActivity
activity_onBeforeAccess
activity_onAfterAccess
activity_addActivity
The trigger activity_addActivity is used to add new activity using the following usage.
$_PLUGINS->trigger( 'activity_addActivity', array( $userId, $type, $user, $subtype, $item, $from, $to, $title, $message, $icon, $class, $date ) );
Only userid and type are required. Leaving date empty will cause it to use UTC now (best to leave as this).