Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-03-04 22:59:29

hicks
Member
From: Portland, OR, USA (ex-UK)
Registered: 2009-05-08
Posts: 106
Website

txp:author credit (or other txp:) before last </p> of txp:body?

I searched for this, and you can do it with a glyph:

http://forum.textpattern.com/viewtopic.php?id=21486

—but can you do it with a the txp:author credit, or other, like txp:posted (which, come to think of it, might be nice at the beginning of an article after the first <p>), like good ol’ print magazines do?

e.g.:

Yah-de-yah, body blah blah blah. —DAVE

—with a <span> tag for the credit/other?

That would be smashing.

Thanks!

Offline

#2 2010-03-04 23:39:21

hicks
Member
From: Portland, OR, USA (ex-UK)
Registered: 2009-05-08
Posts: 106
Website

Re: txp:author credit (or other txp:) before last </p> of txp:body?

Note, in this case, my txp:body is only one paragraph, so I could have used etz_striptags if it only took out the <p> tags.

Any ideas?

Offline

#3 2010-03-04 23:50:06

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

Re: txp:author credit (or other txp:) before last </p> of txp:body?

My favorite knife rah:replace


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

Offline

#4 2010-03-04 23:53:21

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: txp:author credit (or other txp:) before last </p> of txp:body?

rah_replace: <txp:rah_replace from="<p>,</p>" to=","><txp:body /></txp:rah_replace>

Edit: late again ;)

Last edited by els (2010-03-04 23:53:42)

Offline

#5 2010-03-05 00:06:49

hicks
Member
From: Portland, OR, USA (ex-UK)
Registered: 2009-05-08
Posts: 106
Website

Re: txp:author credit (or other txp:) before last </p> of txp:body?

Works like a charm. Thank you.

Offline

Board footer

Powered by FluxBB