Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#91 2005-01-23 16:50:44

steventer
Member
Registered: 2004-12-03
Posts: 56

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

Is there a way to reduce or eliminate the whitespace generated after the image-replaced text?

Currently I have a large amount of white space between the article title and the date:

[txp:permlink]
[txp:zem_image_replace font=“MinionPro-Bold.ttf” fontdir=”/usr/www/users/healthij/fonts” fontsize=“18” color=”#3a648d”]
[txp:title /]
[/t xp:zem_image_replace]
[/txp:permlink]
[br /]
[span class=“biodate” /]
[txp:posted format=“l d M Y” /]
[/span]
[/h3]
[div class=“imageleft”]
[txp:article_image /]
[/div>[txp:body /]
[p]
[txp:comments_invite /]
[/p]

Last edited by steventer (2005-01-23 17:00:44)

Offline

#92 2005-01-29 00:08:03

Jick
Member
Registered: 2004-11-27
Posts: 14

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

Hey Zem,
First of all I would just like to say that I love your plugin. It works perfectly and makes the whole “dynamically generated headers” process much easier.

Ok, now on to business. Can you please read this post and try to answer that question for me? I would greatly appreciate it. Thanks. :)

Offline

#93 2005-01-29 01:26:41

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

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

Jick,

The documentation on thresholdstate.com comes from the plugin that’s actually installed there – which isn’t quite ready for release yet. I agree that’s unnecessarily confusing. Releasing a new version is on my TODO list, along with hundreds of other things.

The problems with text clipping (and unnecessary whitespace) are, as far as I can determine, caused by bugs in GD’s handling of font metrics.


Alex

Offline

#94 2005-01-29 01:58:33

Jick
Member
Registered: 2004-11-27
Posts: 14

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

Oh, I see. Well I guess I’ll just have to use plain text or the flash method until the problem is resolved. That is, if it can even be fixed. Thank you for the reply. Have a nice day. :)

Offline

#95 2005-01-29 11:27:20

mamash
Member
From: Prague
Registered: 2004-02-21
Posts: 128
Website

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

There is a dirty workaround to the right-clipping problem – add a space to the string replaced.


Who’s gonna textdrive you home tonight?

Offline

#96 2005-01-29 14:53:47

alexandra
Member
From: Cologne, Germany
Registered: 2004-04-02
Posts: 1,370

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

@Jick

i just came across Jay´s site. He implemented Zems plugin successfully. Ask him about how he worked it out and let us know …. :)

Offline

#97 2005-01-29 20:21:13

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

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

The space after has helped me with this problem for most font-cut-off problems.


90+ Textpattern installs and still going…

Offline

#98 2005-01-30 08:06:46

Jick
Member
Registered: 2004-11-27
Posts: 14

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

I actually found a fix for it. It’s kinda dirty but it works perfectly in every test I have done. First, find this line in the plugin:

$h = $h + $drop;

Then add this on the next line after it:

$w = $w + $drop;

You then have to specify the “drop” attribute in pixels on the tag. What that mod does is it tells it to add the same amount of “drop” to the sides as it does the top and bottom. It works perfectly for me and nothing gets cut off.

I think Zem could modify his plugin so it has a vert-drop and hor-drop. It would be basically the same as what I did except you could then specify a different value for top to bottom and side to side.

It’s probably not the best way to do it but it gets the job done. I’m sure Zem has his own way that he plans to release in the next version but for those of you who need it fixed now please feel free to use my way.

Offline

#99 2005-01-31 13:33:48

alexandra
Member
From: Cologne, Germany
Registered: 2004-04-02
Posts: 1,370

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

@Jick
well done. thx for posting your solution. it sounds as if this is the Great Step Forward…

Offline

#100 2005-01-31 21:28:39

Jick
Member
Registered: 2004-11-27
Posts: 14

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

> alexandra wrote:

> @Jick
well done. thx for posting your solution. it sounds as if this is the Great Step Forward…

Thanks. I just hope it can help everyone. :)

Offline

#101 2005-01-31 21:47:17

alexandra
Member
From: Cologne, Germany
Registered: 2004-04-02
Posts: 1,370

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

>Thanks. I just hope it can help everyone. :)

@Jick
let us know your site, once it´s online!! I am already curious ;)

@für deutsche
for the german speaking users: i did write a summery on the image replacement plugin

Offline

#102 2005-02-01 01:54:50

Jick
Member
Registered: 2004-11-27
Posts: 14

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

My site is up right now and using the fix already. My site is a blog and it’s located at http://ths.thenamesdan.com/. ;)

Offline

#103 2005-02-02 21:11:11

Jick
Member
Registered: 2004-11-27
Posts: 14

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

I now have an article on my blog site about this fix. Feel free to take a gander. You can find the article here.

Offline

#104 2005-02-03 02:51:53

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

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

There’s a new version up. Amongst the many improvements is a padding attribute, which provides a more flexible clipping solution than drop.


Alex

Offline

#105 2005-02-04 04:32:21

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

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

zem,
Have I recently told you how awesome you are? THANKS again!


90+ Textpattern installs and still going…

Offline

Board footer

Powered by FluxBB