Jump to content

JRevies Joomla system events


Gruz

Recommended Posts

Hi, I was asked if my NotificationAry plugin (http://gruz.org.ua/en/extensions/notificationary.html) can work with JReviews.

I was also told:

i managed to create rules (in NotificationAry) and when i submit an article it works just fine but when i am creating from jreviews it doesn't. Please note that when an article is creating from jreviews a new article (actually the same article) is created in joomla's article section without the content.

 


Is this possible to ask you to trigger all needed joomla core events in JReviews when you create/update/publish joomla articles from JReviews? So make JReviews compatible with core joomla behavior, not only with my plugin.

If on some reason you refuse to follow Joomla conventions, then I have some developer questions.

I use joomla core plugin events in my plugin
onContentAfterSave
onContentBeforeSave
onContentChangeState
onContentPrepareForm

As far as I can see from jReviews code, you don't pass anything to core Joomla plugin methods.

For this case, to make my plugin compatible with other extensions, I create extensions specific forwarder event handlers like
onSomeExtensionPluginEventBeforeSave
rearragne data if needed and pass it to the normal joomla
onContentBeforeSave

This works with K2, Hotspost, DpCalendar, JDownloads ...

I managed to find
components/com_jreviews/jreviews/models/my_model.php
where you have some jreview specific events.
As far as I can see you have
plgAfterSave
and
plgBeforeSave
so in theory it's possible to intercept JReviews data with a corresponding method and pass it to my plugin.method.

But I cannot find any equivalent to onContentChangeState. Is this possible to get any touch in a plugin when a JReviews item is published/unpublished?

I'd also like to inject my notification on/off switch into your forms. Is there any onContentPrepareForm equivalent?

Thank you.

Link to comment
×
×
  • Create New...