Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2007-04-13 11:21:02
- henningsjogren
- Member
- Registered: 2005-02-02
- Posts: 12
Strange issue with zem_image
Hi!
After moving my blog to a new host I’m having a few difficulties with the zem_image plugin.
It seems that the plugin does not understand the path to the images, and is outputting the wrong image src.
For instance:
The main article page shows the images correctly, with this path ‘img src=“http://timeunit.se/blog/images/362.jpg”’.
The thumnails page, which relies on the zem_image plugin outputs ‘img src=”/images/362t.jpg”’, which is not right.
If I change the “image directory” in textpattern advanced preferences to “blog/images” the zem_image plugin outputs the right path, but all other images are missing, the path is then ‘img src=“http://timeunit.se/blog/blog/images/362.jpg”’.
What to do?
Thanks!
Offline
#2 2007-04-23 16:47:34
- henningsjogren
- Member
- Registered: 2005-02-02
- Posts: 12
Re: Strange issue with zem_image
no-one? :*-(
Offline
Re: Strange issue with zem_image
It is better to ask in the plugin’s thread :)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#4 2007-05-12 09:11:08
- henningsjogren
- Member
- Registered: 2005-02-02
- Posts: 12
Re: Strange issue with zem_image
Well, I’m not using zem_image replace, but zem_image. Thanks.
Offline
Re: Strange issue with zem_image
Googling for a plugin called zem_image only gives this topic as a result, so I wonder where you found that plugin.
Offline
#6 2007-05-12 20:15:58
- henningsjogren
- Member
- Registered: 2005-02-02
- Posts: 12
Re: Strange issue with zem_image
I’m a schmuck!! Sorry!
I mean “zem_article_image”!
Offline
Re: Strange issue with zem_image
Try this: edit the plugin and replace:
global $thisarticle,$pfr,$img_dir, $id;
with:
global $thisarticle,$img_dir, $id;
$pfr = hu;
Last edited by ruud (2007-05-12 20:56:53)
Offline
#8 2007-05-12 21:16:36
- henningsjogren
- Member
- Registered: 2005-02-02
- Posts: 12
Re: Strange issue with zem_image
Excuse me, are you a GOD?
It works perfectly!
Thank you, thank you, thank you!
Could you maybe, if you have the time, explain what the change did?
Thanks again!
Offline
Re: Strange issue with zem_image
The deprecated $pfr variable used to contain the path to the root of your textpattern installation, but although it still exists in Textpattern, it’s always set to ‘/’, while your site is at ‘/blog/’. I think that’s a bug, so this is now fixed in SVN revision 2343 of textpattern.
Meanwhile, since you’re probably running TXP 4.0.4 instead of the latest development version, there’s a constant called ‘hu’ which in your case contains ‘http://timeunit.se/blog/’. While that is not the same as ‘/blog/’, in most cases it works just as well. The change you’ve now made, stops zem_article_image from using the globally set $pfr variable and instead uses the constant ‘hu’
Last edited by ruud (2007-05-12 21:27:41)
Offline
Pages: 1