Discuss: Dynamic Text Replacement
by Stewart Rosenberger
- Editorial Comments
272 Re: USE PHP!
Trust me I understand, I use php and have for years so I talk till I’m blue in the face about how great it is, however the flipside to this coin is some companies are so M$ brainwashed that anything but asp or likewise technologies are shunned no matter how many advantages you can prove with your favorite language. I’m a php programmer in the heart, but alas, my shop forces me to write asp to earn the paycheck…
posted at 07:41 am on October 27, 2004 by Johnny Sparks
273 two glitches?
discovering this technique has really saved me a lot of time. I have been playing with it a bit today and am trying to find out if anyone has either of these two problems.
1. I have several different span classes set to trigger the text replacement.
for example-
span.heading
span.big
etc.
when I have checked the results in ie6 it only changes the first span.class it sees and the rest of them just come up as the normally formatted span.
and
2. in netscape 6 it does recognise every span.class listed and change to the new font but when the normally formatted span is viewed without the php/js links, it comes up with no space at all between words.
the site in question is viewable at
http://www.thepeartreeofbrookline.com
thanks.
posted at 06:53 pm on October 29, 2004 by abigail
274 Still get "The server could not create this headin
Please help me get past “Error: The server could not create this heading image.”
First off, here is the phpinfo:
http://www.hai.org/imagereplace/info.php
It seems to have all the FreeType support, GD version, etc. that is required.
I am definitely passing the test of finding the font, but, since others who have had this problem have suggested it, I tried the following variations for $font_file:
1. absolute address
2. All the variations of document root addressing that have been mentioned in this discussion so far.
The ONLY changes I have to the heading.php that Stuart provided is the name/location of the font and a font size of 36.
I have traced the error to occurring with the call to @ImageTTFBBox but the discussions of that here have provided no answers. Stuart? Someone, please help. I have spent way too much time on this without finding a solution.
posted at 05:56 pm on October 31, 2004 by synergy
275 Hover possible
first i want say that this technique is great.
i have a question about this:
Stewart Rosenberger says at the the end of the article »… although getting rollovers to work would require more customization.«
ist here any way to do rollovers? for examble to change the fontcolor on hover.
would be perfect!
posted at 10:06 am on November 3, 2004 by tobaco
276 Flash is a better alternative (imop)
Problem with this approach is that you can only use ttf fonts, not adobe fonts (I know this for a fact with ASP.NET and C#, and from what Ive gathered it is hard if not impossible to try to convert them to ttf; the software for that stuff is supposedely really expensive).
I dont know about you guys, but all my fonts are adobe fonts.. You can use a similar approach with flash if you need more than just ttf fonts..
The cool thing about using flash is that the swf is loaded once, then it can be used for your entire site since its cached.. The bad thing is that support for flash is sometimes questionable.. I go around this by just showing a crappy arial/tahoma/verdana H1-H6 heading whenever the user doesnt have it, and it works out fine.
Check this link out… this is where I first saw it.
http://sports.espn.go.com/nhl/news/story?id=1715637&partnersite=espn
Here, look at the headline, its all in flash and the headline gets passed in as a querystring in the object/embedd tag.
posted at 11:37 am on November 3, 2004 by christian
277 great tool!
thank u for that nice script! :)
posted at 01:25 am on November 9, 2004 by handystoff
278 Duplicating inages on back/forward browser buttons
Works like a charm but when navigating with browser buttons, dtr seems to replicate with no way of stopping… only on mac versions of IE 5.0+
Anyone else getting/seeing this bug?
Thanks.
posted at 04:35 pm on November 19, 2004 by Los
279 Sir, i just want a help from you
Sir, i just want a help from you that, could we make a text written on uppper side and lower side of image dynamically. If we insert a text from a textfiled called Upper side and other text from a textfield called “Lower side”. I want that the text enter in Upper side textfiled goes automatically at the upper side of image and same for lower side textfield , could it be possible from Javascript.
Please look an example given at Url:
http://www.ringcompany.com/designcenter.html
Click on the right side image. Apopup will open.
Insert username=amitk
Password=weblink
Click on saved design.
Then click on the link “new1_25_11_04” provided below the link of “Design Name”
This will show you the details of product. Click on next step.
Click on Edit.
This is the example of what i am taling about.
Enter any text in Upper: or Lower textfields.
This will show you on image at runtime.
Please tell me that it is possible in PHP or Possible in Javascript.
Early reply will be appreciated.
I trust your site very much.
Please reply soon.
posted at 11:53 pm on November 30, 2004 by Amit Gupta
280 A Few Questions...
This caught my eye.
After trying Shaun Inman’s IFR and injuring myself by the number of problems and lack of support, this script looks promising.
But a few questions:
1- How would I be able to get an image to occur in the output?
(eg: a dotted line automatically to be inserted underneath the outputted image text)
2- Can you change the case?
(eg: Original text would be normal case, but final image should all be uppercase)
If these problems can be ironed out then it would be a perfect script.
Support welcome, Matthew.
posted at 12:47 am on December 3, 2004 by Matthew Robertson
Discussion Closed
New comments are not being accepted, but you are welcome to explore what people said before we closed the door.
Got something to say?
Discuss this article. We reserve the right to delete flames, trolls, and wood nymphs.
Create a new account or sign in below if you’d like to leave a comment.
Subscribe to this article's comments: RSS (what’s this?)






271 Problem solved!
The test.png was uploaded in wrong format (ASCII instead of binary) – that´s why it did not work.
I am delighted by your solution!!!
eliZZZa
posted at 05:28 am on October 27, 2004 by eliZZZa