| This board has been archived and is no longer accepting new questions. If you have a support question for your ZetaBoard, please visit us at the new support board. Registration is free and easy. Visit the NEW ZetaBoards Support forum! |
| Add Colors; allows you to add more colors | |
|---|---|
| Topic Started: Feb 6 2008, 07:57 PM (5,055 Views) | |
| Interrobang | Feb 10 2008, 03:19 AM Post #11 |
|
Yeah, I went there.
![]() ![]() ![]()
|
Edit: not to derail your thread, I just made a new topic.
Edited by Interrobang, Feb 10 2008, 06:36 PM.
|
![]() |
|
| lanie | Feb 10 2008, 12:35 PM Post #12 |
|
Member
![]() ![]() ![]()
|
Thanks very much, I appreciate your help |
![]() |
|
| g0dfather | May 18 2008, 08:38 PM Post #13 |
|
Member
![]() ![]() ![]() ![]()
|
Thank you! |
![]() |
|
| Thunder | May 19 2008, 01:17 PM Post #14 |
|
Thunder
![]() ![]() ![]() ![]() ![]()
|
Preview, please? |
![]() |
|
| Ambrosia | May 19 2008, 05:59 PM Post #15 |
|
Member
![]() ![]() ![]() ![]()
|
There are 3 scenario's with this code. 1 it worked 2 colors showed up in the drop down list and on the post made. 3 shows the color in preview, but output is default theme colour AND all the colours in the drop down menu are grey (supposed to display the colour it is) <script type="text/javascript"> <!-- var colors = [["Deeppink2", "ee1289"], ["Slateblue", "7a67ee"], ["Royalblue", "3333ff"], ["Turquoise2", "00e5ee"], ["Seagreen2", "4eee94"], ["Red3", "cd0000"], ["Magenta3", "cd00cd"], ["Papaya", "ffff7e"], ["Plum2", "eaadea"], ["Violetred", "db2645"]]; 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][0], colors[j][1]); for(var i = 1; i < this.options.length; i ++) this.options.style.color = this.options.value; }); // --> </script> I added more colours then everything 'broke', now even if I remove the full code it won't revert my default colours in the drop down menu! |
![]() |
|
| Arrogant | May 19 2008, 06:51 PM Post #16 |
![]()
Vote Choco and Nicola!
![]() ![]() ![]() ![]() ![]()
|
Breaking mah codeh.
Edited by Arrogant, May 19 2008, 07:34 PM.
|
![]() |
|
| Ambrosia | May 19 2008, 07:38 PM Post #17 |
|
Member
![]() ![]() ![]() ![]()
|
Lol sorry man I don't know what happend either. The code I posted broke both of my testboards. I believe (as stated in the jQuery version) ZB is limited to 5 additional colours. And there might be a bug somewhere in the code, because even after reverting it to 1-5 colours it didn't work anymore. I checked all the settings 3 times no result. One thing that was really neat was the first 2 times I added a colour, in the drop down menu it displayed the proper colour instead of my theme's default. |
![]() |
|
| Arrogant | May 19 2008, 07:40 PM Post #18 |
![]()
Vote Choco and Nicola!
![]() ![]() ![]() ![]() ![]()
|
that's what..... does :o anyway, it should work now, and i've had it working on my test board - so more than 5 additional colors should work. o.O OH! by the way - it broke because.. 1. You didn't have a # before the hex codes in the colors array.. #FFFFFF, for example. 2. Not sure if it was when you posted it or not, but two of the array indexing []'s are missing because of how the board parses then - they're the italic ubbc ones. Edited by Arrogant, May 19 2008, 07:43 PM.
|
![]() |
|
| Ambrosia | May 19 2008, 07:44 PM Post #19 |
|
Member
![]() ![]() ![]() ![]()
|
Hell yeah! Works like a charm, I love the preview of x colour in the drop down menu. It display all the colours and more than 5. Good stuff and thanks for replying and fixing it so fast. Now i'mma have to switch back to your code
|
![]() |
|
| BlubbernuggetX | May 22 2008, 07:16 PM Post #20 |
|
Lord of the Blubbernuggets
![]() ![]() ![]() ![]()
|
Thanks, great code. |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| Go to Next Page | |
| « Previous Topic · User Created Codes · Next Topic » |




![]](http://209.85.62.24/static/1/pip_r.png)




11:08 AM Dec 8