i'm tweaking the way the error messages are rendered and see that the js code that scripts that process is within ui.js (elgg.ui.init).
i would like to unregister that event and re-register it in my own plugin so that the changes survive core upgrades to elgg.. so far though i haven't succeeded in doing that since i haven't found a js function equivalent to elgg_unregister_event_handler for javascript hooks..
anyone know how to do this without directly changing core files?
thanks
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.
- Juho Jaakkola@juho.jaakkola

Juho Jaakkola - 0 likes
- ura soul@tunist

ura soul - 0 likes
You must log in to post replies.I'm not completely sure but I think your handler should overwrite the original hook hander when you call elgg.register_hook_handler().
Depending on the case you could also use the priority parameter to make sure your handler is called first. And inside your code call event.stopImmediatePropagation() to prevent the other jQuery event handlers from firing (e.g. $('.elgg-system-messages li').live('click'), ...). Then there would be no need to replace elgg.ui.init at all.
yes, i thought the new definition would over-write the previous one, though that isn't what occured.
i'll look into those jquery ideas, thanks.