Hi community!
To enhance groups displaying, I´ve modified the groups CSS to show the group icon at the top of the page, and I´ve tweaked the file summary.php to full wide fit:
echo elgg_view_entity_icon($group, 'large', array(
'href' => '',
'width' => '100%',
'height' => '',
));
The problem is about the icon image resolution, I see the groups icon doesn't generates the 'master' image size, and this is the size I need, so my question is:
How can I generate the 'master' size to use it in the code?:
echo elgg_view_entity_icon($group, 'master', array(
'href' => '',
'width' => '100%',
'height' => '',
));
...or use the original uploaded image.
This is a capture of my idea
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.
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- Javier@chamus
Javier - 0 likes
- iionly@iionly
iionly - 0 likes
- Javier@chamus
Javier - 0 likes
- iionly@iionly
iionly - 0 likes
- Javier@chamus
Javier - 0 likes
- Tom@Thomasondiba
Tom - 0 likes
- Javier@chamus
Javier - 0 likes
- iionly@iionly
iionly - 0 likes
- Javier@chamus
Javier - 0 likes
You must log in to post replies.By default ;s:
For customising it you need to override
elgg_view("icon/default");
inDocumentation
@RvR I don't understand what should I do.
I've looked in the file default.php but I dont know what code I must tweak.
And in the Documentation the 'master' size don't appears
Can you explain me a bit more?
Thanks.
An issue about missing group master icon has already been opened and a fix is currently in the making: https://github.com/Elgg/Elgg/pull/7265.
Ok @iionly, I´ll wait for the fix.
Until it is solved, can I tweak this code in summary.php:
...to use the original uploaded image as group icon?
Thanks.
Similar discussion recently: https://community.elgg.org/discussion/view/1873432/check-datafolder-for-icon-size.
You can use the same approach but instead of serving a custom size image you can serve the original image instead of the 'large' image:
I´ve copied the code into start.php of groups plugin, but it don't works (I´ve a own plugin to customize groups, I also tested the code in start.php of this plugin).
In summary.php I´ve this code:
and in your suggested code I´ve:
Is this the right way to apply the patch?
Thanks.
The group icon uploaded through elgg Icon upload form is not rectangle icon. Most of the elgg icons are cropped during group icon upload time. So if you take the group master icon and use it as 100 %, the image might not be shown properly even after the group icon bug fix.
Remember, most online users nowdays browse social network via phone devices.
For more information read this discussion.
1. New Elgg Cover Photo Plugin
https://community.elgg.org/discussion/view/1856576/new-elgg-cover-photo-plugin
Hi @Tom, your Elgg Cover Photo Album is just I need for my net. Your post is very useful.
I´m looking for the best engagement throught better groups profile displaying, with bigger images in widgets and full wide cover profile icon.
My net is also responsive, so I must be more carefully with this point.
About the group icon, I see in blogs that is 'master' the size used, and is valid for rectangular full wide displaying (because I upload a rectangular image). Example
For groups I´ll do the same (I spend time looking for and designing the best image icon, as you say in your post). This is I need: Example group profile. In this case, I´m using the original uploaded image (I´ve copied ORIGINAL.jpg to ORIGINALmaster.jpg manually)
So until your plugin be ready, or the master icon issue is solved, I need to use the original uploaded image in groups, and the @iionly's code may help me, but I don't know how to apply it.
Thanks @Tom.
Forget about the code I've posted above. It won't work with this code alone. Using the 'entity:icon:url', 'group' plugin hook you can only change the URL where Elgg has to look for the image but it's not possible to make it use the original image as fallback for master.
Check out this: https://github.com/iionly/Elgg_1.8_customsize_groupimage
It's a little plugin I've written that should do the trick. The "large" group icon is replaced the "master" group icon and instead of the "master" size the original image is used respectively. You might not need to make any other changes if you are okay with the large-sized group image being replaced everywhere (though as far as I know it's only used on group profile pages by default so it shouldn't make a difference). If you want to explicitely define where the master-sized image is to be used, then comment out the registering of the plugin handler that replaces "large" with "master".
You might still have to make some adjustments in the CSS files (which you might want to add to this plugin then) to make it look right on your site (with your theme).
Thank you so much @iionly, it works perfect!!, and my net looks much better now!!!
Thanks again!!!!