Working with JomSocial events

MageBridge makes use of a concept called "event forwarding" which allows you to pick-up an event generated in Joomla!, and replay that event in Magento. This way you can bridge things much more easily, while MageBridge provides the right architecture.

The JomSocial component is filled with events, but unfortunately few of these events are useful for usage with MageBridge. For instance, there is an event called "onBulletinDisplay" but actually when the JomSocial bulletin there is not much reason to load this event into Magento.

Of more interest are the events that signal something is changing in JomSocial: For instance when an user-profile is changing, when an update of the avatar is given or when a karma point is assigned.

Supported events

The following events are currently present within the MageBridge plugin for JomSocial (the Joomla! plugin-type "community").

  • onSystemStart: This event is just called on system-start, and MageBridge uses this event to create a new profile-tab. Nothing is forwarded.
  • onProfileAvatarUpdate: This event is called when the avatar-image is updated. The event is forwarded to Magento, but as Magento does not offer avatar-functionality, nothing is done with the event.
  • onUserDetailsUpdate: When the user details are updated, this event is forwarded to Magento so the Magento customer-details are also updated. However, when updating the profile this event is not called. (See below for missing events.)

Currently unsupported events

The following events are present in JomSocial but not implemented in MageBridge. The reason for this is that we (Yireo) did not find anything useful in forwarding these events. If you think otherwise, please let us know and we see if we can forward the event.

  • onAfterPhotoDelete
  • onBeforePhotoDelete
  • onBulletinDisplay
  • onCronRun
  • onDiscussionDisplay
  • onLoadBookmarks
  • onMessageDisplay
  • onProfileDisplay
  • onSystemStart
  • onUserRegisterFormDisplay
  • onWallDisplay

There is one more event ("onProfileStatusUpdate") which caught are attention. The event sounds very useful, but while browsing through the JomSocial-code we could not find any actual change that triggered this event.

Missing events

For the following changes in JomSocial, currently there is no Joomla! event available, meaning there's nothing for MageBridge to extend (or to forward to Magento).
  • When saving a profile: This is #1 which is missing, and actually because of this miss the whole MageBridge integration could be considered crippled.
  • When saving a privacy settings: Far less relevant than saving the profile, but still interesting.
  • When a member is added to some kind of group: This would allow for a lot of integrations, which may within Magento lead up to more sales because you can add a JomSocial member also to a specific Magento customer-group, there for targetting your customers more directly.
  • When an user point (or karma point) is assigned: This could allow you to give a discount to a certain Magento customer. Note that this is needed when you want to sell a JomSocial Karma Point through Magento, which is already implemented in MageBridge 1.2.

These suggested events are yet to be implemented in JomSocial, and if you need this functionality, we urge you to contact the JomSocial team to provide these events.

Above we suggested some implementation or functionality to attach to each event. Note that just with the event the mentioned functionality does not appear, and that not all of this functionality will just appear in MageBridge. However, we are always open for suggestions.