Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
spam proof email from custom field
I have an article that uses custom fields for certain data,
and it will need to include an email address entered by a less than tech savvy user.
in other words, I would like the custom field to be filled out : email@domain.com
I am hoping to insert this custom field into a bit of javascript or using php, directly into the <code><txp:email email=”<txp:php>stuff i don’t know how to do</txp:php>”</code> tag.
Anybody have any ideas, or see something I don’t?
Thanks
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
Re: spam proof email from custom field
It’s groundhog day tags-in-tags time again. Woohoo!
Matt, try this (most preferably in an article form, or even in a misc form you push through txp:output_form directly in just one article. Depends on your goals):
<txp:php>
$c = custom_field( array("name"=>"address")); # assuming custom field name here!
$a = array("email" => $c, "linktext"=> "link text", "title" => "a humble title" );
echo email ( $a );
</txp:php>
This piece of code assumes that you named your custom field “address” (see # comment above).
Last edited by wet (2006-06-07 06:59:01)
Offline
Re: spam proof email from custom field
Wet,
thanks bro. I’ll give that a go!
One of these days I’m going to strap myself to my chair and start learning the txp php.
:)
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
Re: spam proof email from custom field
Avoid this. At any cost. It’ll do you no good.
Offline
#5 2006-06-08 03:59:15
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: spam proof email from custom field
Matthew,
I have been working on a plugin to allow you to pack multiple values into custom fields. Have added a tag to it to allow you to setup an email link from the values of a custom field. Drop me an email via the forum or my contact page if you want an advance copy of it. It should be up on my site within a day or two.
It’s up already at http://txp-plugins.netcarving.com/plugins/
Last edited by net-carver (2006-06-08 04:35:20)
— Steve
Offline
Re: spam proof email from custom field
wet,
to the point. maybe just keep pursuing design and css/xhtml huh? or maybe php in general, rather than learning some of the TXP tag php?
where is the motivation behind your comment?
Netcarver,
I’ll check it out, thanks.
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
Re: spam proof email from custom field
ma_smith wrote:
wet, where is the motivation behind your comment?
- Just kidding.
<rant>PHP sucks in various ways, though it’s popular</rant>
Last edited by wet (2006-06-08 07:46:09)
Offline
Re: spam proof email from custom field
Wet,
1. can you say dry.
2. What do you like to write in? Are you using ROR at all?
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
Pages: 1