help to better help you:

Please: add always Joomla / JEM version and details to your posts, so we can try to reproduce your issue!

Feature requests for JEM 2.0 - initial public release

Replace images by icons

Replace images by icons

6 years 6 months ago - 6 years 6 months ago
#25137
I got into a dead-end when trying to override the print, mail and ical buttons in event detail – since they are not coded in the JEM view files but in the output class. I am a great fan of separating layout from function and content, so I suggest the following:

In components/com_jem/classes/output.class.php:

Line 547: Replace "$image = JHtml::_('image','system/printButton.png', JText::_('JGLOBAL_PRINT'), NULL, true);"
by "$image = JText::_('COM_JEM_PRINT_ICON');"

Line 557: Replace "$pimage = JHtml::_('image','system/printButton.png', JText::_('JGLOBAL_PRINT'), $title, true);"
by "$pimage = JText::_(COM_JEM_PRINT_ICON);"

Line 604: Replace "$image = JHtml::_('image','system/emailButton.png', JText::_('JGLOBAL_EMAIL'), NULL, true);"
by "$image = JText::_('COM_JEM_EMAIL_ICON');"

Line 637: Replace "$image = JHtml::_('image', 'com_jem/iCal2.0.png', JText::_('COM_JEM_EXPORT_ICS'), NULL, true);"
by "$image = JText::_('COM_JEM_ICAL_ICON');"

In the responsible JEM language file
ADD:
COM_JEM_PRINT_ICON=<span class="icon-print"></span>
COM_JEM_EMAIL_ICON=<span class="icon-mail"></span>
COM_JEM_ICAL_ICON=<span class="icon-calendar"></span>

[For people who want to make the change before this feature request is accepted: Add these 3 lines via Extensions > Language > Overrides by insertig key and text into the respective input fields, choose "site" and your site's language.]

And as I was already changing that file, I detected a hard coded color in the "powered by JEM" footer. So I suggest as well in output.class.php
Line 29: Replace "echo '<font color="grey">Powered by <a href=" www.joomlaeventmanager.net " target="_blank">JEM';"
by "Powered by <a href=" www.joomlaeventmanager.net " target="_blank">JEM";

Joomla has Icomoon font integrated. So there is no longer need to produce traffic by loading image files. The advantage of using icomoon font is obvious: everything is stylable by css: size, color, border, background-color. See my example:



I would love it if you could integrate that into the next release. So I don't have to redo the changes after a new JEM update.

Thanks a lot for your attention!
Regards,
Herbert

Attachments:

Last edit: 6 years 6 months ago by HerKle. Reason: Jojo's contribution
The following user(s) said Thank You: jojo12

Please Log in or Create an account to join the conversation.

Re: Replace images by icons

6 years 6 months ago
#25138
Hey HerKle,
during the development of JEM Responsive I also stumbled upon this problem.
So:

Vote for the change in the next release!
The following user(s) said Thank You: jojo12, HerKle

Please Log in or Create an account to join the conversation.

Re: Replace images by icons

6 years 6 months ago
#25139
Hi HerKle,
I thought, it would be a good proposal. But then I tried the changes in output.class.php and the language files.
But it does not work. I think because of the changes in the language files. How you did?

Please Log in or Create an account to join the conversation.

Re: Replace images by icons

6 years 6 months ago - 6 years 6 months ago
#25140
Hm, that could be the case. Since JEM doesn't use Joomla's language directory but a proper one inside the component, I believed that directory was the right one. I myself used language overrides for sites. You can add those 3 lines to llanguage/overrides/en-GB.override.ini or whatever else language you use, eg. de-DE.override.ini.
Regards,
Herbert
Last edit: 6 years 6 months ago by HerKle. Reason: typos

Please Log in or Create an account to join the conversation.

Re: Replace images by icons

6 years 6 months ago
#25141
Hi,
your message didn't help, but I found the reason:
the language files must be:
COM_JEM_PRINT_ICON="<span class="icon-print"></span>"
COM_JEM_EMAIL_ICON="<span class="icon-mail"></span>"
COM_JEM_ICAL_ICON="<span class="icon-calendar"></span>"
with the "at start and the end of the translation

And this only works, when you use the official joomla! template "protostar"
(I am using ja_purity_iii with bootstrap and fontawesome- There I need other language files)

Please Log in or Create an account to join the conversation.

Re: Replace images by icons

6 years 6 months ago
#25142
is there a possibility to do near the same with fontawesome?

Please Log in or Create an account to join the conversation.

Time to create page: 0.698 seconds