I saw the D7 port issue was closed and everything related to it should be posted as new issues. I figured I'd start one for the Rules integration. I want to use this with the Heartbeat module and Rules integration is needed to make that happen.

Any ETA on rules integration?

Comments

bcarroll28’s picture

sub

Stalski’s picture

I'll respond here when I created the integration module.

Stalski’s picture

Status: Active » Needs review
StatusFileSize
new1.12 KB

I added integration for rules. This includes an event "when shouting" . The data type that is given is shoutbox_message and also defined in rules. That said, we needed tokens, so I added the most basic ones too.

So currently, when a user shouts, modules like heartbeat can pick in and for instance log activity.
A nice to have is also that other modules can respond in the client as well. Javascript wise.
So I added a JavaScript hook in the patch of shoutbox module as well to make sure modules like heartbeat can do something "when a user shouts". In my case that is "polling for newer activity" resulting in immediate pushing of that shout into the stream/feed.

That patch runs agains 7.x-1.x

Regards,
Stalski

Stalski’s picture

The result implementation is already committed into heartbeat, see #1250324: Alpha version of shout box released for D7, What can we do to make it work with heartbeat?

Stalski’s picture

StatusFileSize
new3.24 KB

Sorry, latest patch did not include the added files. Here they come.

sw3b’s picture

Subscribe !

disterics’s picture

Assigned: Unassigned » disterics

Integrating the patch into a shoutbox sub-module

Stalski’s picture

StatusFileSize
new809 bytes

I did not see the tokens and appearantly this was due to a typo :)
Here's the patch to fix it.

Stalski’s picture

StatusFileSize
new7.5 KB

Hey all,

I debugged some more to see I could not get the poller to work within heartbeat. This was because Shoutbox lacks a aftersubmit javascript hook.

So here's what I did:
- In heartbeat there is not JavaScript code that implements a new introduced hook in Shoutbox.
- In Shoutbox there is now a default implementation of the hook, triggering the LoadShouts function.
- Ofcourse there is then a new JavaScript hook that is invoked when Shoutbox just finished his job of publishing / adding a shout.

See Patch.

KorbenDallas’s picture

KorbenDallas’s picture

For those getting this to work, use Shoutbox Alpha2 and only use patch 9.

KorbenDallas’s picture

The javascript to update the heartbeat stream once someone shouts doesn't work either.

Stalski’s picture

Looks like this is not going in.

KorbenDallas’s picture

The javascript update to the heartbeat stream is not an issue with the patching efforts here. Reference this thread to if you're having trouble with it: http://drupal.org/node/1250324#comment-5589450

  • disterics committed 6fb4b09 on 7.x-2.x
    Issue #1267942 by Stalski: Initial version of 7.x rules integration.