Welcome Guest [Log In] [Register]
Viewing Single Post From: Add Colors
Arrogant
Member Avatar
Vote Choco and Nicola!
[ *  *  * ]
basically, this allows you to add more colors to the color dropdown list, as well as color the text of each option accordingly.

to add more colors, just do the following:
var colors = ["color 1"]; -> var colors = ["color 1", "color 2"]; -> var colors = ["color 1", "color 2", "color 3"];

this goes in your Board Template section, in either the Below the Board or Above the Copyright sections:
Code:
 
<script type="text/javascript"> <!--
var colors = ["color 1", "color 2", "color 3"];
if(document.posting && document.posting.fcolor) $("select[@name=fcolor]").each(function() {
for(var j = 0, f = this.options.length; j < colors.length; j++) this.options[f + j] = new Option(colors[j], colors[j]);
for(var i = 1; i < this.options.length; i ++) this.options[i].style.color = this.options[i].value;
});
// --> </script>


Edited by Arrogant, Feb 6 2008, 08:06 PM.
Offline Profile Quote Post
Add Colors · User Created Codes