Quantcast
Channel: MyBB Community Forums - Tutorials
Viewing all articles
Browse latest Browse all 690

Ficons? Let's use font-awesome

$
0
0
Hi! It's my first tutorial for MyBB.com.

With this tutorial, you can remove images and put font-awesome in ficons. First, we need Font-Awesome, if you can't have, you only need to put this line in your headericlude.
Code:
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">

Now, in Forum Bit Templates, open forumbit_depth2_forum template. And replace this code:
Code:
<span class="forum_status forum_{$lightbulb['folder']} ajax_mark_read" title="{$lightbulb['altonoff']}" id="mark_read_{$forum['fid']}"></span>
By this:
Code:
<span class="fa fi-{$forum['fid']} fa-3x"></span>

Now, just add this class in global.css for all forum ids.
Code:
.fi-X:before {content:"\f0f4"}
Replacing the X, by your forum id.

Very important to put the :before in the class. But, where do I get the content? Very easy, you only search your font-awesome icon in this url, and copy the content.
http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.css

You can't find any icon for specific forum? You can do this:
Code:
.fi-X {background:url(images/ficons/X.png);}
Without :before.

Regards, and sorry for my English.

[Image: DxXzA98.png]

Viewing all articles
Browse latest Browse all 690

Trending Articles