Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » [archived] zem_image_replace

#1 2004-07-17 06:24:00

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

[archived] zem_image_replace

Notice: This thread is archived, newer version here.

**********************************************************

txp:zem_image_replace replaces text with a PNG image generated by Stewart Rosenberger’s Dynamic Text Replacement script. heading.php must be installed and configured for this to work. The plugin uses the LIR technique by default, but you can replace this with a different method by using the class attribute.

Typical use might be something like this:

<code>
<txp:zem_image_replace path=”/path/to/image-replace.php” wraptag=“h2” height=32><txp:page_title /></txp:zem_image_replace>
</code>

Which would produce the following code:

<code>
<h2 style=“padding-top: 32px; overflow: hidden; background: url(‘/path/to/image-replace.php?text=my+page+title’) no-repeat top right; height: 0px !important; height /**/:32px;”>my page title<h2>
</code>

Supported attributes:

  • path – Path to the image replacement PHP script (called ‘heading.php’ in the List Apart article). Default is image-replace.php in the Textpattern root.
  • wraptag – Tag used for image replacement. Default is h1
  • height – Image height. Set this to something appropriate for the font size you’ve configured in the replacement script. Default is 32
  • position – Image position. Default is “top left”.
  • limit – Maximum number of characters to pass to the image replacement script. Default is 50.
  • class – If set, the generated code will only provide the background attribute in the inline style. Use this if you want to shift the CSS to your stylesheet, or use a different replacement technique (e.g. FIR).

Download:

http://vigilant.tv/documents/tp/zem_image_replace-0.1.txt

You can see the plugin in (over)use here.

Last edited by zem (2004-07-18 00:18:10)


Alex

Offline

#2 2004-07-17 16:49:04

reid
Member
From: Atlanta, Ga.
Registered: 2004-04-04
Posts: 224
Website

Re: [archived] zem_image_replace

Wow, you’ve really been on a roll lately.

Just to clarify, when you refer to “image-replace.php,” is that the same as “heading.php” on the ALA page you link?


TextPattern user since 04/04/04

Offline

#3 2004-07-18 00:17:11

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

Re: [archived] zem_image_replace

Whoops, sorry, yeah. I must’ve renamed it somewhere along the way.


Alex

Offline

#4 2004-07-27 20:03:45

spiffin
Plugin Author
From: London, UK
Registered: 2004-06-08
Posts: 95
Website

Re: [archived] zem_image_replace

Thanks zem for the plug in. I was wondering how to incorporate LA’s dynamic text replacement in TP.

I do, however, have a small supplementary question .. possibly slightly off subject (apologies):

I run Mac OS X 10.3.4 (and my server’s X Server 10.3.4) .. and in Panther fonts are stored in FFIL font suitcases. In order to use the LA script you need to point it to a standard true type font.

Does anyone know how to extract a true type font from an FFIL file?

Thanks

Simon

Offline

#5 2004-09-08 15:45:31

Neko
Member
Registered: 2004-03-18
Posts: 458

Re: [archived] zem_image_replace

Hello zem,

I was wondering if there is a way to wrap words so long titles can fit the width of DIVs.

Thanks,

~Neko

Last edited by Neko (2004-09-08 15:46:42)

Offline

  1. Index
  2. » Archives
  3. » [archived] zem_image_replace

Board footer

Powered by FluxBB