PHP Classes

Text from User Input

Recommend this page to a friend!

      Complete text to image conversion  >  All threads  >  Text from User Input  >  (Un) Subscribe thread alerts  
Subject:Text from User Input
Summary:text from user drop down form?
Messages:5
Author:Manfred
Date:2011-01-25 10:43:46
Update:2011-02-03 11:42:43
 

  1. Text from User Input   Reply   Report abuse  
Picture of Manfred Manfred - 2011-01-25 10:43:46
Hi
Is it possible to use this class somehow with a word choice , font choice etc coming from a User Select Drop Down box similar to this one http://www.3dwoodcraft.com/outdoorpainted.html

where the customer chooses the text, color etc.?Any advice appreciated

  2. Re: Text from User Input   Reply   Report abuse  
Picture of Shahid Karimi Shahid Karimi - 2011-01-26 07:03:21 - In reply to message 1 from Manfred
Yes definitely, that is the purpose of this class. just pass values to the object's public member variables. as

<pre>
$img = new GDI('Hi all');
$img->text_font = $_REQUEST['font_path'];
$img->shadow_color = $_REQUEST['shadow_color'];
</pre>

  3. Re: Text from User Input   Reply   Report abuse  
Picture of Manfred Manfred - 2011-01-26 07:54:28 - In reply to message 2 from Shahid Karimi
Hi
Thank you for the Reply
was playing around with it a bit yesterday and got it working like this as well.
Got the Text Input from TEXT
but could not get the chosen Font from the User Drop Down list passed? (so for time being i left the Font static)
$TEXT=$_REQUEST['text'];
$FONT=$_REQUEST['font'];

// The text to draw
$text = 'Welcome, '.$TEXT;
// Replace path by your own font path
$font = $FONT;

Will try you suggestion and give feedback

  4. Re: Text from User Input   Reply   Report abuse  
Picture of Shahid Karimi Shahid Karimi - 2011-02-03 10:35:48 - In reply to message 3 from Manfred
Ok, the think that i had almost forgotten to mention was that. The font file should exist anywhere on your server.
For example suppose you pass this font path to the class

$img->font_file='fonts/myfont.ttf';

the "myfont.ttf" file must exist in the fonts directory

  5. Re: Text from User Input   Reply   Report abuse  
Picture of Manfred Manfred - 2011-02-03 11:42:43 - In reply to message 4 from Shahid Karimi
Hi
Yes thank you I had the fonts on the server uploaded Working fine on my test website but have not had time to implement it on a working Site
I want to eventually add it to www.theletterlady.co.za so that customers can preview their letters or words in different fonts.
I have the basic set up just need to make it look pretty
Thanks again