MyBB 1.8.x Mod  whosonline addition Font Awesome by vintagedaddyo
#1
Bug 
whosonline addition Font Awesome by vintagedaddyo

Fuente: https://community.mybb.com/thread-220074-post-1315887.html#pid1315887

(10-05-2018, 02:01 AM)vintagedaddyo Wrote: You could try this....

Gid FA Username Icon Postbit & Profile & Memberlist


For Font Awesome 4.7 :

In headerinclude add:

Code:
<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:

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

Add to global.css

FA 4.7:

Code:
/** 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;
}

Code:
/** 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:


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


Replace with:


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


In member_profile find:


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


Replace with:


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

In memberlist_user find:

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


And replace with:

Code:
<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:

Code:
[ 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.

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:

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

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


Attached Files
.php   getgroups(1).php (Size: 400 bytes / Downloads: 2)
[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  [Tutorial] Replace showthread sprite with your own individual images by vintagedaddyo DiegoPino 0 361 12-06-2019, 08:55 PM
Last Post: DiegoPino
  MyBB 1.8.x Mod  Plugin announcements with Marquee by Vintagedaddyo DiegoPino 0 431 11-21-2019, 04:13 PM
Last Post: DiegoPino
  MyBB 1.8.x Mod  Plugin ForumsIcons by Vintagedaddyo DiegoPino 0 436 11-21-2019, 04:10 PM
Last Post: DiegoPino
Bug MyBB 1.8.x Mod  Plugin Download by Vintagedaddyo DiegoPino 0 481 11-21-2019, 04:06 PM
Last Post: DiegoPino

Forum Jump:


Users browsing this thread: 1 Guest(s)