Help me with this pls

sonicblow

New Member
Messages
7
Reaction score
0
Points
0
how can i make a text generator?
its like when i put the text in the box and generate it, it will show glitter text?
how can i do that pls help
 

Teensweb

New Member
Messages
352
Reaction score
1
Points
0
The easiest way is first create all the alphabets and letters in animated gifs and then write a php code to detect the user's letters and generate html code that puts each letter in order see an example:
HTML:
<a href=http://upl0ad.org/glitter><img alt="http://www.orkutrox.com" src="http://www.orkutrox.com/glitter/style/5/a.gif" /></a><a href=http://upl0ad.org/glitter><img alt="http://www.orkutrox.com" src="http://www.orkutrox.com/glitter/style/5/v.gif" /></a><a href=http://upl0ad.org/glitter><img alt="http://www.orkutrox.com" src="http://www.orkutrox.com/glitter/style/5/i.gif" /></a><a href=http://upl0ad.org/glitter><img alt="http://www.orkutrox.com" src="http://www.orkutrox.com/glitter/style/5/n.gif" /></a><br><a href="http://www.orkutrox.com"><b>Free Image Upload</b></a> | <a href=http://inviyahoo.com><b>Detect Invi Y! ID</b></a>
Edit:
I typed "Avin" in orkutrox.com and it generated the above code.
 
Last edited:

FengFeng

New Member
Messages
59
Reaction score
0
Points
0
like this:

http://www.commenthaven.com/glitter-text-generator/

that's some pretty fancy GD library work, I'd imagine. Probably a lot of difficult coding. I'd start with google searching for a tutorial on GD and decide from there if it's worth it :)
It's a very cool site
Edit:
The easiest way is first create all the alphabets and letters in animated gifs and then write a php code to detect the user's letters and generate html code that puts each letter in order see an example:
HTML:
<a href=http://upl0ad.org/glitter><img alt="http://www.orkutrox.com" src="http://www.orkutrox.com/glitter/style/5/a.gif" /></a><a href=http://upl0ad.org/glitter><img alt="http://www.orkutrox.com" src="http://www.orkutrox.com/glitter/style/5/v.gif" /></a><a href=http://upl0ad.org/glitter><img alt="http://www.orkutrox.com" src="http://www.orkutrox.com/glitter/style/5/i.gif" /></a><a href=http://upl0ad.org/glitter><img alt="http://www.orkutrox.com" src="http://www.orkutrox.com/glitter/style/5/n.gif" /></a><br><a href="http://www.orkutrox.com"><b>Free Image Upload</b></a> | <a href=http://inviyahoo.com><b>Detect Invi Y! ID</b></a>
Edit:
I typed "Avin" in orkutrox.com and it generated the above code.

Woow,good job
 
Last edited:

sonicblow

New Member
Messages
7
Reaction score
0
Points
0
The easiest way is first create all the alphabets and letters in animated gifs and then write a php code to detect the user's letters and generate html code that puts each letter in order see an example:
HTML:
<a href=http://upl0ad.org/glitter><img alt="http://www.orkutrox.com" src="http://www.orkutrox.com/glitter/style/5/a.gif" /></a><a href=http://upl0ad.org/glitter><img alt="http://www.orkutrox.com" src="http://www.orkutrox.com/glitter/style/5/v.gif" /></a><a href=http://upl0ad.org/glitter><img alt="http://www.orkutrox.com" src="http://www.orkutrox.com/glitter/style/5/i.gif" /></a><a href=http://upl0ad.org/glitter><img alt="http://www.orkutrox.com" src="http://www.orkutrox.com/glitter/style/5/n.gif" /></a><br><a href="http://www.orkutrox.com"><b>Free Image Upload</b></a> | <a href=http://inviyahoo.com><b>Detect Invi Y! ID</b></a>
Edit:
I typed "Avin" in orkutrox.com and it generated the above code.


i have the alphabets the problem now is the code
help!
 

Teensweb

New Member
Messages
352
Reaction score
1
Points
0
"i have the alphabets the problem now is the code
help!"
I'll give it a try... and maybe finish it by tomorrow. but I tell you I'm not a php expert!
Edit:
Woow,good job
Thanx, but i dint do any job!
 
