miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | 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 | Edited by: Paul 
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
Registered
#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
Registered
#5 | Posted: 16 Mar 2009 05:15 | Edited by: kuopassa 
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
Registered
#6 | Posted: 13 Mar 2014 01:14 | Edited by: K3Exe 
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
Registered
#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
Registered
#10 | Posted: 19 Mar 2014 22:18 
OK

Author Paul
Lead Developer
#11 | Posted: 4 Apr 2014 19:05 | Edited by: Paul 
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
Registered
#12 | Posted: 6 Apr 2014 17:46 
Thanks Paul and K3Exe, its work fine - if you need it ;-)

Greetings Jaime

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

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications / Change Admin/Moderators text color? Top

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

 Short link for this topic:

 ?
You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB