IP.Board Tutorials

Font awesome

Submitted by BebeGFX, , Thread ID: 16555

Thread Closed
BebeGFX
Junior Member
Level:
0
Reputation:
0
Posts:
72
Likes:
11
Credits:
48
09-01-2016, 02:35 AM
#1
First we must put on forum Font Awesome . Either put the code here , https://fortawesome.github.io/Font-Awesome/get-started/ , ie
Code:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
In globalTemplate after
Code:
<head>


From boardIndexTemplate , replace
Code:
<php>
$icons = array(
    '3' => 'fa-globe',
    '4' => 'fa-home',
    // Etc.. 'numaru_categoriei' => 'partea finala de la iconita'
);

$dataId = $forum_data['id'];
$icon   = isset($icons[$dataId]) ? $icons[$dataId] : 'fa-comments';
</php>

<div class='icon_awesome_forum_necitit'><i class="fa {$icon}"></i></div>
Where
Code:
$icon = 'fa fa-comments';
is the default icon - is attached, and block switching version , we assign variable $ desired icon icon code in accordance with - ID forum. For example , if the wish icon : http://fortawesome.github.io/Font-Awesome/icon/map/ category ID - 255 , we add before
Code:
'3' => 'fa-globe',

So .. all in boardIndexTemplate , change
Code:
<img src='{$this->settings['img_url']}/f_icon_read.png' />
Whit:
Code:
<div class='icon_awesome_forum_citit'><i class="{$icon}"></i></div>

and this :
Code:
<img src='{$this->settings['img_url']}/f_redirect.png' />
Whit:
Code:
<div class='icon_awesome_forum_necitit'><i class="fa fa-external-link"></i></div>
where change:
Code:
<i class="fa fa-external-link"></i>

the icon you want to be made of type redirect forums .

And ipb_styles.css add down everything , that :
Code:
.icon_awesome_forum_necitit {
    text-align: center;
    font-size: 25px;
    color: #eee;
}

.icon_awesome_forum_citit {
    text-align: center;
    font-size: 25px;
    color: #444;
}

[Image: CKpBZYu.png]
Author: Courage.

Users browsing this thread: 1 Guest(s)