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

[Tutorial] Add simple css and fontawesome userbars

$
0
0
You can simply try something like this for simple fontawesome css userbars.

In headerinclude add:

Code:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

in postbit and postbit_classic find:

Code:
{$post['usertitle']}


replace with:

Code:
<span class="grouptag {$post['usertitle']}">&nbsp; {$post['usertitle']}</span>



In member_profile find:


Code:
({$usertitle})<br />



Replace with:

Code:
<span class="grouptag {$usertitle}">&nbsp; {$usertitle}</span><br />



Add to global.css:


Code:
.grouptag {
    display: inline-block;
    padding: 3px 5px;
    border-radius: 3px;
    font-family: "FontAwesome";
    font-weight: 600;
}

.grouptag.Administrator:before {
    content: "\f013";
}

.grouptag.Moderator:before {
    content: "\f0e3";
}

.grouptag.Member:before {
    content: "\f007";
}

.grouptag.Administrator {
    border: 1px solid green;
    background: green;
    color: #ffffff;
}

.grouptag.Moderator {
    background: purple;
    border: 1px solid purple;
    color: #ffffff;
}

.grouptag.Member {
    background: blue;
    border: 1px solid blue;
    color: #ffffff;
}

You can then simply modify and expand upon that...


If you want this modified to use "gid" please see  https://community.mybb.com/thread-219795-post-1314599.html#pid1314599 below.

Viewing all articles
Browse latest Browse all 690

Trending Articles