PinoStudio 1

Full Version: Add simple css and fontawesome userbars
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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