By Fagault Eric on Monday, 08 January 2018
Posted in General
Likes 0
Views 452
Votes 0
Hello,
I developed some small modules for my site EasySocial.
I need to load "Awesome Font", do you know which line of code I can insert into my modules to load "Font Awesome"?

Because when I load the script that "Font Awesome" offers me the loading of the module slows much.

Best regards.
Eric
Since EasySocial already renders font awesome, I don't think you need to re-render it. You could just use the necessary font awesome classes to render it?
·
Tuesday, 09 January 2018 01:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,
Thank you for your reply.

Exactly, I asked you the question because I know that Easysocial Load Awesome, and what I wanted was to load that for my modules without having to copy the file again (which would be a useless duplicate), that's why I asked you the method used by easysocial to use the same command line in my modules.

Best regards.

Eric
·
Tuesday, 09 January 2018 15:44
·
0 Likes
·
0 Votes
·
0 Comments
·
I think you need to render EasySocial's stylesheet and not just font awesome. You can do so by executing the codes below:

[gist]
<?php

require_once(JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/easysocial.php');

ES::initialize();
[/gist]
·
Tuesday, 09 January 2018 21:33
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you for your answer.

I included this code in my PHP file but the Anwesome fonts are not displayed.

Here's what I did in my php file:

<? Php
// No direct access
defined ('_ JEXEC') or die;
JHTML :: _ ( 'jquery.framework');
$ document = & JFactory :: getDocument ();
$ Document-> addStylesheet ( "/ modules / mod_esmygroup / esmygroup.css");
$ Document-> addStylesheet ("/ components / com_easysocial / themes / wireframe / styles / style.min.css");

require_once (JPATH_ADMINISTRATOR. '/components/com_easysocial/includes/easysocial.php');
ES :: initialize ();
// Criteria
$ idUser = JFactory :: getUser () -> id;
$ nameUser = JFactory :: getUser () -> username;
$ Dash = "-";
?>

Best regards.

Eric
·
Tuesday, 09 January 2018 22:06
·
0 Likes
·
0 Votes
·
0 Comments
·
EasySocial's implementation of font awesome requires a wrapper of #es to prevent conflicts with 3rd party.

[gist]
<div id="es">
<i class="fa fa-xxx"></i>
</div>
[/gist]
·
Tuesday, 09 January 2018 22:09
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you very much for your answer,
I did not put the id in my div.
Now it works.

Best regards.

Eric
·
Tuesday, 09 January 2018 22:31
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome
·
Tuesday, 09 January 2018 22:43
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post