News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Need assistance with adding font-awesome to theme

Started by Atomixx, January 06, 2017, 09:34:18 PM

Previous topic - Next topic

Atomixx

Hello SMF community!
I've recently been trying to edit some of the icons on my theme using font-awesome. Font awesome includes a bunch of icons which can be used throughout various websites. I know it works with SMF as I've seen posts previously stating they have been able to install it and themes such as "Redsy" or "Reseller" by Daniiel, also include font awesome. However, it seems that when I add the line of code I keep on getting a Template parse error. The line of code is

    <link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/font-awesome.css?fin20" />

I am adding this to "index.template.php" and between the following two lines of code
// The ?fin20 part of this link is just here to make sure browsers don't cache it wrongly.

<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css?fin20" />';


I've installed everything else for font awesome, this is the only problem I am getting.
Anyone familiar with font-awesome or someone who has some coding knowledge, help would be greatly appreciated!
   

Kindred

you can't just randomly add code anywhere...   html would need to be within an echo statement.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Colin

"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Atomixx

Quote from: Colin on January 06, 2017, 11:42:48 PM
Fear not, check out this awesome font awesome mod:

http://custom.simplemachines.org/mods/index.php?mod=3964

I thought that was only for posts since it's for BBCode. Would it work if I wanted to replace i.e the quote image logo (Image below) into a font awesome icon?



Basically what I want to do is get rid of the quote text and instead just leave the custom image. Would I be able to do that?

Atomixx

Quote from: Kindred on January 06, 2017, 10:37:21 PM
you can't just randomly add code anywhere...   html would need to be within an echo statement.

Doesn't appear to be working. I accidently left out the echo statement in the original post. Sorry about that.
Heres what I got

Advertisement: