With 3.x out now, I'm brushing up on my Elgg on a lot of things. I'm looking at the blog's save.php in actions folder and it looks like it's still hard coded for specific variables. In order to add a custom field, you'd also have to override the blog's save.php in the form folder. Can't add a new metadata by extending the existing forms because you need the entity's GUID, which you won't get unless the entity is made first. This makes it hard for plugin devs.
TL;DR basically what the title says on this topic.
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
- Cim@manacim
Cim - 0 likes
You must log in to post replies.Just write your own 'blog/save' action/form.
In elgg-plugin.php add:
I can't see any problem with it
I'm trying to avoid overriding it but after further studying the docs and core codes, I've managed to add a custom metadata on new blog post creation. The key is to use event handlers, I skimmed through this in the docs but I had tunnel vision and focused on physical files, rather than using hooks.
Case closed!