Would like to have a script that allows my customers to preview text on a certain product for personalizing. If anyone has any ideas on this, I would greatly appreciate their help.
Would like to have a script that allows my customers to preview text on a certain product for personalizing. If anyone has any ideas on this, I would greatly appreciate their help.
could you describe a little more what you are asking for?
To choose the lesser of two evils is still to choose evil. My personal site
yes. the picutre is here: http://www.4akiss.com/silvergoldlarge.jpg
I would like to place the text in the lower area of the box. Would like for customers to pick their text as well. I really appreciate your help.
Just seen where you helped out another person with the same question. She needed exactly what I need. Here is the post: http://www.dynamicdrive.com/forums/s...ad.php?t=36481
The website there does not work though.
Because Im an idiot, I still need help. I put the code on my site, but it doesnt seem to be working. If you can, please check it out and tell me what Im doing wrong.
http://www.4akiss.com/test.htm
Thank you so much!
Make a file called "makeIt.php" and in it, put the following code:
Code:<?php $imageExt = "?colorData1=".$_POST['lineCA']."&textData1=".$_POST['lineTA']; $imageExt .= "&colorData2=".$_POST['lineCB']."&textData2=".$_POST['lineTB']; $imageExt .= "&colorData3=".$_POST['lineCC']."&textData3=".$_POST['lineTC']; $imageExt .= "&colorData4=".$_POST['lineCD']."&textData4=".$_POST['lineTD']; $imageExt .= "&colorData5=".$_POST['lineCE']."&textData5=".$_POST['lineTE']; echo "render.php".$imageExt; ?>
Jeremy | jfein.net
Ok, now I might be annoying you by this point, but I would like to have instead of the hex area, a drop down menu with the option of text, text color, and set the number of letters used in the text area to 20. And can I change the image to what I want? Do I have to change the php files any to use my picture wich is a .jpg?
If you want to change the image type, open up render.php and change it to the following code:
Now, to make the color a dropdown, in your HTML where the hex input is, simply change that to aPHP Code:
<?php
$amount = 5; //How many lines allowed?
$imageSRC = "CHANGETHIS.jpeg"; //Image, gif
$imageFont = "Maian.TTF";
//header("Content-type: image/jpeg"); //Header: gif
$image = imagecreatefromjpeg($imageSRC); //create from gif
function hex2rgb($hex){
global $image;
if(strlen($hex) == 3)
$hex = $hex[0].$hex[0].$hex[1].$hex[1].$hex[2].$hex[2];
if(strlen($hex) == 6){
$red = hexdec(substr($hex, 0, 2));
$green = hexdec(substr($hex, 2, 2));
$blue = hexdec(substr($hex, 4, 2));
}
return imagecolorallocate($image, $red, $green, $blue);
}
for($i = 1, $a = 65; $i <= $amount; $i++){
$getData_color[$i] = trim($_GET['colorData'.$i]); //decode, and store color
$getData_text[$i] = trim($_GET['textData'.$i]);
$a += 15;
imagettftext($image, 12, 0, 75, $a, hex2rgb($getData_color[$i]), $imageFont, $getData_text[$i]);
}
imagejpeg($image);
imagedestory($image);
?><select>
with the same name and ID of the hex input you changed. Each value should have a value of the hex you want the color to be. For example, black would be #000, white would be #fff, blue woud be 0000ff. If you were to be changing line A, you would make it look something like:
Notice: -highlighted you must keep the same (except A in id/name, change that depending on the row it is).Code:<tr><td><label for="lineA">Line 1:</label></td><td><input type="text"id="lineA" name="lineTA" onkeyup="makePicture();"
/></td><td> <select name="lineCA" id="lineCA" onchange="makePicture();"> <option value="000">Black</option> <option value="FFF">White</option> <option value="0000ff">Blue</option> </select></td></tr>
-bold+red the value of the option must be a hex, it can't be simply "blue"
Ask more questions if you still need help - I will not be annoyed![]()
Jeremy | jfein.net
Bookmarks