Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [outdated] zem_contact, flexible mailto form
I use this:
<code>”=?UTF-8?B?”.trim(imap_binary(“$subject $sitename”)).”?=”</code>
where $subject is some international string needing encoding. I just copied the syntax of normal encoded mail and it decodes right. I don’t know about the imap extension availability – I never had problem finding it (but my hosting experiences are modest).
Who’s gonna textdrive you home tonight?
Offline
Re: [outdated] zem_contact, flexible mailto form
I had the same idea as Lee to modify the plugin to allow for a predefined subject for emails. However, I have managed to keep the default subject if none has been specified.
Define a new variable like this:
<code>$mailsubject = (empty($atts[‘mailsubject’]) ? ‘Email enquiry for ‘.$sitename : $atts[‘mailsubject’]);</code>
Then modify the line that sends the email like this:
<code>$r = mail($mailto, $mailsubject, $msg, $headers);</code>
All up, this is a great little plugin. Like others, I too would like to be able to define where on a page the thank you text appears, and also fix the refresh/back button issue, but this is still a great plugin and many thanks to zem for the hard work.
Offline
Re: [outdated] zem_contact, flexible mailto form
Could this great plugin ever be incorporated directly into TxP (i.e., not a plugin anymore)? That would be nice. I don’t claim to know anything about how TxP…ahem…payroll works (or not), nor developing for that matter, but I’m thinking an “incorporation” project might be considered an on-the-TxP-job, and therefore a win-win for everybody.
Nevertheless, I’d pay a ransom for some upgrades to this nice plugin. Besides the problems mentioned in this thread, and <a href=“http://forum.textpattern.com/viewtopic.php?id=6510”>here</a>, are there any forseen problems with v1.0?
Offline
#64 2005-03-01 11:28:09
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: [outdated] zem_contact, flexible mailto form
Zem, when I use the code below I can get the error message to display in a different part of the page OK, but the thankyou form is not dispalyed and an email dosen’t get sent.
<code>
<div id=“error”><txp:zem_contact form=“contact_form” showinput=0 /></div>
<div id=“inputform”><txp:zem_contact form=“contact_form” showerror=0 /></div>
</code>
Edit:
I found that changing line 48ish from
<code>
elseif ($showinput and is_array($zem_contact_form) and ps(‘zem_contact_submit’)) {
</code>
to
<code>
elseif (is_array($zem_contact_form) and ps(‘zem_contact_submit’)) {
</code>
…did the trick. Something to do with testing the value of showinput, I think it should be tested for value 0. But I know nothing about PHP so your help would be appreciated.
Thanks
Lee
Last edited by lee (2005-03-01 12:04:21)
Offline
Re: [outdated] zem_contact, flexible mailto form
Great plugin Zem. Thanks.
You can see the use I’m putting it to at the uvList
One question / request: it’d be great to be able to pass classes / ids through the plugin. Say something like <code><txp:/zem_contact_submit id=“doitnow” /></code> and have <code><input type=“submit” id=“doitnow /></code> come out.
But maybe I’m missing something? What I’d like is a more precise way to hook CSS in.
Also / or the plugin could just — as I believe is the norm these days — include an id that’s the same as the <code><input></code>‘s name.
edit: The uvList has now launched, so Ruby on Rails is hiding behind the scenes in place of Zem’s cleverness…
Last edited by cboone (2005-05-21 11:29:11)
Offline
Re: [outdated] zem_contact, flexible mailto form
Well… the answer seems to be: for some of the attributes, you can declare <code>name</code> when calling <code>zem_contact</code> and you get both <code>name</code> and <code>id</code> in the bargain.
Which is, of course, as it should be.
Any ideas for the ones that don’t accept <code>name</code>? (<code>zem_contact_submit</code> doesn’t seem to, for instance.)
Thanks for getting there ahead of me zem…
Last edited by cboone (2005-03-10 13:41:47)
Offline
#67 2005-03-10 23:28:21
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: [outdated] zem_contact, flexible mailto form
Zem, I don’t think this works with rc3 188. To be more specific, using a a form to hold the fields dosen’t work, a form is placed on the resulting html page but no fields are in it.
Offline
Re: [outdated] zem_contact, flexible mailto form
Does this work if placed in an article?
Last edited by blumie607 (2005-03-18 05:41:34)
bludrop studios .::. Creative Expression
Offline
Re: [outdated] zem_contact, flexible mailto form
Yes, I’ve used it within an article on RC1.
Offline
Re: [outdated] zem_contact, flexible mailto form
Thanks for this plugin. I’m using it at the end of some of my articles:
like this article
It’s pulling the title and using it as the email subject, and pulling the author’s name and associated email address for the mailto field.
textpattern.org :: find and share Textpattern resources
textpattern.net :: TextBook – Textpattern wiki
Offline
#71 2005-03-20 08:26:27
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: [outdated] zem_contact, flexible mailto form
Hi Zem, will you be releasing a bug fix version any time soon?
Cheers, Lee.
Offline
#72 2005-03-21 00:46:00
- ferenczi
- Member

- Registered: 2005-01-31
- Posts: 67
Re: [outdated] zem_contact, flexible mailto form
props to lee for picking up on the $name error—put an end to my headache.
and props to zem for writing useful and elegant software. i don’t have a problem with the “ransom”—it’s a creative idea, actually. it’s sort of like a bunch of folks getting together to lift a heavy thing, in order to get said thing to its destination more quickly and with the least amount of strain on everyone involved.
did i chip in? no. :blush: i came to the plugin post-ransom. but…next time.
Offline
Re: [outdated] zem_contact, flexible mailto form
I’ve got this working perfectly on one site. Using the exact same code on another site, and it’s not working. All it tells me is “Unable to send mail.”
Why would this be happening? Might it have something to do with the server? The one that works is on a linux machine. The other is one (I think) a Windows server.
Ideas?
Offline
#74 2005-04-09 18:30:19
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: [outdated] zem_contact, flexible mailto form
Zem, any idea why this plugin dosen’t work with rev 277?
Thanks
Lee
Offline
#75 2005-04-25 10:10:27
- ferenczi
- Member

- Registered: 2005-01-31
- Posts: 67
Re: [outdated] zem_contact, flexible mailto form
> luro wrote:
> is it possible to use an image for submit ?
i’d like to …
moi aussi, and i can’t figure out how to do it with this, currently. anyone have an answer? zem, name your ransom: i’m ready this time!
Offline