Font awesome icon in to bbcode

Get help developing custom BBCodes or request one.
Post Reply
TT90
Registered User
Posts: 42
Joined: Tue Jun 12, 2018 12:31 pm

Font awesome icon in to bbcode

Post by TT90 »

Hi, i want to ask if is possible add fontawesome icon in to Board Announcements extension ?

I try this code:

Code: Select all

 <i class="icon fa-calendar fa-fw" aria-hidden="true"></i>
but this extension dont support html

It is possible add this via bbcode ? Can anyone make for this bbcode ?

Thanks
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Font awesome icon in to bbcode

Post by Ger »

Should be as simple as this:
Usage
[fa]{SIMPLETEXT}[/fa]

HTML Replacement

Code: Select all

<i class="icon fa-{SIMPLETEXT} fa-fw" aria-hidden="true"></i>
Example
Check this [fa]calendar[/fa] fancy icon
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
TT90
Registered User
Posts: 42
Joined: Tue Jun 12, 2018 12:31 pm

Re: Font awesome icon in to bbcode

Post by TT90 »

Wow thanks, works perfect.

So if i want change color of this or size, how i do it ?
It possible add this in this bbcode ?
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Font awesome icon in to bbcode

Post by Ger »

You can simply change the HTML replacement to something like

Code: Select all

<i class="icon fa-{SIMPLETEXT} fa-fw" aria-hidden="true" style="color: #FF0000; font-size 20px;"></i>
Or set it as a class;

Code: Select all

<i class="fa-bbcode icon fa-{SIMPLETEXT} fa-fw" aria-hidden="true"></i>
And define that class in your stylesheet like so:

Code: Select all

.fa-bbcode {
	color: #FF0000;
	font-size: 20px;
}
First approach is simpler, second approach is a bit more optimized for the browser when you use it multiple times.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
TT90
Registered User
Posts: 42
Joined: Tue Jun 12, 2018 12:31 pm

Re: Font awesome icon in to bbcode

Post by TT90 »

Perfect, thank you so much ! Works great.

I use this:

Code: Select all

<i class="icon fa-{SIMPLETEXT} fa-fw" aria-hidden="true" style="color: #FF0000; font-size 20px;"></i>
Maybe it will be good add this like inscrution in bbcode instructions. ;)
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Font awesome icon in to bbcode

Post by Ger »

You're welcome :)
TT90 wrote: Tue Jul 10, 2018 9:43 am Maybe it will be good add this like inscrution in bbcode instructions. ;)
I'm not sure what you mean by this?
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26546
Joined: Fri Aug 29, 2008 9:49 am

Re: Font awesome icon in to bbcode

Post by Mick »

You can create a New Contribution to the Custom BBCode db for validation.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
TT90
Registered User
Posts: 42
Joined: Tue Jun 12, 2018 12:31 pm

Re: Font awesome icon in to bbcode

Post by TT90 »

User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Font awesome icon in to bbcode

Post by Ger »

I see, submitted it just now.

Edit: TT90 was just a bit faster. Well than, leave it up to the team to drop either one of them. :)
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
TT90
Registered User
Posts: 42
Joined: Tue Jun 12, 2018 12:31 pm

Re: Font awesome icon in to bbcode

Post by TT90 »

Ah sorry ;) :( So you are author, maybe it would be better if yours be approved and my deleted.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26546
Joined: Fri Aug 29, 2008 9:49 am

Re: Font awesome icon in to bbcode

Post by Mick »

Thanks guys 👍
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
User avatar
orynider
Translator
Posts: 273
Joined: Wed Nov 16, 2005 12:48 pm
Location: Arad, România
Name: Florin-Ciprian Bodin
Contact:

Re: Font awesome icon in to bbcode

Post by orynider »

Ger wrote: Tue Jul 10, 2018 9:33 am You can simply change the HTML replacement to something like

Code: Select all

<i class="icon fa-{SIMPLETEXT} fa-fw" aria-hidden="true" style="color: #FF0000; font-size 20px;"></i>
You need:

Code: Select all

<i class="icon fa-{SIMPLETEXT} fa-fw" aria-hidden="true" style="color: #FF0000; font-size: 20px;"></i>
User avatar
orynider
Translator
Posts: 273
Joined: Wed Nov 16, 2005 12:48 pm
Location: Arad, România
Name: Florin-Ciprian Bodin
Contact:

Re: Font awesome icon in to bbcode

Post by orynider »

You can not include font-size=5 or font-size=8.5 or font-size=15 or font-size=20 etc in Your [fa=10]{SIMPLETEXT}[/fa] code ?
Post Reply

Return to “Custom BBCode Development and Requests”