Font awesome

by BebeGFX - 09-01-2016, 02:35 AM
Closed Account
Posts:
76
Joined:
Jun 2015
Likes:
7
Credits:
73
Reputation:
0
2 Years of Service
#1
OP
Posted: 09-01-2016, 02:35 AM
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.
The last reply on this thread is older than a month. Please do not unnecessarily bump it.
Register an account or login to reply
Create an account
Create a free account today and start posting right away. It only takes a few seconds.
Login
Log into an existing account.
1 Guest(s)