miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /  
 

Change Admin/Moderators text color?

 
Author Nherm
Guest
#1 | Posted: 16 Feb 2008 15:30 
So as the title says how to change admin/moderators text colors? So you don't have to use BBcode everytime when you are writing a message. I dont mean username color or title colors just the plain text when you are writing.

Author Paul
Lead Developer 
#2 | Posted: 18 Feb 2008 04:30 
It appears to be a custom question so I can't give the exact code solution free.

The idea of it is that you could use parseMessage() function to apply the additional color attribute to the posted text, comparing by poster's ID.

Author Nherm
Guest
#3 | Posted: 18 Feb 2008 07:10 
Aah thx for advice. I try to figure something out :)

Author Santocool
Partaker
#4 | Posted: 11 Mar 2009 16:36 
this topic says nothing. I wanna know how to change the color of the word Moderator next to nickname. thanks!

Author kuopassa
Partaker
#5 | Posted: 16 Mar 2009 05:15 
Santocool, perhaps you could tweak language file by changing this:

$l_moderator='Moderator';

To look like this:

$l_moderator='<span class="moderator">Moderator</span>';

So after that you can use CSS to change text color. For example in CSS file you could put this:

span.moderator { color: #c00; }

Author K3Exe
Partaker
#6 | Posted: 13 Mar 2014 01:14 
Paul:
It appears to be a custom question so I can't give the exact code solution free.
where is the payment solution ?

Author Paul
Lead Developer 
#7 | Posted: 13 Mar 2014 21:15 
I could provide a paid solution under a personal request.
I was not meaning there already exists some standalone solution for this task.

Author K3Exe
Partaker
#8 | Posted: 19 Mar 2014 21:27 
Paul
I need color text for admin and mod is automatic #00C0FF

where I can download this add-on like other?
I have no problem in pay

Author Paul
Lead Developer 
#9 | Posted: 19 Mar 2014 21:29 
K3Exe:
I need color text for admin and mod is automatic #00C0FF
For this, you don't have to use the Color picker add-on.
It's about parseMessage function.

Contact me directly if you would like to order the customized solution, I guess it's easy and could cost you not more than $10-$15 (depends on my time of implementation).

Author K3Exe
Partaker
#10 | Posted: 19 Mar 2014 22:18 
OK

Author Paul
Lead Developer 
#11 | Posted: 4 Apr 2014 19:05 
K3Exe
Thanks for your support. I will provide the solution to all users from your permission below.

So, if you would like to make the color of fonts from Admin's or Moderator's messages different from the other messages (default fonts) like K3Exe requested, you have to do the following:

1) Edit your forum's CSS file (default is bb_default_style.css), adding the following new class below of it:

.adminText{
color:#00C0FF;
}
(there you specify the color itself)

2) Edit bb_plugins.php. If there is no parseMessage function coming with add-ons, add it:

function parseMessage(){


}
if there's already such function, don't add it twice.

Add before the closing } and/or before the possible 'return' statement of that function the following code:


if($GLOBALS['poster_id']==1 or checkModerator($GLOBALS['mods'], $GLOBALS['poster_id'])) $GLOBALS['adminText']=' adminText'; else $GLOBALS['adminText']='';
3) Edit templates/main_posts_cell.html. Locate the following code:

<div class="postedText">
extend it to the following:

<div class="postedText{$adminText}">
4) That's all!

Author Jaime
Partaker
#12 | Posted: 6 Apr 2014 17:46 
Thanks Paul and K3Exe, its work fine - if you need it ;-)

Greetings Jaime

Author K3Exe
Partaker
#13 | Posted: 8 Apr 2014 23:47 
:)

Author Taboi
Partaker
#14 | Posted: 21 Aug 2024 01:51 
Thanks Paul, this was very informative.

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 Change Admin/Moderators text color?
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