• Welcome to Simple Machines Community Forum. Please login or sign up.

Font AweaZome BBC Code

Started by zStudios Team, May 09, 2017, 05:46:15 PM

Previous topic - Next topic

pocttopus

Quote from: zStudios Team on May 19, 2017, 03:37:29 AM
New update

1.2 - May 18, 2017
-Stack Icons  feature added [fasi]

how to use it :  http://smfdemo.zstudios.es/index.php?topic=3
Please, can you update the link because it's not working anymore.
Just to see the example of "fasi".

Thanks! :)

aegersz

I got this working on my dev system but am seeing these errors in my error log every time i post:

8: Undefined index: fasi
File: /var/www/html/Sources/FontAweaZome.php
Line: 58

8: Undefined index: fa
File: /var/www/html/Sources/FontAweaZome.php
Line: 51


I assume that it's no issue but i wanted to report it before i go live.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

shadav

was just installing this again, rebuilding one of my forums

you can create a kit for free and use their link
https://fontawesome.com/start
would look something like
<script src="https://kit.fontawesome.com/YOURKITNAME.js" crossorigin="anonymous"></script>
in your theme's index.template.php
find
// The ?fin20 part of this link is just here to make sure browsers don't cache it wrongly.
echo '

and add the link from your kit below the echo '
or just find where all of your .css are listed and add it in there

this will allow you to use some of the newer icons

now in Modifications.english.php and Modifications.english-utf8.php
at the end add
$txt['fa'] = 'Insert Font Aweasome BBC';
$txt['fasi'] = 'Insert Layered Font Aweasome BBC';

translate the above to add to whatever your Modifcations.LANGUAGE.php files are

in Sources/FontAweaZome.php
find
'content' =>'<span class="fa $1"></span>',
replace
'content' =>'<span class="$1"></span>',

find
'content' =>'<span class="fa $1 {op}"></span>',
replace
'content' =>'<span class="$1 {op}"></span>',

find
'content' =>'<span class="fa-stack fa-lg"><i style="color:{b};" class="fa {a} fa-stack-2x"></i><i style="color:{c};" class="fa $1 fa-stack-1x"></i></span>',
replace
'content' =>'<span class="fa-stack fa-lg"><i style="color:{b};" class="{a} fa-stack-2x"></i><i style="color:{c};" class="$1 fa-stack-1x"></i></span>',

now you aren't stuck just using the fa fa-icon
now you can use any by inserting them
[fa]fas fa-kaaba[/fa]
[fa]fab fa-facebook-f[/fa]
[fa]far fa-keyboard[/fa]


and you can layer icons and color them
[fasi a=fas fa-stop b=white c=red]fas fa-kaaba[/fasi]
so a is the background icon
b is the background color
c is the foreground color
and the icon between the [fasi] tags is the foreground icon

Advertisement: