Do you want that optional(the user's decision) or do you want it to be like that in the first place.
For someone else to do this themselves that havn't seen this code before it could be hard to customize the text. But if you want I can do it for you and hope it works. If you want it optional than it would be hard to code. Now if you want it to be like that in the first place then you would have to edit render.php.
To edit the font you would have to download a font or take one from your computer and place it in the same directory as the other one. To change it upload the font and change the following:
Code:
$amount = 5; //How many lines allowed?
$imageSRC = "bg.gif"; //Image, gif
$imageFont = "Maian.TTF";
header("Content-type: image/gif"); //Header: gif
$image = imagecreatefromgif($imageSRC); //create from gif
Also, if you wanted to change it to one line like that pen website then you would have to change three pages. You'd have to change the "makeIt.php":
Code:
$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;
And delete the selected.
You'd have to change the picPreview.php page:
Code:
<table border="0" id="tableA">
<tr><td style="border-bottom: 2px solid grey;"><span>Text</span></td><td style="border-bottom: 2px solid grey;"> </td><td style="border-bottom: 2px solid grey;"><span>Hex #</span></td></tr>
<tr><td><label for="lineA">Line 1:</label></td><td><input type="text" id="lineA" name="lineTA" onkeyup="makePicture();" /></td><td><input type="text" id="lineCA" name="lineCA" onkeyup="makePicture();" /></td></tr>
<tr><td><label for="lineB">Line 2:</label></td><td><input type="text" id="lineB" name="lineTB" onkeyup="makePicture();" /></td><td><input type="text" id="lineCB" name="lineCB" onkeyup="makePicture();" /></td></tr>
<tr><td><label for="lineC">Line 3:</label></td><td><input type="text" id="lineC" name="lineTC" onkeyup="makePicture();" /></td><td><input type="text" id="lineCC" name="lineCC" onkeyup="makePicture();" /></td></tr>
<tr><td><label for="lineD">Line 4:</label></td><td><input type="text" id="lineD" name="lineTD" onkeyup="makePicture();" /></td><td><input type="text" id="lineCD" name="lineCD" onkeyup="makePicture();" /></td></tr>
<tr><td><label for="lineE">Line 5:</label></td><td><input type="text" id="lineE" name="lineTE" onkeyup="makePicture();" /></td><td><input type="text" id="lineCE" name="lineCE" onkeyup="makePicture();" /></td></tr>
</table>
And delete the selected. And you would also have to change the render.php page.
Code:
$amount = 5; //How many lines allowed?
$imageSRC = "bg.gif"; //Image, gif
$imageFont = "Maian.TTF";
header("Content-type: image/gif"); //Header: gif
$image = imagecreatefromgif($imageSRC); //create from gif
And switch the highlighted to 1.
The font size should be on line 23 in render.php:
Code:
if(!empty($getData_text[$i])){
$a += 15;
imagettftext($image, 12, 0, 75, $a, hex2rgb($getData_color[$i]), $imageFont, $getData_text[$i]);
}
I hope this helps you,
Nile
Bookmarks