MyBB Community Forums

Full Version: Change forum title color
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone!

Currently i use the following to change the forum's title color.

<span style="font-weight:bold; color:gold;">General Rules</span>

The problem i am facing is with dvz shoutbox bot,because it will parse the whole string to the shoutbox:

Like this:


Username has written a new post in <span style="font-weight:bold; color:gold;">General Rules</span>
So,is there some other method to change the forum's title color like the trick to use the thread's color while using the following in the global.css?


span#tid_149 a {
   color: gold!important;
}


I tried with:


span#fid_10 a {
   color: gold;
}
But it didn't work.

Please help me.

Thanks a lot.
Still seeking for help!
You could try:


For forums:

Add to global.css



/**  Colored Forum Titles by Fids by vintagedaddyo **/

.fcolor_2 a:link,.fcolor_2 a:active {
color:green!important;
font-weight:700!important;
}

.fcolor_2 a:visited {
color:green!important;
font-weight:700!important;
text-decoration:none!important;
}

.fcolor_2 a:hover {
color:green!important;
font-weight:700!important;
text-decoration:underline!important;
}

.fcolor_3 a:link,.fcolor_3 a:active {
color:#FFD700!important;
font-weight:700!important;
}

.fcolor_3 a:visited {
color:#FFD700!important;
font-weight:700!important;
text-decoration:none!important;
}

.fcolor_3 a:hover {
color:#FFD700!important;
font-weight:700!important;
text-decoration:underline!important;
}

.fcolor_4 a:link,.fcolor_4 a:active {
color:red!important;
font-weight:700!important;
}

.fcolor_4 a:visited {
color:red!important;
font-weight:700!important;
text-decoration:none!important;
}

.fcolor_4 a:hover {
color:red!important;
font-weight:700!important;
text-decoration:underline!important;
}



* you then would adjust the fcolor_ #  numbers to match your forum ids and add further ids and colors for all of your forum ids. This way you can have different colors for any and or all.


In forumbit_depth2_forum template find:

<strong><a href="{$forum_url}">{$forum['name']}</a></strong> 

And replace with:

<span class="fcolor_{$forum['fid']}"><a href="{$forum_url}">{$forum['name']}</a></span>


For subforums:

In forumbit_depth3 find:

<strong><a href="{$forum_url}" title="{$forum_viewers_text_plain}">{$forum['name']}</a></strong>

Replace with:

<span class="sfcolor_{$forum['fid']}"><a href="{$forum_url}" title="{$forum_viewers_text_plain}">{$forum['name']}</a></span>

Add to global.css:

/** Subforum title color by fid by vintagedaddyo **/

.sfcolor_6 a:link,.sfcolor_6 a:active {
color:green!important;
font-weight:700!important;
}

.sfcolor_6 a:visited {
color:green!important;
font-weight:700!important;
text-decoration:none!important;
}

.sfcolor_6 a:hover {
color:green!important;
font-weight:700!important;
text-decoration:underline!important;
}



* you then would adjust the sfcolor_ #  numbers to match your sub forum ids and add further ids and colors for all of your forum ids. This way you can have different colors for any and or all.



For colored thread titles:

In showthread find:

<div>
<strong>{$thread['threadprefix']}{$thread['subject']}</strong>
</div> 

replace with:

<div>
<span class="tcolor_{$thread['tid']}">{$thread['threadprefix']}{$thread['subject']}</span>
</div> 		


Add to global.css:


/** colored by tid thread titles by vintagedaddyo **/

.tcolor_1 {
color:orange!important;
font-weight:700!important;
}

.tcolor_2 {
color:yellow!important;
font-weight:700!important;
}

.tcolor_3 {
color:red!important;
font-weight:700!important;
}


* you then would adjust the tcolor_ #  numbers to match your thread ids and add further ids and colors for all of your thread ids. This way you can have different colors for any and or all.



For colored threadlist titles:

in forumdisplay_thread find:

<span>{$prefix} {$gotounread}{$thread['threadprefix']}<span class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}"><a href="{$thread['threadlink']}">{$thread['subject']}</a></span>{$thread['multipage']}</span>

replace with:

  <span>{$prefix} {$gotounread}{$thread['threadprefix']}<span class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}"><span class="tlcolor_{$thread['tid']}"><a href="{$thread['threadlink']}">{$thread['subject']}</a></span></span>{$thread['multipage']}</span>
 


Add to global.css:


/** colored by tid threadlist titles by vintagedaddyo **/

.tlcolor_1 a:link,.tlcolor_1 a:active {
color:orange!important;
font-weight:700!important;
}

.tlcolor_1 a:visited {
color:orange!important;
font-weight:700!important;
text-decoration:none!important;
}

.tlcolor_1 a:hover {
color:orange!important;
font-weight:700!important;
text-decoration:underline!important;
}

.tlcolor_2 a:link,.tlcolor_2 a:active {
color:#FFD700!important;
font-weight:700!important;
}

.tlcolor_2 a:visited {
color:#FFD700!important;
font-weight:700!important;
text-decoration:none!important;
}

.tlcolor_2 a:hover {
color:#FFD700!important;
font-weight:700!important;
text-decoration:underline!important;
}

.tlcolor_3 a:link,.tlcolor_3 a:active {
color:red!important;
font-weight:700!important;
}

.tlcolor_3 a:visited {
color:red!important;
font-weight:700!important;
text-decoration:none!important;
}

.tlcolor_3 a:hover {
color:red!important;
font-weight:700!important;
text-decoration:underline!important;
}

 


