Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-10-19 20:55:39

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

txp:email with an image as the link

Hello,

The title says it all really: I’d like an <a href="mailto:...."><img src="..."/></a> only using a txp:email tag—using an img src or txp:image—to remain spam-proof. Sounds easy, might be, can’t find how…
Thanks!

Hicks.

Offline

#2 2009-10-19 21:14:40

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

Re: txp:email with an image as the link

Would this work?

<txp:email email="john.doe@example.com" linktext='<txp:image id="123" />' title="Send me an Email" />

Offline

#3 2009-10-20 03:19:15

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

Re: txp:email with an image as the link

It’s been a while since I’ve been at the coding table, so I think it’s simply that you can’t have txp: markup in articles… oh dear.
What I really need, then, is the spam-proof mailto: equivalent of !/common/textist.gif(Textist)!:http://textism.com.

?

h.

Offline

#4 2009-10-20 06:15:05

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: txp:email with an image as the link

Try this:

<txp:email email="foo@example.com"> !/images/bar.gif! </txp:email>

Offline

#5 2009-10-20 08:31:03

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

Re: txp:email with an image as the link

wet wrote:

Try this:

Dammit! Can <txp:email> be used as a container tag as well??

Offline

#6 2009-10-20 08:34:29

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: txp:email with an image as the link

Offline

#7 2009-10-20 09:26:47

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

Re: txp:email with an image as the link

D’oh! Textbook updated.

Offline

#8 2009-10-20 15:45:09

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

Re: txp:email with an image as the link

I swear I tried that yesterday, why does it work today? Code writing gap, cold bugs in my brain… probably had a / in the wrong place.

Thanks

h

Offline

Board footer

Powered by FluxBB