Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#31 2015-02-23 23:10:24
- GugUser
- Member

- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,477
Re: css image alignment
Hi James
You have a commercial site and I appreciate your beautiful photos. Nothing is free and all your photos are copyrighted.
On the other hand, you expect that we will help you with all your problems. Yes, we are willing to voluntarily help you. But I think it would be fair of you, when you would give us in a usable time all the necessary information we need.
Why should we break our heads for days?
In Spanish: ¿Por qué debería romperme la cabeza durante días?
Help us too with clear information. Thanks.
Offline
Re: css image alignment
I’ve helped james in the past, as I believe have others. As far as I remember, Mary helped James make the site in the beginning in the early days of txp. I can only find a few old files at the moment, but if my memory serves me correctly, it was set up with a upm_image tag (one of Mary’s own) – or maybe an html img tag in the body and excerpt fields. Some of the posts with a story start with the img tag, then proceed with text, sometimes with further img tags interspersed depending on how long the article was. I’m sure Mary had her reasons at the time, but nowadays one would probably do that differently. (As an aside, the forms posted above bear clues to past edits and their age: hidden sections, superfluous if_ tags and the now ancient center tag). Anyhow, the upshot was that it was not always possible to make layout changes without revisiting the articles and dissecting them or introducing tags into the body field. And James has thousands of images… so it’s no small job to change around. I don’t know if the situation is still the same now or whether someone else has modified it since.
I honestly can’t remember what the situation is here, but that could be the explanation: the etz_strip_tags is unwrapping the p around the body tag – which contains an image tag followed by a paragraph (or more) of text – so that it can be wrapped around all of that incorporating the next/prev links too. As long as the pictures had a fixed height/width, that probably worked fine. Now, if you look at the .next_photo_link in the inspector, it extends to the bottom of the text, which would bear that theory out.
James, if you can post what is in the body field of that article, then that will shed some light on it.
Maybe your etc_query would be an option seeing as it can traverse and alter the dom once output. Alternatively, remove the tag stripping and place the next/prev separately (almost like they were in the txp:hidden section), then use javascript after page rendering to position them over the image as clickable areas. Or simply stick to a simpler suggestion like the fixed width one I posted earlier and live with the inflexibility.
TXP Builders – finely-crafted code, design and txp
Offline
Re: css image alignment
GugUser wrote #288532:
Hi James
You have a commercial site and I appreciate your beautiful photos. Nothing is free and all your photos are copyrighted.
On the other hand, you expect that we will help you with all your problems. Yes, we are willing to voluntarily help you. But I think it would be fair of you, when you would give us in a usable time all the necessary information we need.
Why should we break our heads for days?
In Spanish: ¿Por qué debería romperme la cabeza durante días?
Help us too with clear information. Thanks.
I don’t think a post like this is necessary. If you don’t want to break your head then just don’t. This comes off unwelcoming which is unusual for the community here.
I’ve seen replies like this from GugUser before but I usually assumed was more well meaning than it read to me due to language differences but I wanted to speak up this time.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#34 2015-02-24 17:53:20
- GugUser
- Member

- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,477
Re: css image alignment
MattD wrote #288535:
I don’t think a post like this is necessary.
Are you the one who decides what is necessary and what is unnecessary?
I’ve seen replies like this from GugUser before but I usually assumed was more well meaning than it read to me due to language differences but I wanted to speak up this time.
Am I now on the black list?
My post is “well-meaning”, I would be glad to help, but that has been going on so for two weeks and the important information isn’t be given.
An attempt to explain
It was not my intention to be rude.
But it occurs to me that there are members in this forum who expect only immediate solutions. They post a incomplete question with incomplete information, and they do not respond to several requests, or respond to something else different, but expect, that they receive ready-made solutions, they can then copy without having to think about it themselves.
This topic is typical for this. As an example: The several times mentioned screenshot does not help to understand the source code.
I think we can all learn step by step and continue to evolve continuously.
The help, giving in the forum is great, but we should support that learning processes can begin.
Original version in German
Es war nicht meine Absicht, unhöflich zu sein.
Mir fällt aber auf, dass es in diesem Forum Mitglieder gibt, welche nur Sofortlösungen erwarten. Sie posten eine unvollständige Frage mit unvollständigen Angaben, und auf mehrmaliges Nachfragen antworten sie nicht, oder antworten etwas anderes, erwarten aber, dass ihnen fertige Lösungen geliefert werden, die sie danach kopieren können, ohne selbst darüber nachdenken zu müssen.
Dieses Thema ist typisch dafür. Als Beispiel: Der mehrmals erwähnte Screenshot hilft nicht, den Quellcode verstehen zu können.
Ich denke, wir alle können Schritt für Schritt lernen und uns kontinuierlich weiterentwickeln.
Die Hilfe, welches das Forum gibt, ist toll, aber wir sollten dabei auch unterstützen, dass Lernprozesse beginnen.
Offline
Re: css image alignment
GugUser wrote #288557:
It was not my intention to be rude.
That’s what I suspected but I wanted to make sure it was brought up that it does read as rude. Just my opinion. I don’t intend to stop you from contributing at all.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: css image alignment
I don’t want to say this stuff but feel I now have to because of how forums work and how misconceptions arise. I don’t “expect” anything. I have benefited from assistance before and simply say if you can assist, that’s great. I’ve been posting for ten years. There are occasions when I’ve not got assistance. When that happens I am completely stuck – which is not nice. It means I can’t do what I’d like to do, which is sometimes quite simple. It’s simple – but I can’t do it. That is not however a situation I “expect” to be otherwise.
I sell on average about 1 photo a year – quite literally – and they are copyrighted because I don’t want them stolen. I fail to see why you would mention that. I have no knowledge of what you are talking about – “other members” etc – but suggest you seem to be making negative remarks about me.
As Matt said – if a request doesn’t interest or frustrates you then ignore it. Can I suggest you read me calmly as I have read you, there’s now a little more clarity, and as adults and gentleman it should be left at that.
As regards your ideas – you were making points about more complex alterations which I could not attempt and did not understand. As you can see – I was even struggling with where and how to insert a <p>.
It seems that will be a simple solution if I’m advised how to do it.
However – given the replies above from jacob and etc it seems it’s not so simple because you have to understand how my site is working. I will try to understand and reply again shortly.
If anyone is interested: the first person to help me with my site 10 years ago was never a member here and went offline years ago. I found I wanted to change it a little, couldn’t do it, and Mary helped me. Then Stuart helped me, and then Jacob. I tried studying the TXP book, tried this, tried that, and every time got lost in a sea of confusion which was increasingly demoralising.
Offline
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,316
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
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,316
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
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
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.
Offline
#43 2015-02-25 00:04:24
- GugUser
- Member

- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,477
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
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="← <txp:prev_title />"> </a></txp:chh_if_data>
<txp:chh_if_data><a href="<txp:link_to_next />" class="next_photo_link" title="<txp:next_title /> →"> </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
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