Due to a basic request for the likes of such here: https://community.mybb.com/thread-148832...pid1332871 * and for their specific needs all they wanted was the post border to reflect usergroup color, and as there are plenty of ways to do such...
Here is a simple start you can simply diy via css for your specific purposes and further expand upon for a simple example:
![[Image: 2cwwen5.png]]()
Add to global.css:
** You would then edit, add, modify to reflect your existing gid #s as you have done with my other previous gid based tutorials...
Now, you can keep adding to this by adding additional "gids" to the css.
MyBB default "gids" are:
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.
Download getgroups.php:
https://community.mybb.com/attachment.php?aid=40961
Last but not least, you must edit two templates:
In postbit template:
Find:
Replace:
In postbit classic template:
Find:
Replace:
Here is a simple start you can simply diy via css for your specific purposes and further expand upon for a simple example:
Add to global.css:
/** Gid Postbody Border CSS **/
/** All if needed **/
.gidpostbody {
/* here */
margin-top: 0;
margin-bottom: 0;
padding: 0;
}
/** Define by group id **/
.gidpostbody_4 {
/* define border gid 4*/
border: 1px solid #008000;
}
.gidpostbody_4:hover {
/* define border gid 4 */
border: 1px dotted #008000;
}
.gidpostbody_6 {
/* define border gid 6 */
border: 1px solid #CC00CC;
}
.gidpostbody_6:hover {
/* define border gid 6 */
border: 1px dotted #CC00CC;
}
.gidpostbody_3 {
/* define border gid 3 */
border: 1px solid #CC00CC;
}
.gidpostbody_3:hover {
/* define border gid 3 */
border: 1px dotted #CC00CC;
}
.gidpostbody_2 {
/* define border gid 2 */
border: 1px solid #0072BF;
}
.gidpostbody_2:hover {
/* define border gid 2 */
border: 1px dotted #0072BF;
}** You would then edit, add, modify to reflect your existing gid #s as you have done with my other previous gid based tutorials...
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.
Download getgroups.php:
https://community.mybb.com/attachment.php?aid=40961
Last but not least, you must edit two templates:
In postbit template:
Find:
<div class="post {$unapproved_shade}" style="{$post_visibility}" id="post_{$post['pid']}">Replace:
<div class="post {$unapproved_shade} gidpostbody gidpostbody_{$usergroup['gid']}" style="{$post_visibility}" id="post_{$post['pid']}">In postbit classic template:
Find:
<div class="post classic {$unapproved_shade}" style="{$post_visibility}" id="post_{$post['pid']}">Replace:
<div class="post classic {$unapproved_shade} gidpostbody gidpostbody_{$usergroup['gid']}" style="{$post_visibility}" id="post_{$post['pid']}">