Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2015-02-24 21:05:02

jameslomax
Member
From: UK
Registered: 2005-05-09
Posts: 448
Website

Re: css image alignment

“could you check please which form is used by the article with ID=2718? And what is in its body?”

I’m not sure I understand the question or how to answer it. This is in the post however:

<txp:image id=“3183” />

And this is in the excerpt:

<txp:thumbnail id=“3183” />

As I recall, Mary’s upm_image used non standard tags so I never used it to insert photos.

Offline

#38 2015-02-24 21:21:22

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: css image alignment

jameslomax wrote #288561:

I was even struggling with where and how to insert a <p>.
[…]
This is in the post however:

<txp:image id=“3183” />

If that really is the critical point, then the solution will be as simple as pressing the return button once (or maybe twice) below the image tag in your article :]


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#39 2015-02-24 22:37:34

jameslomax
Member
From: UK
Registered: 2005-05-09
Posts: 448
Website

Re: css image alignment

I tried that about 2 years ago. I wanted some space between the photo and the text underneath it – you can see why – and it didn’t work. I tried inserting <p> and <br> and that didn’t work either.

I don’t know if that’s important for the current issue – possibly it is.

Offline

#40 2015-02-24 23:06:51

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: css image alignment

jameslomax wrote #288563:

I tried that about 2 years ago.

Have you tried it today? It would really help us in helping you.

Last edited by uli (2015-02-24 23:07:16)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#41 2015-02-24 23:11:54

etc
Developer
Registered: 2010-11-11
Posts: 5,195
Website GitHub

Re: css image alignment

jameslomax wrote #288561:

I’m not sure I understand the question or how to answer it. This is in the post however:

<txp:image id=“3183” />

Is that all? Where this text comes from?

I wonder how many times I’ve driven past here. Thirty, forty, possibly fifty or more. A few times I’ve stopped, parked, and taken a photograph. I’m not sure this shows the full potential of the view, but it’s close. The trees are bare of leaves which helps. Imagine the tree on the right and how it might obscure the view. You don’t want that. The colours are muted which adds to the effect. This is a layout shot, not a pretty colour shot. What I’d ideally like to see is some dramatic light, possibly storm light with dark skies, accentuating the foreground. The Derwent river flows down the Borrowdale valley and ends at Derwentwater. Just before land becomes lake, you find these marshes. The hills are Maiden Moor.

Offline

#42 2015-02-24 23:44:50

jameslomax
Member
From: UK
Registered: 2005-05-09
Posts: 448
Website

Re: css image alignment

To be more accurate – I was attempting to identify the relevant stuff and leave out the rest (it seems its not that simple) the full content of the post is as follows:

<txp:image id=“3183” />

I wonder how many times I’ve driven past here. Thirty, forty, possibly fifty or more. A few times I’ve stopped, parked, and taken a photograph. I’m not sure this shows the full potential of the view, but it’s close. The trees are bare of leaves which helps. Imagine the tree on the right and how it might obscure the view. You don’t want that. The colours are muted which adds to the effect. This is a layout shot, not a pretty colour shot. What I’d ideally like to see is some dramatic light, possibly storm light with dark skies, accentuating the foreground. The Derwent river flows down the Borrowdale valley and ends at Derwentwater. Just before land becomes lake, you find these marshes. The hills are Maiden Moor.

- which renders into this

Offline

#43 2015-02-25 00:04:24

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: css image alignment

jameslomax wrote #288560:

(…) but suggest you seem to be making negative remarks about me.

Hi James

No, I didn’t want to make negative remarks about you. I like you site, I like your photos and your work.

I like Textpattern and the work with Textpattern. Often the problems presented here are very easy to solve, but they are presented so that they are difficult to understand. Sorry, if this has arrived as a criticism of you. It was nothing personal. My communication in English is limited.

With regard to the commercial side, I thought she might need a professional assistance, and not a few patches from the forum.

Offline

#44 2015-02-25 11:09:15

etc
Developer
Registered: 2010-11-11
Posts: 5,195
Website GitHub

Re: css image alignment

jameslomax wrote #288566:

To be more accurate – I was attempting to identify the relevant stuff and leave out the rest (it seems its not that simple)

You were right, I just (still) don’t understand why etz_striptags does not strip images, but maybe it’s normal in v.0.2 (can’t download it). OK, to minimize the effort, you can try to install etc_query and replace photo_wrapper div in photo_single form with

<div id="photo_wrapper">
	<txp:etc_query data='<txp:body />' query="*/img/.." limit="1">
		{preceding-sibling::node()}
		<p id="single-photo">
		<txp:chh_if_data><a href="<txp:link_to_prev />" class="prev_photo_link" title="&larr; <txp:prev_title />">&nbsp;</a></txp:chh_if_data>
		<txp:chh_if_data><a href="<txp:link_to_next />" class="next_photo_link" title="<txp:next_title /> &rarr;">&nbsp;</a></txp:chh_if_data>
		{img}
		</p>
		{following-sibling::node()}
	</txp:etc_query>
</div>

This should also preserve all formatting in the text preceding and following the first image. Note that it assumes that you use textile, and the first element of your posts is an image not necessary anymore.

Last edited by etc (2015-02-25 13:09:17)

Offline

#45 2015-02-25 20:25:34

jameslomax
Member
From: UK
Registered: 2005-05-09
Posts: 448
Website

Re: css image alignment

Thanks, tried that and archive articles failed to display the photo producing this error

query=”*/img/..” limit=“1”> {preceding-sibling::node()} {img} {following-sibling::node()}

The front page photo was however OK.

I didn’t realise etz_striptags was being used and was important. Nor do I understand what it does. If this helps, this is what you can edit in admin control for etz_striptags -

function etz_striptags ($atts, $thing)
{
	return strip_tags(parse($thing), '<img>');
}

Offline

#46 2015-02-25 21:51:44

etc
Developer
Registered: 2010-11-11
Posts: 5,195
Website GitHub

Re: css image alignment

jameslomax wrote #288599:

Thanks, tried that and archive articles failed to display the photo producing this error

Looks like etc_query is closed right before its query attribute, maybe because of mismatching quotes or some typo, please check. If you wish, you can create and send me a designer account, I’m generally careful with others sites. :)

I didn’t realise etz_striptags was being used and was important. Nor do I understand what it does. If this helps, this is what you can edit in admin control for etz_striptags -

function etz_striptags ($atts, $thing)...

Yes, it helps, and means that all HTML tags but images are stripped from articles body. That’s why you loose <br /> and other formatting stuff.

Last edited by etc (2015-02-25 22:35:45)

Offline

Board footer

Powered by FluxBB