I'm looking for the best approach to take... my goal is to customize any Elgg action that results in a database transaction such as posting on a blog or uploading an image. In addition to the core functions of these actions I'd like to be able to make an api call to an external service with data related to the action being taken. In reading through the developer documentation it seems as these changes would be considered Elgg core functionality and recommended not to modify. I've searched through the discussions to see if anyone else may have tried to do something similar but didn't see anything.
Just looking for some guidance. Thanks in advance.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- TCB@tblack06
TCB - 0 likes
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- register you own action:
- use the hooks:
- TCB@tblack06
TCB - 0 likes
You must log in to post replies.Which your Elgg version?
I'm currently using version 2.3.14
In Elgg 2.x you can:
Where
'/actions/blog/save.php'
is your own custom action' file in/mod/your_plugin/actions/blog/save.php
http://learn.elgg.org/en/2.3/guides/actions.html#customizing-actions
http://learn.elgg.org/en/2.3/guides/hooks-list.html#action-hooks
You can add any code of the external services using the above solutions.
Perhaps, you will need custom classes for this.
Thanks. Since I'm actually customizing the save action (which is already registered) I don't need to register it. Eventually I want to create a central elgg service that any action from any plugin can call.