Idea Melt

Focus Mode

Library

Event Hooks

Overview

With the library, it's super easy to hook up your existing apps with notifications and stories. We want your community to have the best experience possible and we don't want you to have to change everything on your site. Check out the bindings we've already built for you. If you don't find something you need, let us know!

Realtidbits Comments 3
automatic stories
full support
this function will automatically create stories whenever someone posts a comment or replies to a comment.
IdeaMelt.EventHooks.rtbComments.stories(this, OBJECT_TYPE, OBJECT_URL);

Put the object_type of the article/object/thing being commented on in the OBJECT_TYPE arguement. Remember, this must be setup in your Dashboard correctly.

The URL of the object goes in the OBJECT_URL arguement. Remember, this URL must have the OpenGraph data so the story can be created!

Learn more about what a story is!

The best place to put this line of code would be inside the config object when you initialize RTB Comments 3. Here's what the specific part of the config would look like if used on an article page. It's wrapped inside a ready parameter which executes when Comments is done initializing.

"config": {
    ...
    "ready": function() {
        IdeaMelt.EventHooks.rtbComments.stories(this, 'article', document.location.href);
    }
    ...
}
automatic notifications
full support
this function will automatically send notifications to the owner of a comment when someone replies or likes that comment.
IdeaMelt.EventHooks.rtbComments.notifications(this, AUTO_POST_NOTIFS, AUTO_REPLY_NOTIFS, DEEPLINK);

AUTO_REPLY_NOTIFS accepts a boolean. If true, it will send a notification whenever someone replies to the parent. Remember, this will not send a notification to all the people who have also replied to the parent, it will only send the notification to the owner of the parent comment

AUTO_LIKE_NOTIFS accepts a boolean. If true, it will send a notification whenever someone likes a comment, simple!

Provide a string URL for wherever you want the notification to link to in the DEEPLINK parameter. So if someone is commenting on an article, the deep link paramter would probably be the article page itself.

Learn more about Realtidbits Comments 3

The best place to put this line of code would be inside the config object when you initialize RTB Comments 3. Here's what the specific part of the config would look like. It's wrapped inside a ready parameter which executes when Comments is done initializing.

"config": {
    ...
    "ready": function() {
        IdeaMelt.EventHooks.rtbComments.notifications(this, true, true, document.location.href);
    }
    ...
}