Javascript Event System - profile-page-after-add-comment

From KickApps Documentation

Jump to: navigation, search

This article pertains to the Javascript Event System. You can refer to our list of Javascript Event System Supported Events to learn what else you can do with our event system.

Contents

Summary

This event is fired after a comment is added to a profile page

Payload Parameters

commentId
(number) The ID of the new comment
approved
(boolean) Is comment moderation enabled

Execution Interruption

If your event handler returns false, the execution will halt and the new comment will not be shown.

Example

function onAfterAddComment(data) {

   // do something here
   console.log(data.commentId, data.approved)

} var newEventId = Ka.events.listen('profile-page-after-add-comment', onAfterAddComment);