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 » Tue Jul 10, 2018 8:07 am

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
Recognised Extension Developer
Posts: 1557
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Font awesome icon in to bbcode

Post by Ger » Tue Jul 10, 2018 8:29 am

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 and Modern Quote
Newest: Quoted Where + anonymize

Like my work? Buy me a coffee to keep it coming. :ugeek:
-Available for custom work-

TT90
Registered User
Posts: 42
Joined: Tue Jun 12, 2018 12:31 pm

Re: Font awesome icon in to bbcode

Post by TT90 » Tue Jul 10, 2018 9:04 am

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
Recognised Extension Developer
Posts: 1557
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Font awesome icon in to bbcode

Post by Ger » 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>
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 and Modern Quote
Newest: Quoted Where + anonymize

Like my work? Buy me a coffee to keep it coming. :ugeek:
-Available for custom work-

TT90
Registered User
Posts: 42
Joined: Tue Jun 12, 2018 12:31 pm

Re: Font awesome icon in to bbcode

Post by TT90 » Tue Jul 10, 2018 9:43 am

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
Recognised Extension Developer
Posts: 1557
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Font awesome icon in to bbcode

Post by Ger » Tue Jul 10, 2018 9:55 am

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 and Modern Quote
Newest: Quoted Where + anonymize

Like my work? Buy me a coffee to keep it coming. :ugeek:
-Available for custom work-

User avatar
Mick
Support Team Member
Support Team Member
Posts: 19580
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: Font awesome icon in to bbcode

Post by Mick » Tue Jul 10, 2018 12:13 pm

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

There are no ‘threads’ in phpBB, they are topics.

TT90
Registered User
Posts: 42
Joined: Tue Jun 12, 2018 12:31 pm

Re: Font awesome icon in to bbcode

Post by TT90 » Tue Jul 10, 2018 12:20 pm


User avatar
Ger
Recognised Extension Developer
Posts: 1557
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Font awesome icon in to bbcode

Post by Ger » Tue Jul 10, 2018 12:38 pm

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 and Modern Quote
Newest: Quoted Where + anonymize

Like my work? Buy me a coffee to keep it coming. :ugeek:
-Available for custom work-

TT90
Registered User
Posts: 42
Joined: Tue Jun 12, 2018 12:31 pm

Re: Font awesome icon in to bbcode

Post by TT90 » Tue Jul 10, 2018 12:48 pm

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: 19580
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: Font awesome icon in to bbcode

Post by Mick » Tue Jul 10, 2018 12:49 pm

Thanks guys 👍
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.

Post Reply

Return to “Custom BBCode Development and Requests”

Who is online

Users browsing this forum: No registered users and 8 guests