Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2006-09-29 01:08:00

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: r1853 - image tags

I can’t eliminate style yet, for backwards compatibility. Class is still applied, but to a wrapping tag.

Offline

#14 2006-09-29 03:31:50

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,595
Website

Re: r1853 - image tags

There is something confusing me in this discussion…
[case 1] When I do [ img src="http://127.0.0.1/txptest/images/2.png" width="80" height="80" alt="test image" class="myimage" /], aka use ‘xhtml’ tag in the tagbuilder, the class is outputted correctly, attached to the image tag.
[case 2] But <txp:image class="myimage" id="2" />, using the ‘textpattern’ tag, then it fails to output the class in the image tag.

Case 1 is the behaviour I would want, and what Bert was looking for, I think.
Having a different behaviour for Case 2 is just confusing. Why wouldn’t you want to attach a class to the image tag? This becomes extremely problematic if you want for example to have an image floated left and an image floated right inside a long paragraph. There is no way you can define that in terms of CSS selectors, using syntax like p.myimage img {}.

I’ve always used the markup as in case 1, and that will work fine, Hopefully you won’t take away the parsing of the class attribute on the xhml tag…

Tested at rev 1860.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#15 2006-09-29 04:03:13

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: r1853 - image tags

Philippe, I’ll give you my reasoning for using the txp image tag.

Textile: <code>!http://txpun.com/images/4.png (Open Source)!</code>
Textpattern: <code><txp:image id=“4” /></code>
XHTML: <code><img src=“http://txpun.com/images/4.png” width=“120” height=“100” alt=“Open Source” /></code>

If I decide to create another site from a section of TxPun or if I want to test my site locally, the Textpattern tag is portable. It was a relative path in 4.0.3 but now it’s the full url, don’t know why.

Offline

#16 2006-09-29 04:04:58

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: r1853 - image tags

Philippe, when would an image appear in the middle of a sentence, as opposed to being a sentence by itself (i.e.: a figure, a pull-quote, a photo…)?

Offline

#17 2006-09-29 04:40:19

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,595
Website

Re: r1853 - image tags

Mary wrote:

Philippe, when would an image appear in the middle of a sentence, as opposed to being a sentence by itself (i.e.: a figure, a pull-quote, a photo…)?

A paragraph can contain many sentences. Image can be sort of part of the sentence in the narative. Maybe not something for an average 3 sentence blog post, but some people tend to write longer stories.

dummy dummy example
or more live example

@hcgtv
you have a good point there. It makes it more portable.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#18 2006-09-29 05:07:49

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,391
Website GitHub Mastodon

Re: r1853 - image tags

… a smiley icon ;-) is expected in the middle of sentences.

Last edited by wet (2006-09-29 05:08:54)

Offline

#19 2006-09-30 12:38:32

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: r1853 - image tags

  • I think a smilie is best suited to a parsing plugin rather than being called from one of the image tags.
  • Your examples have no alternate text and are floated left/right, which doesn’t exactly warrant being in the middle of a sentence. ?
  • Still, I suppose there might be some instances you’d need that ability. Try r1863.

Offline

#20 2006-09-30 18:44:34

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: r1853 - image tags

Thanks for 1863 Mary.

Offline

#21 2006-10-01 01:51:47

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,595
Website

Re: r1853 - image tags

hcgtv wrote:

Thanks for 1863 Mary.

idem dito.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#22 2006-10-04 19:40:43

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: r1853 - image tags

Mary wrote: when would an image appear in the middle of a sentence, as opposed to being a sentence by itself (i.e.: a figure, a pull-quote, a photo…)?

Little late here but I thought I would just say I have written articles where I have talked about interface buttons and put imags of them inline for direct context and absolute understanding.

Arbitrary example: The Sage button, (small image here), shows what is likely a sage leaf, but looks as much like a green feather.

Offline

Board footer

Powered by FluxBB