MyBB Community Forums

Full Version: Templante index_whosonline_memberbit with Font Awesome 4.7
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Templante index_whosonline_memberbit with Font Awesome 4.7

Hi Community, need help to performance who is on line with font awesome 4.7

I have followed the various tutorials of FA 4.7 but in moment to edit templante: index_whosonline_memberbit to used FA 4.7 Not display the FA

Check the image fa-gavel
[Image: mybb-Font-Awesome-4-7.png]

Or Maybe need to add code in global?  Huh


The default code of Template: index_whosonline_memberbit
{$user['profilelink']}{$invisiblemark}

The Templante with Font Awesome 4.7
<span class="titletag titletag_{$usergroup['gid']}">&nbsp;</span>{$user['profilelink']}{$invisiblemark}


My Global.css with FA 4.7
/** 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 #000000;
   background: green;
   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;
}

/** Gid FA 4.7 Username Icon Postbit & Profile & Memberlist by Vintagedaddyo **/

.titletag {
   display: inline-block;
   font-family: "FontAwesome";
   font-weight: 600;
}

.titletag_4:before {
   content: "\f013";
   color: #ef6f1c;
}

.titletag_6:before {
   content: "\f0e3";
   color: #2f9c0e;
}

.titletag_3:before {
   content: "\f0e3";
   color: #CC00CC;
}

.titletag_2:before {
   content: "\f007";
   color: #3366ff;
}


Thanks in advance for Support!
CSS says grouptag, template says titletag?
(2020-01-13, 12:04 AM)HLFadmin Wrote: [ -> ]CSS says grouptag, template says titletag?

Sorry, forget put all code of FA 4.7, That its Tutorial i am using of vintagedaddyo

work in member_profile and memberlist_user

Blush
(2020-01-13, 12:40 AM)DiegoPino Wrote: [ -> ]
(2020-01-13, 12:04 AM)HLFadmin Wrote: [ -> ]CSS says grouptag, template says titletag?

Sorry, forget put all code of FA 4.7That its Tutorial i am using of vintagedaddyo

work in member_profile and memberlist_user

Blush


Have you tried:

<span class="titletag titletag_{$user['usergroup']}">&nbsp;</span>{$user['profilelink']}{$invisiblemark}

[Image: Screenshot-20200113-031915-Firefox.jpg]
(2020-01-13, 11:17 AM)vintagedaddyo Wrote: [ -> ]Have you tried:

<span class="titletag titletag_{$user['usergroup']}">&nbsp;</span>{$user['profilelink']}{$invisiblemark}

Hi @vintagedaddyo Thanks in Advance for Support!

now the code is displayed well Big Grin
Greeting from Colombia, you are welcome Cool

Thank you so Much!
(2020-01-13, 12:47 PM)DiegoPino Wrote: [ -> ]
(2020-01-13, 11:17 AM)vintagedaddyo Wrote: [ -> ]Have you tried:

<span class="titletag titletag_{$user['usergroup']}">&nbsp;</span>{$user['profilelink']}{$invisiblemark}

Hi @vintagedaddyo  Thanks in Advance for Support!

now the code is displayed well  Big Grin 
Greeting from Colombia, you are welcome  Cool

Thank you so Much!

No worries, I am glad you got it sorted out and please do feel free to add that whosonline addition to that particular tutorial you have posted on your board modifications section. Smile Also fyi I added it to the original support source link of mine back then that you just now provided here: https://community.mybb.com/thread-220074...pid1315887



So the support tutorial should be more like this now:  *only main difference between support tutorial and the main tutorial I deleted was that the main tutorial had the grouptag (gid name specific) and titletag (gid number specific) tutorials in one place as well as the font awesome headerincludes were optional as external linkage or provided also for the provided internal libraries provided in that particular tutorial as attachments, oh, and preview images provided. Wink



You could try this....

Gid FA Username Icon Postbit & Profile & Memberlist

For Font Awesome 4.7 :

In headerinclude add:

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

For Font Awesome 5:

In headerinclude add:

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css">


Add to global.css

FA 4.7:

/** Gid FA 4.7 Username Icon Postbit & Profile & Memberlist by Vintagedaddyo **/

.titletag {
   display: inline-block;
   font-family: "FontAwesome";
   font-weight: 600;
}

.titletag_4:before {
   content: "\f013";
   color: #008000;
}

.titletag_6:before {
   content: "\f0e3";
   color: #CC00CC;
}

.titletag_3:before {
   content: "\f0e3";
   color: #CC00CC;
}

.titletag_2:before {
   content: "\f007";
   color: #0072BF;
}


For FA 5:

/** Gid FA 5 Username Icon Postbit & Profile & Memberlist by Vintagedaddyo **/

.titletag {
   display: inline-block;
   font-family: "Font Awesome 5 Free";
   font-weight: 900;
}

.titletag_4:before {
   content: "\f013";
   color: #008000;
}

.titletag_6:before {
   content: "\f0e3";
   color: #CC00CC;
}

.titletag_3:before {
   content: "\f0e3";
   color: #CC00CC;
}

.titletag_2:before {
   content: "\f007";
   color: #0072BF;
}



In postbit and postbit_classic find:

<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />

Replace with:

<span class="titletag titletag_{$usergroup['gid']}">&nbsp;</span><strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />

In member_profile find:

<span class="largetext"><strong>{$formattedname}</strong></span><br />

Replace with:

<span class="titletag titletag_{$memprofile['usergroup']}">&nbsp;</span><span class="largetext"><strong>{$formattedname}</strong></span><br />

In memberlist_user find:

{$user['profilelink']}<br />

And replace with:

<span class="titletag titletag_{$usergroup['gid']}">&nbsp;</span>{$user['profilelink']}<br />

Now, you can keep adding to this by adding additional "gids" to the css.


MyBB default "gids" are:

 
 [ 1 ] _ Guests
 [ 2 ] _ Registered
 [ 3 ] _ Super Moderators
 [ 4 ] _ Administrators
 [ 5 ] _ Awaiting Activation
 [ 6 ] _ Moderators
 [ 7 ] _ Banned

And same can be done by further adding your non default "gids" to the css.

If you are having a hard time figuring out all your gids you can download getgroups.php attached below and upload it to your forum root directory and visit it by "forum/getgroups.php" and it will display all of your currrent gids by number and name.

[attachment=42468]


Gid FA Username Icon Index Whosonline


Update: another user here https://community.mybb.com/thread-226039...pid1341637 asked if this can be also used on the index whosonline and the answer is yes


In index_whosonline_memberbit template find:

{$user['profilelink']}{$invisiblemark}

Replace with:

<span class="titletag titletag_{$user['usergroup']}">&nbsp;</span>{$user['profilelink']}{$invisiblemark}
This doesn´t work with me! I follow all the steps and nothing