crazynarutard Senior Studio Member
     Kay Has Grounded You member is offline
![[avatar] [avatar]](http://img.photobucket.com/albums/v299/jlieuw/x1pqP5noGPWAA7IefCjMYWbaajCjvqFY_GE.jpg)
Joined: Aug 2005 Gender: Male  Posts: 1,426 Location: Konoha Karma: 29 |  | Add Colors in new cell « Thread Started on Nov 18, 2005, 1:43am » | |
Global Footers
This code will add the colors normally in a drop down menu, in the posting area, in a new cell beneath the UBBC icons. <script type="text/javascript"> /* Add colors in new cell - created by crAzY_J do not redistribute this code without the creator's permission global footers*/ var iCell if( document.postForm ) { var colors = document.postForm.color; colors.style.display = 'none'; var iRow = colors.parentNode.parentNode.parentNode.parentNode.insertRow(4); iCell = iRow.insertCell(0); iCell.width = '30%';iCell.className = 'windowbg2';iCell.innerHTML = '<font size="2">Add Colors</font>'; iCell = iRow.insertCell(1); iCell.width = '70%';iCell.className= 'windowbg2'; for( o = 0 ; o < colors.options.length ; o ++ ) { iCell.innerHTML += ' <font style="cursor:pointer;" color="'+colors.options[o].value+'" onClick=\'javascript:add("[color=' +colors.options[o].value+ ']","[/color]")\'>' +colors.options[o].value+ '</font> '; } } </script>
| |
|
Curious George® Senior Member
    [p:70] member is offline
![[avatar] [avatar]](http://crazynlazy.com/bandavatars.jpg)
Music Lover
![[homepage] [homepage]](http://www.sz-ex.com/v1/icons/www.gif) Joined: Oct 2005 Gender: Male  Posts: 318 Location: A Place Called Heaven (Texas) Karma: 3 |  | Re: Add Colors in new cell « Reply #1 on Nov 18, 2005, 1:59am » | |
it works...lol
|
|
|
Team Studio Administrator
      member is offline
![[homepage] [homepage]](http://www.sz-ex.com/v1/icons/www.gif) Joined: Jun 2005 Gender: Male  Posts: 96 Karma: 4 |  | Re: Add Colors in new cell « Reply #2 on Nov 18, 2005, 2:35am » | |
Hmm..it's similar to what we did in SZ...right?
|
|
|
crazynarutard Senior Studio Member
     Kay Has Grounded You member is offline
![[avatar] [avatar]](http://img.photobucket.com/albums/v299/jlieuw/x1pqP5noGPWAA7IefCjMYWbaajCjvqFY_GE.jpg)
Joined: Aug 2005 Gender: Male  Posts: 1,426 Location: Konoha Karma: 29 |  | Re: Add Colors in new cell « Reply #3 on Nov 18, 2005, 2:36am » | |
Quote:Hmm..it's similar to what we did in SZ...right?  |
|
It's the same. Because George requested it at SSD
| |
|
Bruce Banner Head Coder
      Click Click Boom member is offline
![[avatar] [avatar]](http://sz-ex.com/chris/ava/bhh8b7.png)
Joined: Nov 2006 Gender: Male  Posts: 17,332 Location: Nebraska Karma: 311 |  | Re: Add Colors in new cell « Reply #4 on Nov 18, 2005, 2:47am » | |
Did you count for the extra slot for guests?
|
![[image] [image]](http://sz-ex.com/misc/sigs/staff/style4/admin_chris.png) ![[image] [image]](http://apocalypse.hstr.me/StudioZero/projectapocalypsechris.png) Coming soon(er or later) to SZ: - [user] and [pmuser] UBBC tags - Houdini - CIv4 - Project Apocalypse - Minimizer |
|
crazynarutard Senior Studio Member
     Kay Has Grounded You member is offline
![[avatar] [avatar]](http://img.photobucket.com/albums/v299/jlieuw/x1pqP5noGPWAA7IefCjMYWbaajCjvqFY_GE.jpg)
Joined: Aug 2005 Gender: Male  Posts: 1,426 Location: Konoha Karma: 29 |  | Re: Add Colors in new cell « Reply #5 on Nov 18, 2005, 3:51am » | |
Quote:Did you count for the extra slot for guests?  |
|
I guess it will go above the UBBC icons then
| |
|
Curious George® Senior Member
    [p:70] member is offline
![[avatar] [avatar]](http://crazynlazy.com/bandavatars.jpg)
Music Lover
![[homepage] [homepage]](http://www.sz-ex.com/v1/icons/www.gif) Joined: Oct 2005 Gender: Male  Posts: 318 Location: A Place Called Heaven (Texas) Karma: 3 |  | Re: Add Colors in new cell « Reply #6 on Nov 18, 2005, 2:25pm » | |
well i was hoping i could put it next to the text posting area like how CD has the smilies
|
|
|
Curious George® Senior Member
    [p:70] member is offline
![[avatar] [avatar]](http://crazynlazy.com/bandavatars.jpg)
Music Lover
![[homepage] [homepage]](http://www.sz-ex.com/v1/icons/www.gif) Joined: Oct 2005 Gender: Male  Posts: 318 Location: A Place Called Heaven (Texas) Karma: 3 |  | Re: Add Colors in new cell « Reply #7 on Nov 23, 2005, 12:37am » | |
there is an error somewhere in this section Code:< colors.options.length ; o ++ ) { iCell.innerHTML += ' <font style="cursor:pointer;" color="'+colors.options[o].value+'" onClick=\'javascript:add("[color=' +colors.options[o].value+ ']","[/color]")\'>' |
|
my webpage program says there is an empty tag
|
|
|
chris™ New Member
 [p:7] member is offline
![[avatar] [avatar]](http://static.last.fm/avatar/b1aac672730351d32e4301246d30654e.png)
Joined: Aug 2005 Gender: Male  Posts: 8 Location: UK Karma: -1 |  | Re: Add Colors in new cell « Reply #8 on Apr 9, 2006, 8:26pm » | |
is there a way to make the colors into images? maybe using something like
Code:| ' +colors.options[o].value+ '.jpg |
|
| |
|
Nate Official Member
  member is offline
![[avatar] [avatar]](http://img204.imageshack.us/img204/4237/223nj2.png)
Joined: Jul 2007 Gender: Male  Posts: 84 Karma: 2 |  | Re: Add Colors in new cell « Reply #9 on Apr 10, 2006, 12:39am » | |
Hehe nice CJ. Try out [color=crap][/color] Works in IE XD
|
|
|
chris™ New Member
 [p:7] member is offline
![[avatar] [avatar]](http://static.last.fm/avatar/b1aac672730351d32e4301246d30654e.png)
Joined: Aug 2005 Gender: Male  Posts: 8 Location: UK Karma: -1 |  | Add Colors in new cell with images « Reply #10 on Apr 10, 2006, 10:22am » | |
I managed to modify the code so it will show images now instead of text
Code:<script type="text/javascript"> /* Add colors in new cell - created by crAzY_J do not redistribute this code without the creator's permission Modded for use with images by chris™ Global Footers */ //Change the following options var imageDir = "http://www.mydirectory/Colours/"; //Directory to where the images are stored var imageExt = ".gif"; //The file extension of the images //No more editing needed var iCell if( document.postForm ) { var colors = document.postForm.color; colors.style.display = 'none'; var iRow = colors.parentNode.parentNode.parentNode.parentNode.insertRow(4); iCell = iRow.insertCell(0); iCell.width = '30%';iCell.className = 'windowbg2';iCell.innerHTML = '<font size="2">Add Colors:</font>'; iCell = iRow.insertCell(1); iCell.width = '70%';iCell.className= 'windowbg2'; for( o = 0 ; o < colors.options.length ; o ++ ) { iCell.innerHTML += ' <img src="' +imageDir+ '' +colors.options[o].value+ '' +imageExt+ '" alt="' +colors.options[o].value+ '" style="cursor:pointer;" onClick=\'javascript:add("[color=' +colors.options[o].value+ ']","[/color]")\'> '; } } </script> |
|
The images will be named:
Black Red Yellow Pink Green Orange Purple Blue Beige Brown Teal Navy Maroon LimeGreen
followed by whatever extension you choose. Eg: Black.gif, Red.gif etc...
Note: Capitals must be used in filenames.
| |
|
grandma Guest
|  | Re: Add Colors in new cell « Reply #11 on Feb 13, 2008, 4:09pm » | |
I really like this code because I have a dark background and the users can see how the color will look before they use a specific color.
Thank you
| |
|