IP.Board Tutorials

FontAwesome Forum Icons

Submitted by tormentor, , Thread ID: 94921

Thread Closed
tormentor
Newbie
Level:
0
Reputation:
0
Posts:
17
Likes:
5
Credits:
2
09-07-2018, 02:48 AM
This post was last modified: 09-07-2018, 02:52 AM by tormentor
#1
So this is to get the forum icons like we currently have.You need at least some css & html knowledge and be able to use google/firefox's developer tools.

Getting your Forum IDs
For this to work at all you need to know the forum ID's you want to change. You can find these by right clicking them and checking the data-forumid attribute:
[Image: PUo3UQs.png]

You can also see the forum ID if you edit the forum in the admin cp, at the end of the url:
[Image: KuW4moL.png][/url]

Adding some template code
Go to the theme and open up the following template:forums > front > index > forumRow
[Image: YjxOGxM.png]

At the end of every instance of a span with the class ipsItemStatus:
<span class='ipsItemStatus
You will need to add this little bit of code before the closing ">".
data-forumID="{$forum->_id}"
On the default themes that's line 12, 16, 20 and 28.It will look something like this:
[Image: dAtGp3a.png][/url]

Adding the CSS
This is where you'll need your forum ID numbers. This is also how i implemented them into the WebFlake CSS. Open your custom.css and add the following code:
Quote:/* ==========================================================================
FORUM ICONS
========================================================================== */
/*== [Category Name] ==*/
span.ipsItemStatus.ipsItemStatus_large[data-forumid='1'] > i:before{ content: "\f015" }
span.ipsItemStatus.ipsItemStatus_large[data-forumid='2'] > i:before{ content: "\f059" }
span.ipsItemStatus.ipsItemStatus_large[data-forumid='3'] > i:before{ content: "\f188" }
span.ipsItemStatus.ipsItemStatus_large[data-forumid='4'] > i:before{ content: "\f0f4" }
span.ipsItemStatus.ipsItemStatus_large[data-forumid='5'] > i:before{ content: "\f135" }
span.ipsItemStatus.ipsItemStatus_large[data-forumid='6'] > i:before{ content: "\f007" }

Remember the forum IDs from earlier? You'll need to change the numbers here with your own forum IDs. You can copy/paste these lines for every forum you have, the reason i add the category names as comments is because in the future if stuff changes i won't lose track of which category is which.
Change the "\f015" part with whatever FontAwesome icon you want. Go tohttp://fontawesome.io/icons/and click the icon you want for your forum, for example "home". Copy the "unicode" part and replace it in your css. Keep the "\" backslash in there.
[Image: mIRflSJ.png]

If you have forum icons set as images currently, you will need to remove them.

And that's it, you will now have customizable forum icons for your forums.

Users browsing this thread: 1 Guest(s)