MyBB Community Forums

Full Version: Show icon (or use CSS class) for all url links in posts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I would like to show Font awesome icon (or just style the url links with css) before the url links in the post (in thread). Is there any easy way how to do that? Thank you very much!
I guess you should be able to do that by editing the mycode_url template and/or the .mycode_url class.
@doylecc - thank you for your reply - honestly I tried that yesterday and without any success. Maybe I did something wrong.
I like the idea of that...
I tried to do it with custom mycode in the control panel but I didn't pull it of... sandbox isn't working in my case.

I tried the folowing:



name: 
icon link

Regular Expression:
\[url\](.*?)\[/url\]

Replacement :
<i class="fa fa-link" aria-hidden="true"></i>
<a href="$1">$1</a>
If you want to edit this link:

[Image: link.png]

you have to edit class="quick_jump" in global.css
(05-05-2017, 01:06 PM)Ashley1 Wrote: [ -> ]If you want to edit this link:

[Image: link.png]

you have to edit class="quick_jump" in global.css

Nope, I wanna add a font awesome icon before any url link in post
Create a new class in your global.css and add this.

.mycode_url:before {
	content: "\f000";
	font-family: FontAwesome;
    font-size: 18px;

}


font-awesome.min.css must already be included in the template headerinclude.