Hello All,
I am new to elgg and have learnt a few things recently. However, I will like to change the default avatar created by elgg for new users. I initially tried to override _graphics/icons/user in my new plugin. I created same path in my plugin but the default avatar did not change. I then deleted the default avatar images and replaced them with mine but the site still loads the default avatar, even for newly registered user. Any advise on how to go about resolving this issue?
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.
- Matt Beckett@Beck24

Matt Beckett - 0 likes
- mayokun@mayokun

mayokun - 0 likes
- mayokun@mayokun

mayokun - 0 likes
You must log in to post replies.elgg_register_plugin_hook_handler('entity:icon:url', 'user', 'my_plugin_avatar_url');
See the profile_override_avatar_url function in the core profile plugin for an example of how to use the hook
Thanks Matt. Based on your advise, I overrode icondirect.php and specified the path to my icons. However, I did not have to add "elgg_register_plugin_hook_handler('entity:icon:url', 'user', 'my_plugin_avatar_url')" to the start.php of my theme.
Hi. As per my earlier comment. The elgg site used the default images I overrode. When I replaced the default images, the site loaded the original images and ignored the ones I had in my theme. I had to do a full implementation as suggested by Matt. Now everything is working perfectly.