|
Post by Streamstrider on Jul 13, 2012 15:56:43 GMT -8
So, I've already requested a code that allows one to change the board title color for each individual category. What I'm wondering now is if it's possible to modify each catbg/cattext individually as well? XD
|
|
|
Post by Wormopolis on Jul 13, 2012 17:11:51 GMT -8
what code are you using to change the board title colors?
|
|
|
Post by Streamstrider on Jul 13, 2012 17:33:01 GMT -8
<script type="text/javascript"> <!-- // Color Board Titles based on Categories v2 // by Wormo
var catColors=new Array(); //these are the category ids and the colors associated with them catColors['general']=['#FF0000','#0FF000']; //first hex is catname color, second is boardname color catColors['categ2']=['#FF0000','#0FF000']; catColors['categ3']=['#FF0000','#0FF000']; catColors['categ4']=['#FF0000','#0FF000'];
if (pb_action.match(/home|boardindex/)) { var brdChkArray=new Array(); var fj=document.getElementById('forumjump'); var currcat=''; for (opts=fj.options, oo=0; oo<opts.length; oo++) { if (opts[oo].value && opts[oo].value.match(/cgi#(.*?)$/)) currcat=RegExp.$1; if (opts[oo].value && opts[oo].value.match(/board=(.*?)$/)) brdChkArray[RegExp.$1]=currcat; } for (tds=document.getElementsByTagName('td'), tt=0; tt<tds.length; tt++) { if (tds[tt].colSpan=='5' && tds[tt].className=='catbg' && tds[tt].firstChild.nodeName.match(/a/i) && tds[tt].firstChild.name) { if (catColors[tds[tt].firstChild.name]) tds[tt].getElementsByTagName('font')[0].color = catColors[tds[tt].firstChild.name][0]; } if (tds[tt].width=='66%' && tds[tt].className.match(/windowbg/) && tds[tt].firstChild && tds[tt].firstChild.getElementsByTagName('a')[0] ) { tmpbrd=tds[tt].firstChild.getElementsByTagName('a')[0]; if (tmpbrd.href.match(/board=(.*?)$/) && brdChkArray[RegExp.$1] && catColors[brdChkArray[RegExp.$1]]) { tmpbrd.innerHTML='<font color="'+ catColors[brdChkArray[RegExp.$1]][1] + '">' + tmpbrd.innerHTML + '</font>'; } } }
}
// --> </script>
|
|
|
Post by Wormopolis on Jul 13, 2012 20:37:49 GMT -8
do you want the cat titles to be the same color as board titles?
|
|
|
Post by Streamstrider on Jul 14, 2012 15:40:30 GMT -8
Not really. XD I just want to be able to modify the catbg/cattext of the individual categories, so, separate from each other and the board titles.
|
|
|
Post by Wormopolis on Jul 14, 2012 18:51:34 GMT -8
see what that does
|
|
|
Post by Streamstrider on Jul 26, 2012 8:41:15 GMT -8
|
|
|
Post by Wormopolis on Jul 29, 2012 4:36:53 GMT -8
there was a blank space between the anchor and the font tag. try that one.
|
|
|
Post by Streamstrider on Aug 9, 2012 12:53:41 GMT -8
Awesomesauce! Thanks so much, Wormo!
|
|