Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Topic closed
#1 2005-10-10 11:24:17
- mrbbking
- New Member
- Registered: 2005-10-10
- Posts: 2
Title: 4.0.1 (r888) article_image - extra img wrapper
(I can’t find the ‘search’ function in the forums, but I paged through the most recent stuff and didn’t find this one. I apologize if this is already reported)
Steps to reproduce
Building an image page, with this form:
<code>
<txp:article_image /><txp:body />
</code>
And this, for the “Article Image”
<code>
<txp:image id=“2” />
</code>
I get this HTML for the image:
<code>
<img src=”<img src=“http://localhost/~mrbbking/images/2.jpg” height=“240” width=“200” alt=”“ />” alt=”“ />
</code>
(note the extra wrappers)
In the article_image function of taghandlers.php, if I change line 1050 from this:
<code>
return ‘<img src=”’.$theimage.’” alt=”“ />’;
</code>
to this:
<code>
return $theimage;
</code>
I get the correct image tag.
I don’t know enough about the internals to know if I’m breaking some other use of that code, but this change solves the problem for me.
Diagnostic Block:
Textpattern version: 4.0.1 (r888)
last_update: 2005-10-09 23:55:47/2005-09-06 12:58:23
Document root: /Library/WebServer/Documents
$path_to_site: /Users/mrbbking/Sites
Textpattern path: /Users/mrbbking/Sites/textpattern
Permanent link mode: messy
Temp folder: /private/var/tmp
Site URL: localhost/~mrbbking
PHP version: 4.3.11
Magic quotes: 1/0
MySQL: 4.1.12-standard
Locale: en_US.UTF-8
Server: Apache/1.3.33 (Darwin) PHP/4.3.11
Apache version: Apache/1.3.33 (Darwin) PHP/4.3.11
Offline
Re: Title: 4.0.1 (r888) article_image - extra img wrapper
> And this, for the “Article Image”
> <code><txp:image id=“2” /></code>
http://textpattern.net/wiki/index.php?title=Txp:article_image_/
You enter either a url or the ID.
Offline
#3 2005-10-10 23:58:26
- mrbbking
- New Member
- Registered: 2005-10-10
- Posts: 2
Re: Title: 4.0.1 (r888) article_image - extra img wrapper
Ah-ha!
When I enter “2” in the “Article Image” box, I get the correct HTML with the release version of taghandlers.php or with the one I edited (because the “else” doesn’t execute when the “Article Image” is numeric).
I’ll go with the plain old number and the release taghandlers.php, then.
Thanks for your help, Sencer.
Offline
Pages: 1
Topic closed