Page 1 of 1

Default Post Colour

Posted: Fri Jul 15, 2011 4:22 pm
by Netframe
I'm on a roll with questions today, and I apologize...

I'm seeking a way to make it so admins and moderators have a post colour by default, so when they post, their text is a different colour.. I'm unsure on how to do this..

As an example.. on Blizzard Entertainment's battle.net, their mods, and admins post in blue text by default, with out having to use the font colour.

Thanks! :)

Re: Default Post Colour

Posted: Fri Jul 15, 2011 5:20 pm
by Pit$Bull

Re: Default Post Colour

Posted: Fri Jul 15, 2011 6:05 pm
by Mick
Moved to "MOD Requests" at user request.

Re: Default Post Colour

Posted: Fri Jul 15, 2011 9:05 pm
by Ather
i've made a quick and dirty hack, maybe it can be useful

with my code, you can either colorize your posts by the poster's rank or his rank color

for prosilver, open styles/prosilver/templates/viewtopic_body.html

find : <div class="content">{postrow.MESSAGE}</div>
replace with :
<div class="content"><!-- IF postrow.RANK_TITLE eq 'Site Admin' --><font color="red">{postrow.MESSAGE}</font><!-- ELSE -->{postrow.MESSAGE}<!-- ENDIF --></div>
the above code is based on User's rank, e.g if the rank is Site Admin, it will show red color, else normal black message

Option 2:
<div class="content"><!-- IF postrow.POST_AUTHOR eq 'admin' --><font color="red">{postrow.MESSAGE}</font><!-- ELSE -->{postrow.MESSAGE}<!-- ENDIF --></div>
this code is based on username, if the poster is a user named admin, color will be red

screenshot: (click to enlarge)
Image

Re: Default Post Colour

Posted: Fri Jul 15, 2011 9:57 pm
by Netframe
Ather wrote:i've made a quick and dirty hack, maybe it can be useful

with my code, you can either colorize your posts by the poster's rank or his rank color

for prosilver, open styles/prosilver/templates/viewtopic_body.html

find : <div class="content">{postrow.MESSAGE}</div>
replace with :
<div class="content"><!-- IF postrow.RANK_TITLE eq 'Site Admin' --><font color="red">{postrow.MESSAGE}</font><!-- ELSE -->{postrow.MESSAGE}<!-- ENDIF --></div>
the above code is based on User's rank, e.g if the rank is Site Admin, it will show red color, else normal black message

Option 2:
<div class="content"><!-- IF postrow.POST_AUTHOR eq 'admin' --><font color="red">{postrow.MESSAGE}</font><!-- ELSE -->{postrow.MESSAGE}<!-- ENDIF --></div>
this code is based on username, if the poster is a user named admin, color will be red

screenshot: (click to enlarge)
Image
You're the best!!!! Thank you so much!

Oh! One more thing... can I add 2 of those? One for my moderators, and the admins? I set up the Admins, but I'd like my mods to post in other colors too :)

Re: Default Post Colour

Posted: Fri Jul 15, 2011 10:16 pm
by Ather
yes its possible, if your mod's rank is for example called : Moderators, then you can alter the code as follows :

Code: Select all

<div class="content"><!-- IF postrow.RANK_TITLE eq 'Site Admin' --><font color="#AA0000">{postrow.MESSAGE}</font><!-- ELSEIF postrow.RANK_TITLE eq 'Moderator' --><font color="green">{postrow.MESSAGE}</font><!-- ELSE -->{postrow.MESSAGE}<!-- ENDIF --></div>
basically to add more, you do <!-- ELSEIF postrow.RANK_TITLE eq 'Moderator' --><font color="green">{postrow.MESSAGE}</font> just change the title in quotes and the color

Re: Default Post Colour

Posted: Fri Jul 15, 2011 10:25 pm
by Netframe
Ather wrote:yes its possible, if your mod's rank is for example called : Moderators, then you can alter the code as follows :

Code: Select all

<div class="content"><!-- IF postrow.RANK_TITLE eq 'Site Admin' --><font color="#AA0000">{postrow.MESSAGE}</font><!-- ELSEIF postrow.RANK_TITLE eq 'Moderator' --><font color="green">{postrow.MESSAGE}</font><!-- ELSE -->{postrow.MESSAGE}<!-- ENDIF --></div>
basically to add more, you do <!-- ELSEIF postrow.RANK_TITLE eq 'Moderator' --><font color="green">{postrow.MESSAGE}</font> just change the title in quotes and the color
Awesome! I have one more question... the colours are overriding white text... is there a way to fix that, or am I going to have to deal with it?

Like, I made a BBcode to bold and highlight text #FFFFFF, but it's now making it my admins colours, which is lightblue... is there a way to fix that, or ..?

Re: Default Post Colour

Posted: Fri Jul 15, 2011 10:30 pm
by Netframe
Never mind, I was able to fix it by change the bbcode to <font color> :)

Thank so much again!!!!

Re: Default Post Colour

Posted: Tue Oct 04, 2011 2:17 pm
by sweet.ksh
i add it but it is not working my forum version is 3.9 plz help me

Re: Default Post Colour

Posted: Tue Oct 04, 2011 5:27 pm
by 4_seven

Re: Default Post Colour

Posted: Sun Aug 09, 2015 6:54 am
by Netframe
I can't get this to work anymore, any suggestions?