MyBB 1.8.x Mod  Add simple css and fontawesome userbars
#1
Star 
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 grouptag{$usergroup['gid']}">&nbsp; {$post['usertitle']}</span><br />



In member_profile find:


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



Replace with:

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



Add to global.css:


Code:
/** CSS FA Usertitle Postbit & Profile by Vintagedaddyo **/

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

.grouptag4:before {
  content: "\f013";
}

.grouptag6:before {
  content: "\f0e3";
}

.grouptag3:before {
  content: "\f0e3";
}

.grouptag2:before {
  content: "\f007";
}

.grouptag4 {
   border: 3px solid #9f1bff;
   background: purple;
   color: #ffffff;
}

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

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

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

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

Install FA Fontawesome into MyBB
For those having trouble linking FA for whatever reason, have you tried adding FA internally?
For example to add the 4.7 library attached below you would add this to your headerinclude:

Quote:<link rel="stylesheet" href="{$mybb->asset_url}/fontawesome/css/font-awesome.min.css">

custom usertitles
the usertitle must be defined exactly in the css..., so custom usertitles wont be styled unless exactly defined in the css.

Have you tried adding something like the class:
"Administrador.del.Sitio.Web.Personal"

Quote:.grouptag.Administrador.del.Sitio.Web.Personal:before {
content: "\f013";
}
.grouptag.Administrador.del.Sitio.Web.Personal {
border: 1px solid green;
background: green;
color: #ffffff;
}

Should have a: <br />
Quote:<span class="grouptag {$post['usertitle']}">&nbsp; {$post['usertitle']}</span><br />

Attachment: FA-4.7_include

Referencia:
https://community.mybb.com/thread-219795...pid1314599


Attached Files
.zip   FA-4.7_include.zip (Size: 562.5 KB / Downloads: 0)
[Image: 51.jpg]
We11World [ Winning Eleven ] , Blog , Archive Forums
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Bug MyBB 1.8.x Mod  Replace postbit online/offline images with Fontawesome icons DiegoPino 0 157 11-21-2019, 03:25 PM
Last Post: DiegoPino

Forum Jump:


Users browsing this thread: 1 Guest(s)