Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2004-08-07 02:35:38

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

[plugin] [ORPHAN] zem_image_replace, version 2

<txp:zem_image_replace> dynamically replaces text with images generated on-the-fly, maintaining accessibility using a CSS image replacement technique. This is a complete rewrite of the older version, so I’m giving it a new thread.

The new version is self contained, no longer reliant on an external script for image creation.

Download and documentation:

http://thresholdstate.com/software/3704/zem-image-replacement

Last edited by zem (2005-02-03 02:50:41)


Alex

Offline

#2 2004-08-08 19:21:19

corinne
New Member
Registered: 2004-06-22
Posts: 2

Re: [plugin] [ORPHAN] zem_image_replace, version 2

I’m using Firefox 0.8, and I don’t see the image … it works in my IE though. Still, it’s neat! Thanks!

Offline

#3 2004-08-08 22:38:43

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: [plugin] [ORPHAN] zem_image_replace, version 2

Corinne,

Thanks for the feedback. The image titles on this page show up fine with Firefox 0.9.3.

Can you see those images with your version of Firefox? Can you give me the URL of the page where you’re experiencing the problem?


Alex

Offline

#4 2004-08-09 12:13:43

corinne
New Member
Registered: 2004-06-22
Posts: 2

Re: [plugin] [ORPHAN] zem_image_replace, version 2

Dear Zem,

I played around with the attributes, and managed to get it to work! Yay!

This doesn’t work:
< txp:zem_image_replace font=”/corinne/fonts/LITTLELO.TTF” wraptag=“p” >PHOTOJOURNAL< /txp:zem_image_replace >

This works:
< txp:zem_image_replace font=”/corinne/fonts/LITTLELO.TTF” font-size=“25” height=“35” position=“right” wraptag=“p” >PHOTOJOURNAL< /txp:zem_image_replace >

You can see it here: http://corinne.theroundbox.com/photojournal/

Unfortunately, I couldn’t replicate the little “error” I had of IE showing the image but Firefox not doing so. Also, when I had this “error”, strangely, IE didn’t hide the word “PHOTOJOURNAL”. It was displayed at the back of the image.

Anyway, I got it to work already, and I’m pleased! Thanks loads!

Last edited by corinne (2004-08-09 12:15:16)

Offline

#5 2004-08-09 12:54:47

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: [plugin] [ORPHAN] zem_image_replace, version 2

Thanks, that’s very helpful. I just ran some tests and it looks like the ‘position’ attribute is the one that makes the difference. I’m not quite sure why just yet.

I’m working on a new version anyway, so I’ll try to include a fix in the next release.


Alex

Offline

#6 2004-08-11 12:26:30

Kaiser
Archived Plugin Author
From: Denver, CO
Registered: 2004-07-04
Posts: 27
Website

Re: [plugin] [ORPHAN] zem_image_replace, version 2

Hey Zem, I’m getting a 404 error when I try to download. Looks like 0.1 is in the directory, but not 0.2.

Offline

#7 2004-08-11 12:31:05

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: [plugin] [ORPHAN] zem_image_replace, version 2

Sorry about that. My hosting company switched servers, and a few things were lost in the transition. It’s back there now.


Alex

Offline

#8 2004-08-11 12:38:05

Kaiser
Archived Plugin Author
From: Denver, CO
Registered: 2004-07-04
Posts: 27
Website

Re: [plugin] [ORPHAN] zem_image_replace, version 2

No problem. Thank you for the speedy reply.

Offline

#9 2004-08-11 20:55:52

Kaiser
Archived Plugin Author
From: Denver, CO
Registered: 2004-07-04
Posts: 27
Website

Re: [plugin] [ORPHAN] zem_image_replace, version 2

Did you find in your testing that it would only work with position=“right”?

I’ve tried everything I can think of, but could only get the images to be visible if position was set to right. Bottom right and top right work also. Just nothing else.

I tried using a div tag, but I’m not really all that creative with CSS and it didn’t end up helping all that much.

Other then that, this plug in rocks. I’ve been looking for a way to use my own fonts and this is perfect.

Offline

#10 2004-08-11 22:30:36

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: [plugin] [ORPHAN] zem_image_replace, version 2

Yes, position=right appears to be necessary. I switched to a different CSS replacement method in this version, and it looks like the negative margin causes a left or center aligned image to shift outside the page. I’ll fix the default in the next version.

Next version will include FT anti-aliasing support, by the way. And maybe one more cool feature..


Alex

Offline

#11 2004-08-12 01:12:49

Kaiser
Archived Plugin Author
From: Denver, CO
Registered: 2004-07-04
Posts: 27
Website

Re: [plugin] [ORPHAN] zem_image_replace, version 2

Sounds Good!

Offline

#12 2004-08-13 21:28:48

starzabove
Member
Registered: 2004-04-13
Posts: 76

Re: [plugin] [ORPHAN] zem_image_replace, version 2

I tried this previously via the instructions at ALA and had the same problem I am having now.
This error:

Error: The server is missing the specified font “/fonts/Bradley.TTF”.

Or something along those lines.
If I leave the tag as given in the plugin text, if I use corinne’s revision as shown here, if I put in fontdir=”/” or fontdir=“http://mydomainname.com/”, with or without forward-slashes all over the place, making a “fonts” folder in the root directory, in the public_html directory, in the textpattern directory – nothing seems to work! I either get a blank page or I get the aforementioned error.

here is the code I tried last
<code>
<txp:zem_image_replace font=“fonts/Bradley.TTF” wraptag=“h3” position=“right” fontdir=“http://starzabove.com” ><txp:title /></txp:zem_image_replace>
</code>

Anyone see anything obvious I may be missing?

note: I had to take it down off of my site, since it’s not working.

Thanks so much.

Last edited by starzabove (2004-08-13 23:25:40)


90+ Textpattern installs and still going…

Offline

Board footer

Powered by FluxBB