Last edited:

sonicblow

New Member
Messages
7
Reaction score
0
Points
0
"i have the alphabets the problem now is the code
help!"
I'll give it a try... and maybe finish it by tomorrow. but I tell you I'm not a php expert!
Edit:

Thanx, but i dint do any job!


tnx i will w8 4 it
 

Teensweb

New Member
Messages
352
Reaction score
1
Points
0
Seems to be more tough than i'd imagined....
Edit:
You can also do this by js I imagine....
try asking help from someone else too.... so that you'll get it done sooner, maybe!
Edit:
see this
 
Last edited:

garrettroyce

Community Support
Community Support
Messages
5,611
Reaction score
249
Points
63
Teensweb, that looks perfect! Except: ImageMagick 6.4 or above required :(

This is kinda what I feared. Regular GD doesn't support animated gifs. It's somewhat easy to create a static image from individual letters and stitching them together. It's only 3 images repeated over and over again, so realistically, you can repeat the process 3 times. The problem lies in taking the 3 gifs and stitching them together. My guess is you will have to create a binary string from the 3 images, append them together, then edit some of the meta data in the final gif to get it to animate correctly. Ew :(
 

Teensweb

New Member
Messages
352
Reaction score
1
Points
0
I'm just trying to make a script that'll do the following
1. Detect each character and number of characters(quite easy)
2. process it and generate a code that'll put each character in an img src tag.
For ex:
If you typed "text" in the input field,
the script should generate the following html code:
HTML:
<img src=http://thedomain.com/images/t.gif>
<img src=http://thedomain.com/images/e.gif>
<img src=http://thedomain.com/images/x.gif>
<img src=http://thedomain.com/images/t.gif>
(that's a difficult part, at least for me, as i'm a mere beginner!)
Each image will be an animated gif of the character
like a.gif will be an animated gif with the text "a"
Edit:
Got the code!
here's the html:
HTML:
<form action="generate.php" method=post class=form1 id=form1>
<input type="text" class=medium name="text" /> 
<input type="submit">
</form>
Here's the php. Save it as generate.php in the same directory.
PHP:
<?php
$text = strip_tags($_POST['text']);
$length = strlen($text);

echo "<textarea rows=\"10\" cols=\"50\">";
for( $i = 0; $i < $length; $i++) {
echo "<img src=\"/font/caps/$text[$i].gif\" alt=\"$text[$i]\">\n";
}
echo "</textarea>";

?>
Note: this code is case sensitive, so if the user types "Text" it is different from "text"
So you need to have two images for gif's - a.gif and A.gif
For each character.....
If you want to avoid this, use the following code:
PHP:
<?php
$text = strip_tags($_POST['text']);
$varToLower = strtolower($text); 
$length = strlen($text);

echo "<textarea rows=\"10\" cols=\"50\">";
for( $i = 0; $i < $length; $i++) {
echo "<img src=\"/font/caps/$varToLower[$i].gif\" alt=\"$varToLower[$i]\">\n";
}
echo "</textarea>";

?>
(only edit the php. Use the same html)
If i helped you, pls give me a rep.
I tested the code and it works.
See http://cyberflare.pylothhosting.net/new.html
 
Last edited:

garrettroyce

Community Support
Community Support
Messages
5,611
Reaction score
249
Points
63
That should work if you don't mind using many images instead of a single one. Good suggestion!

I don't think there's any other way to do it in a single image though, other than the way I mentioned previously.
 

Teensweb

New Member
Messages
352
Reaction score
1
Points
0
This is what I hate!!! Why don't some people even reply when others have or at least tried to help 'em?
 
Last edited:

zen-r

Active Member
Messages
1,937
Reaction score
3
Points
38
Y isn't sonicblow replying?

This is what I hate!!! Why don't some people even reply when others have or at least tried to help 'em?

Yes, a reply would be nice - good manners cost nothing.

But to be fair to sonicblow, some people do have a life outside of x10. ;) Perhaps sonicblow has been busy!
 

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
just for the record, teensweb, you could have used the str_split function to separate the string into an array.
 

Teensweb

New Member
Messages
352
Reaction score
1
Points
0
NO I couldn't!
(just 'coz I dint know!, lol)
well now I know anyway....
 
Top