MyBB Hacks

Full Version: Simple Post Style Based On Usergroup
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This template and CSS edit will give us a simple post layout based on user usergroup.

In postbit/postbit_classic template, find tborder. Add tborder{$post['usergroup']} beside the original tborder class. Something like this:

HTML Code
class="tborder tborder{$post['usergroup']}"


Then, create a new CSS class.
For example,
the .tborder4 class will be applied for posts posted by usergroup id 4 (by default, Administrators Group),
the .tborder6 class will be applied for posts posted by usergroup id 6 (by default, Moderators Group).

If a usergroup doesn't have this new class, the usergroup will use the original tborder class. So, we don't need to create a new class for all usergroup. Just create it for some usergroup.

We can do that with other class too (if we want), like trow1, trow2, post_body and etc.

very nice, especially good for if you want a moderators posts to stand out.
Very simple edit, and not to much works needed in CSS and template (I think) Biggrin.
Nice and easy! Wink
Nice tip RateU Smile
Reference URL's