Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#61 2004-10-15 08:00:26

-jw-
Member
From: fruitbelly, the Netherlands
Registered: 2004-03-16
Posts: 79

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

I would like to implement this plugin.

However when I put it in and set info=1 I get the following error

font file /jw/fonts/DobkinScript.ttf is not a file

Any thought on this. The site is on textdrive
==============
Edit: previous mentioned is solved after having enough coffee to get thinking again.

Next one is: Error: The server could not create this heading image

More coffee it is…
=============

Update

phew an image is created, but only when I put straight text between the zir tags like;

<pre>
<code>
<txp:zem_image_replace info=0 fontdir=”/home/jw/fonts” font=“dobkinscript.TTF” fontsize=24 wraptag=“h2” trans=1 position=“right”>TXP</txp:zem_image_replace>
</code>
</pre>

however using a txp:tag is not working

<pre>
<code>
<txp:zem_image_replace info=0 fontdir=”/home/jw/fonts” font=“dobkinscript.TTF” fontsize=24 wraptag=“h2” trans=1 position=“right”><txp:title /></txp:zem_image_replace>
</code>
</pre>

===================

WORKING!!! you’ll have to put it in a form. In my case the article form to be precise!
Along with an additional div and class and an article from Mr Shea

Although the site is in the works I don’t mind if you have a peek at this page

Last edited by -jw- (2004-10-15 15:24:37)


textile deletes my identity

Offline

#62 2004-10-25 08:20:59

bluearc21
Member
From: US.VA
Registered: 2004-02-24
Posts: 62
Website

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

This plugin kicks ass. Great job Zem.

1 Question: what is the fix you found for css positioning?


“If you build it, they will come.”

Offline

#63 2004-10-27 22:17:04

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

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

Bluearc,

There’s an unannounced version here:

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

This one adds a “method” attribute, which lets you select the CSS replacement method (one of “phark”, “radu”, “dwyer”, “lir”, as described here).

The Phark technique seems to work better with left and center text alignment. Others might work better with certain types of layout. LIR doesn’t work well with Safari, so that should be your last resort.


Alex

Offline

#64 2004-10-27 22:49:01

bluearc21
Member
From: US.VA
Registered: 2004-02-24
Posts: 62
Website

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

Hi Zem -
THanks for posting this. I’ll update my plugin, but only after I’ve already tried to hack your 0.3 a bit to do just what you’ve done with 0.4!

Thanks again,
Blue


“If you build it, they will come.”

Offline

#65 2004-10-27 23:54:32

Hans
Member
From: Everywhere
Registered: 2004-03-07
Posts: 99
Website

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

Beautiful! I’m happy to see my favorite image-replacement technique as a TXP plugin! Thank you; I’ll be playing with this…


Lumilux – A Photoblog

Offline

#66 2004-10-28 02:20:20

bluearc21
Member
From: US.VA
Registered: 2004-02-24
Posts: 62
Website

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

Zem -
Might check line 28:

$cache_folder = $txpcfg["doc_root"].$pfr.$cachedir;

Works as:

$cache_folder = $txpcfg["doc_root"].$cachedir;

methods are working great though! cudos.


“If you build it, they will come.”

Offline

#67 2004-10-28 02:42:59

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

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

Sure your settings are correct? $pfr should definitely be in there.


Alex

Offline

#68 2004-10-28 03:49:28

bluearc21
Member
From: US.VA
Registered: 2004-02-24
Posts: 62
Website

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

If so, this is the error:

Error: unable to create cache folder "/Users/bluearc21/Sites/domain//domain/images/zir".

Without $pfr, again, it’s okay. (/Users/bluearc21/Sites/domain/images/zir) Which makes sense to me as /Users/bluearc21/Sites/domain/ is doc_root and /images/zir is the default $cachedir (or $img_dir/zir as you’ve got it).


“If you build it, they will come.”

Offline

#69 2004-10-28 05:18:25

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

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

Looks like you’ve got ‘/domain’ in your subdirectory setting in admin/prefs. It should just be ‘/’ if your doc_root is blah/Sites/domain. There shouldn’t be a trailing slash in doc_root.


Alex

Offline

#70 2004-10-28 05:38:06

bluearc21
Member
From: US.VA
Registered: 2004-02-24
Posts: 62
Website

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

You’re right on the trailing slash in doc_root. Good catch.

I should have been more explicit:

web domain: localhost subdirectory: /domain/

$txpcfg[‘txpath’] = ‘/Users/bluearc21/Sites/domain/textpattern’; $txpcfg[‘doc_root’] = ‘/Users/bluearc21/Sites/domain’;

edit: $txpcfg[‘doc_root’] = ‘/Users/bluearc21/Sites’;

Now, even without the trailing slash in doc_root, I’m still getting Error: unable to create cache folder "/Users/bluearc21/Sites/hf6/hf6/images/zir". with that $pfr in there. Oh, I see. You’re assuming with a TextPattern site root at: http://localhost/domain/, that doc_root will be ‘/Users/bluearc21/Sites’ and not ‘/Users/bluearc21/Sites/domain’. But of all the other TXP sites I work on, none are configured this way. The semantics of doc_root, as far as I understand it, is to have ‘doc_root’ be the ‘doc_root’ of the TextPattern site, not root folder of the entire domain. Wait, maybe this is wrong and doc_root should represent the root of the domain and not the root of the ‘site’.

Anyway, FYI this is the way i’ve been doing it with 5 other sites, but it works as is the way you’ve assumed doc_root to be the root of the domain. God after all this time, is this really true for everyone else besides me? ;)

Last edited by bluearc21 (2004-10-28 05:40:58)


“If you build it, they will come.”

Offline

#71 2004-10-28 07:36:47

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

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

> The semantics of doc_root, as far as I understand it, is to have ‘doc_root’ be the ‘doc_root’ of the TextPattern site, not root folder of the entire domain. Wait, maybe this is wrong and doc_root should represent the root of the domain and not the root of the ‘site’.

doc_root should be the root of the site/domain. subdir should be the textpattern subdirectory within that, if any. A number of Textpattern functions find the location of files by tacking together $doc_root + $pfr (where $pfr is the subdirectory).

Typically, for textpattern at the root of a domain, as in http://www.example.com/

doc_root = /home/foo/public_html
txpath = /home/foo/public_html/textpattern
subdir = /

..or, within a subfolder, at http://www.example.com/mytxp/

doc_root = /home/foo/public_html
txpath = /home/foo/public_html/mytxp/textpattern
subdir = /mytxp

In your case, “/home/foo/public_html” is “/Users/bluearc21/Sites/domain”, if I’m understanding things correctly.


Alex

Offline

#72 2004-10-28 11:15:22

bluearc21
Member
From: US.VA
Registered: 2004-02-24
Posts: 62
Website

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

> doc_root should be the root of the site/domain. subdir should be the textpattern subdirectory within that, if any. A number of Textpattern functions find the location of files by tacking together $doc_root + $pfr (where $pfr is the subdirectory).

Okay. News to me. I’ll be changing a few instances of TextPattern now. :)

Does anyone else reading have doc_root = /home/foo/public_html/mytxp in zem’s second example? Oh well.


“If you build it, they will come.”

Offline

Board footer

Powered by FluxBB