* you then would adjust the tlcolor_ #  numbers to match your thread ids and add further ids and colors for all of your thread ids. This way you can have different colors for any and or all.



For category depth 1 & 2 titles:


Find in forumbit_depth1_cat:

<div><strong><a href="{$forum_url}">{$forum['name']}</a></strong><br /><div class="smalltext">{$forum['description']}</div></div>

Replace with:
<div><span class="catcolord1_{$forum['fid']}"><a href="{$forum_url}">{$forum['name']}</a></span><br /><div class="smalltext">{$forum['description']}</div></div>


Find in forumbit_depth2_cat:

<strong><a href="{$forum_url}">{$forum['name']}</a></strong>{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$subforums}</div>

And replace with:

<span class="catcolord2_{$forum['fid']}"><a href="{$forum_url}">{$forum['name']}</a></span>{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$subforums}</div>



add to global.css:

 
/** colored category depth 1&2 titles by vintagedaddyo**/


/** d1**/

.catcolord1_1 a:link,.catcolord1_1 a:active {
color:orange!important;
font-weight:700!important;
}

.catcolord1_1 a:visited {
color:orange!important;
font-weight:700!important;
text-decoration:none!important;
}

.catcolord1_1 a:hover {
color:orange!important;
font-weight:700!important;
text-decoration:underline!important;
}

.catcolord1_2 a:link,.catcolord1_2 a:active {
color:yellow!important;
font-weight:700!important;
}

.catcolord1_2 a:visited {
color:yellow!important;
font-weight:700!important;
text-decoration:none!important;
}

.catcolord1_2 a:hover {
color:yellow!important;
font-weight:700!important;
text-decoration:underline!important;
}

/** d2 **/

.catcolord2_3 a:link,.catcolord2_3 a:active {
color:purple!important;
font-weight:700!important;
}

.catcolord2_3 a:visited {
color:purple!important;
font-weight:700!important;
text-decoration:none!important;
}

.catcolord2_3 a:hover {
color:purple!important;
font-weight:700!important;
text-decoration:underline!important;
}

.catcolord2_5 a:link,.catcolord2_5 a:active {
color:red!important;
font-weight:700!important;
}

.catcolord2_5 a:visited {
color:red!important;
font-weight:700!important;
text-decoration:none!important;
}

.catcolord2_5 a:hover {
color:red!important;
font-weight:700!important;
text-decoration:underline!important;
}

catcolord2_9 a:link,.catcolord2_9 a:active {
color:gold!important;
font-weight:700!important;
}

.catcolord2_9 a:visited {
color:gold!important;
font-weight:700!important;
text-decoration:none!important;
}

.catcolord2_9 a:hover {
color:gold!important;
font-weight:700!important;
text-decoration:underline!important;
}



* you then would adjust the catcolord1_ #  & catcolord2_# numbers to match your forum ids and add further ids and colors for all of your forum ids. This way you can have different colors for any and or all.


Fyi: I put this up as a tutorial here: https://community.mybb.com/thread-220123-lastpost.html
 that I will expand upon if and or when my time allows. Smile
If i say thanks to you,it will not cover up your hard work.

But i have no words,on how you make us every single thing clear.

Really appreciated.

I have tried only the forum color list part,it works fine but there is only a small problem that when i visit a forum where i have used this tutorial,somehow it will not show up the coloured title.

Here is the forum's title:

[attachment=41018]

and here when i visit it:

[attachment=41019]

[attachment=41023]


What could be the problem?

Thanks a lot
That is because that particular styling is not yet defined as I did not include that in the tutorial..., yet. I am styling these by individual targets..., that way some or all can be used. As far as the target you are pointing out, I just havent gotten the free time yet to get yo those. I will add those to the tutorial when my time allows..., hence why I linked the tutorial so you can stayed tuned to the expanding tutorial. Wink
Oh ok,i thought it was here:


.fcolor_2 a:visited {
color:green!important;
font-weight:700!important;
text-decoration:none!important;
}


What is the meaning of that a:visited?
(2018-10-09, 10:54 PM)kbilly Wrote: [ -> ]Oh ok,i thought it was here:


.fcolor_2 a:visited {
color:green!important;
font-weight:700!important;
text-decoration:none!important;
}


What is the meaning of that a:visited?

That is the visited state of the existing styled link.

As far as thinking it was that, easy mistake. Look at the attached image below. Notice the white title just like your image? Thus why I explained I have yet to add how to style that target yet to the tutorial. Oh, and for that target it is and will be text color styling and not link color styling as that element is not a link. Smile

For that specific info title you can try:

Add to global.css:

/** colored by fid forum info titles by vintagedaddyo **/

.finfocolor_1 {
color:orange!important;
font-weight:700!important;
}

.finfocolor_2 {
color:yellow!important;
font-weight:700!important;
}

.finfocolor_3 {
color:red!important;
font-weight:700!important;
}



In forumdisplay_threadlist find:

<strong>{$foruminfo['name']}</strong>


And replace with:

<span class="finfocolor_{$thread['fid']}">{$foruminfo['name']}</span>


* you then would adjust the finfocolor_ #  numbers to match your forum ids and add further ids and colors for all of your forum ids. This way you can have different colors for any and or all.
Worked 101%.

Thankyou.
(2018-10-10, 09:40 PM)kbilly Wrote: [ -> ]Worked 101%.

Thankyou.

Cool beans and no worries. Glad it worked out for you and you got it sorted. Smile
Working Great.
Thanks User6029.
Thank you.