Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2015-02-20 18:25:11

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

Re: css image alignment

jameslomax wrote #288299:

According to etc it seems that somewhere in there, I need to insert a <p> to separate the text from the photo. I don’t know how to do that.

Sorry for the long silence. This is on txp (not css) side. You seem to use an article per photo, could we see the corresponding article form?

Offline

#26 2015-02-23 15:42:26

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

Re: css image alignment

Yes, thank you. Here’s the photo article form:

<!--start photo_article form template -->

<div class="post">
<txp:if_individual_article>
<txp:body />
</txp:if_individual_article>
<txp:if_article_list>
<txp:body />
</txp:if_article_list>

<span id="title"><txp:permlink><txp:title /></txp:permlink></span>

<span id="date"><txp:posted /></span>

<div class="clear">&nbsp;</div>

<center><span class="copyright"><a href="/about/">James Lomax</a> <a href="/copyright/">© 2005 • all rights reserved</a></span></center>
<center>
<a href="http://www.photoblogs.org">Photoblogs </a> /
<a href="http://www.photoblogs.org/profile/jameslomax.com/">Vote for me</a></center>


</div> <!-- end post -->

<!--end photo_article form template -->

Offline

#27 2015-02-23 15:44:37

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

Re: css image alignment

And this form is called photo_front. I should emphasise that I didn’t write this stuff, so I myself don’t really understand it –

<txp:hide>
	<div class="prev-next">
		<p class="prev"><txp:link_to_prev>&larr; Previous</txp:link_to_prev></p>
		<p class="next"><txp:link_to_next>Next &rarr;</txp:link_to_next></p>
		<div class="clear">&nbsp;</div>
	</div>
</txp:hide>

	<div id="photo_wrapper">
	<p id="single-photo"><txp:chh_if_data><a href="<txp:link_to_prev />" class="prev_photo_link" title="&#8592; <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 /> &#8594;">&nbsp;</a></txp:chh_if_data><txp:etz_striptags><txp:body /></txp:etz_striptags></p>
	</div>

	<p id="single-title"><a href="<txp:permlink />" title="Permanent link to &#8220;<txp:title />&#8221;"><txp:title /></a></p>
	<p id="single-date"><txp:posted /></p>

	<div class="clear">&nbsp;</div>
<txp:output_form form="current_article_timestamp" />

Offline

#28 2015-02-23 15:45:58

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

Re: css image alignment

And this one is called photo_single –

<txp:hide>
	<div class="prev-next">
		<p class="prev"><txp:link_to_prev>&larr; Previous</txp:link_to_prev></p>
		<p class="next"><txp:link_to_next>Next &rarr;</txp:link_to_next></p>
		<div class="clear">&nbsp;</div>
	</div>
</txp:hide>

	<div id="photo_wrapper">
	<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><txp:etz_striptags><txp:body /></txp:etz_striptags></p>
	</div>

	<div class="clear">&nbsp;</div>

	<p id="single-title"><txp:title /></p>

	<p id="single-date"><txp:posted /></p>

	<div class="clear">&nbsp;</div>
<txp:output_form form="current_article_timestamp" />

Offline

#29 2015-02-23 18:17:49

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

Re: css image alignment

Can you give us the link to the page of this screenshot, so we can see the context.

Offline

#30 2015-02-23 22:49:22

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

Re: css image alignment

GugUser wrote #288522:

Can you give us the link to the page of this screenshot, so we can see the context.

Here we go.

Seemingly, it must be photo_single form, but I don’t understand where the image comes from, etz_striptag should remove it… James, could you check please which form is used by the article with ID=2718? And what is in its body?

Offline

#31 2015-02-23 23:10:24

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

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

#32 2015-02-24 00:06:56

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,731
Website

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

#33 2015-02-24 00:47:43

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

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.


My Plugins

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,473

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

#35 2015-02-24 19:53:52

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

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.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#36 2015-02-24 20:46:04

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

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

Board footer

Powered by FluxBB