Jump to content

Code hook for new activity


eskaiter

Recommended Posts

Posted

What kind of activity?

For content item/comment/review things there are often "processAfterEdit" and similar methods you could hook in to, and for member account changes there's the MemberSync extensions. Basically, it depends on what activity you want to "listen" for the best approach to do so.

Posted

The activity stream shows new content, comments and reviews, new reactions, and optionally several other things as configured in the AdminCP (such as profile changes and new registrations).

Capturing all of these things would require hooks on different areas of code (such as MemberSync extensions to capture when the account is created and when the profile is updated, as well as hooks on the content item classes to capture when the content is created).

Backing up - what exactly do you plan to do when the data is captured? Are you intending to push the data to a remote service, or just use it locally with the software? Because another approach might be to just use our stream classes to load and output a stream manually using different templates.

Posted

Well, I guess your best bet will be to hook into the areas I mentioned and start passing over the data one by one.

For content, items are placed into the search index so you can listen for this event with a hook and push the data to your remote service.

For other activity points (like changing profile data or registering), you can create hooks on the MemberSync class.

There won't be one central point to push everything, since some stream content is pulled when the stream is output rather than when those actions occur, but you can build off of these concepts to add more things (like reaction issued).

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...