How can I change the size of the UserIcon displayed in the topbar from 16x16 to 32x32?
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.
- JoDeJo@joanne
JoDeJo - 0 likes
- DhrupDeScoop@Dhrup2000
DhrupDeScoop - 0 likes
- JoDeJo@joanne
JoDeJo - 0 likes
- DhrupDeScoop@Dhrup2000
DhrupDeScoop - 0 likes
- what elgg version ?
- r u using a theme ?
- or has the core view been re-coded ?
- there's no builtin 32x32 avatar thumb ;(
- JoDeJo@joanne
JoDeJo - 0 likes
- ihayredinov@ihayredinov
ihayredinov - 0 likes
- Team Webgalli@webgalli
Team Webgalli - 0 likes
- JoDeJo@joanne
JoDeJo - 0 likes
- ihayredinov@ihayredinov
ihayredinov - 0 likes
You must log in to post replies.Can anyone help?
does yew rilley wanna do that ? it most likely gonna mess up your topbar attributes and layout ;-(
My topbar has a height of 42px and the avatar looks too small.
1. 1.8.3
2. No
3. No
4. What's the next size up from the default 24px X 24px
There are two options:
1. You can increase the site of the 'topbar' icon accross the site by setting the config
2. Unregister the topbar menu item and reregister with an icon you need
Another unpretty option would be to use CSS
elgg_unregister_menu_item('topbar', 'profile'); // Remove the current profile icon from topbar
elgg_register_menu_item('topbar', array($options)); // the options
Available file sizes : topbar, tiny, small, medium, master, large,
I assume the topbar size is set at 16px x 16px in the elgg core? Would that make a good plugin project for my first one? If someone could point me in the right direction please.
@All - Thanks
Yes, that's a good plugin project:
Take a look at engine/lib/views
if (!elgg_get_config('icon_sizes')) {
$icon_sizes = array(
'topbar' => array('w'=>16, 'h'=>16, 'square'=>TRUE, 'upscale'=>TRUE),
'tiny' => array('w'=>25, 'h'=>25, 'square'=>TRUE, 'upscale'=>TRUE),
'small' => array('w'=>40, 'h'=>40, 'square'=>TRUE, 'upscale'=>TRUE),
'medium' => array('w'=>100, 'h'=>100, 'square'=>TRUE, 'upscale'=>TRUE),
'large' => array('w'=>200, 'h'=>200, 'square'=>FALSE, 'upscale'=>FALSE),
'master' => array('w'=>550, 'h'=>550, 'square'=>FALSE, 'upscale'=>FALSE),
);
elgg_set_config('icon_sizes', $icon_sizes);
}
You can use elgg_set_config to define default icon sizes if you want to completely change the size of the generated topbar icon.
Or use Webgalli's code to replace a topbar icon with a different size