Studio Zero
« Add Colors in new cell with images »

Welcome Guest. Please Login or Register.
Sept 3, 2010, 4:33am





Studio Zero :: Web Development :: Code Storage :: Add Colors in new cell with images
   [Search This Thread][Send Topic To Friend] [Print]
 AuthorTopic: Add Colors in new cell with images (Read 826 times)
chris™
New Member
*
[p:7]
member is offline

[avatar]



Joined: Aug 2005
Gender: Male
Posts: 8
Location: UK
Karma: -1
 Add Colors in new cell with images
« Thread Started on Apr 10, 2006, 10:27am »

This is a mod of a code thats already in the database, not sure if im allowed to mod it and post it back but some people may find it usefull

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.ennovative.net/storeit/albums/userpics"; //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+ 'c' +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:

cBlack
cRed
cYellow
cPink
cGreen
cOrange
cPurple
cBlue
cBeige
cBrown
cTeal
cNavy
cMaroon
cLimeGreen

followed by whatever extension you choose. Eg: cBlack.gif, cRed.gif etc...

Also a blank 1px by 1px image named "c.*" is needed to fix a bug in IE (* represents your chosen file extension)

Note: Capitals must be used in filenames.
« Last Edit: Apr 10, 2006, 10:52am by chris™ »Link to Post - Back to Top  IP: Logged
Bruce Banner
Head Coder
******
Click Click Boom
member is offline

[avatar]



Joined: Nov 2006
Gender: Male
Posts: 17,332
Location: Nebraska
Karma: 311
 Re: Add Colors in new cell with images
« Reply #1 on Apr 10, 2006, 12:52pm »

Did you even get permission to modify it? Cause I don't see CJ giving you permission anywhere. If CJ can confirm its alright, I'll allow it... Otherwise, this will be locked.
Link to Post - Back to Top  IP: Logged

[image]
[image]

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]



Joined: Aug 2005
Gender: Male
Posts: 1,426
Location: Konoha
Karma: 29
 Re: Add Colors in new cell with images
« Reply #2 on Apr 19, 2006, 3:51pm »

you can modify it chris. But next time PM me first
Link to Post - Back to Top  IP: Logged
Bruce Banner
Head Coder
******
Click Click Boom
member is offline

[avatar]



Joined: Nov 2006
Gender: Male
Posts: 17,332
Location: Nebraska
Karma: 311
 Re: Add Colors in new cell with images
« Reply #3 on Apr 20, 2006, 12:14am »

Which Chris? :P

And, is this fine to be allowed in the database CJ? If not, go ahead and lock it.
Link to Post - Back to Top  IP: Logged

[image]
[image]

Coming soon(er or later) to SZ:
- [user] and [pmuser] UBBC tags
- Houdini
- CIv4
- Project Apocalypse
- Minimizer
chris™
New Member
*
[p:7]
member is offline

[avatar]



Joined: Aug 2005
Gender: Male
Posts: 8
Location: UK
Karma: -1
 Re: Add Colors in new cell with images
« Reply #4 on Apr 20, 2006, 10:25am »

Sorry CJ ::)
Link to Post - Back to Top  IP: Logged
crazynarutard
Senior Studio Member
*****
Kay Has Grounded You
member is offline

[avatar]



Joined: Aug 2005
Gender: Male
Posts: 1,426
Location: Konoha
Karma: 29
 Re: Add Colors in new cell with images
« Reply #5 on Apr 20, 2006, 4:23pm »


Quote:
Which Chris? :P

And, is this fine to be allowed in the database CJ? If not, go ahead and lock it.

there's only one chris for me, you're just cddude :P
Link to Post - Back to Top  IP: Logged
   [Search This Thread][Send Topic To Friend] [Print]


Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!
Terms of Service | Privacy Policy | Report Abuse | Mobile