MyBB Community Forums

Full Version: Default Text Color, just for one usergroup?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So, is it possible to make, lets say admin default text color blue, green etc.

I'm working on my new theme... and I was wondering is this possible... that would be really cool to do.

Thanks in advance.
My
Home ยป User Groups
Edit User Group > Username Style

Example:
<span style="color: red;"><strong>{username}</strong></span>
No no no, not username style. Smile
Is it possible to change default post text for one usergroup, for example, make default admin post text color blue.
Not without a plugin. You will need to fetch the poster gid then you can add a variable like {$group_post_style}.
And use a bit like this:
Plugin Wrote:if ($post['usergroup'] = 4) {
$group_post_style = 'color: green';
}
Theme Wrote:<span style="{$group_post_style};">
{$post['message']}
</span>
Hello,

the thread is a bit "old" but I have a question.

Where can I insert this plugin code? How I must link it? Which file type should it be (php?)?

Best regards.

And btw. is it possible that I delete the "sceditor toolbar" for usual users like members or any other group?
^ for the group post color you can try using Group Post CSS plugin
(details are given on the plugin's page)

for the toolbar related requirement you can install template conditionals plugin
and add condition in codebuttons template (in ungrouped templates) like below
add at the beginning of the template
<if in_array($mybb->user['usergroup'], array(3,4,6)) then>
add at the end of the template
</if>

in above code, toolbar loads for below user groups only :
3 -> super moderators
4 -> administrators
6 -> moderators

in the editor, left column of smilies doesn't work with using above code.
that can be removed from Clickable Smilies and BB Code page of Settings section

forum admin panel >> Configuration [Settings] >> Clickable Smilies and BB Code
>> Clickable Smilies Inserter --> set to off & save settings
Search in postbit && postbit_classic theme templates for:
<div class="post_body scaleimages" id="pid_{$post['pid']}">

Replace it in both templates with:
<div class="post_body scaleimages post_color_{$post['usergroup']}" id="pid_{$post['pid']}">

and add into theme CSS file global.css:
.post_color_1 {color: yellow !important;}
.post_color_2 {color: green !important;}
.post_color_3 {color: blue !important;}
.post_color_4 {color: red !important;}
.post_color_5 {color: purple !important;}
.post_color_6 {color: darkslategray !important;}

The number after ".post_color_" represents the usergroup id. Wink
Thank you for your help! I appreciate it! Thank you!

Best regards Sauron Smile)))