E107: problem with icons - not the same logic everywhere

Created on 20 Dec 2017  路  3Comments  路  Source: e107inc/e107

I noticed this with bootstrap 4 theme, but it applies for bootstrap 3 theme without glyphs support.

image

Print icon:
{PRINTICON} - inserts fa-icon, correct, if you want to override it with image, you can use define('ICONPRINT', "print.png"); and put image in theme/images folder
I didn't find way how to override with other icon not image

Email icon (wrong)
{EMAILICON} - insert glyph icon,
<span class="glyphicon glyphicon-envelope"><!-- --></span>
not displayed, it can be replaced by image in theme using
define('ICONMAIL', "email.png");

  • I didn't find way how to override with other icon not image

Edit icon (wrong)
{ADMINOPTIONS}
<span class="glyphicon glyphicon-edit"><!-- --></span>
not displayed, to replace by image just upload file to theme folder with newsedit.png, not define is needed

Comment icon
{NEWSCOMMENTLINK: glyph=comments&class=btn btn-default btn-sm}
parameter glyph doesn't work, fa-comment is always used, but you can overrride it in theme by
define('COMMENTLINK', e107::getParser()->toGlyph('fa-comments'));
and you can use image too this way:
define('COMMENTLINK', "<img src='".THEME_ABS."images/comments.png' alt='".LAN_COMMENTS."' />");

Help Wanted enhancement

Most helpful comment

It is not point. Core should use the same principles. I can do what I want but others maybe not. Try to explain how it works in documention if each icon works different way.

All 3 comments

@Jimmi08 You can override all bootstrap glyphs & fontawesome with css and any image file you want.
I'm currently doing it on my live site....

But it's true, currently the core icons are a mix of glyphs, fontawesome & png's, which is rather annoying...

P.S.: Just my 2 cents, if i'm allowed. Using icons as individual image files will slow the page load, the ideal would be to use sprites...

It is not point. Core should use the same principles. I can do what I want but others maybe not. Try to explain how it works in documention if each icon works different way.

Yes, i agree with you. Icons should all share the common base, not use different render options...

Was this page helpful?
0 / 5 - 0 ratings