Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#271 2007-07-14 10:04:10
Re: zem_contact_reborn 4.0.3.19 (old version)
Hi,
In using the “send_article” functionality, how can I customise the email that is sent? For example I want to put some intro text that says something like “ Hi receiver@foo.com, sender@foo.com has sent you this article from http://mywebsite.com:”
Also I want the body to be posted and not just the excerpt.
thanks in advance,
Brianna
Offline
#272 2007-07-15 11:23:47
Re: zem_contact_reborn 4.0.3.19 (old version)
Currently not possible without hacking the plugin code.
Offline
#273 2007-07-25 07:10:17
- werner
- Member
- Registered: 2006-09-03
- Posts: 10
Re: zem_contact_reborn 4.0.3.19 (old version)
tinyfly wrote:
Ruud,
I figured out my problems with the email messages. I have textpattern installed on an Oracle Application Server. Which Oracle recommends configuring php with the —enable-sigchild option. This option makes php always return false for child processes (bug?).
So the plugin’sif (mail($var, $var, $var, $var)){}test was failing. But that test sends the email first and then if it returns false shows the error message. That is why I was still getting the error message even though I would get the mail.
I can’t reconfigure php without that option so I created a workaround that is acceptable for this particular instance.
could you please describe your workaround? my server has the same problem – sends the mail but returns false.
Offline
#274 2007-07-25 16:14:13
Re: zem_contact_reborn 4.0.3.19 (old version)
I’m having trouble with required fields on this site in progress. The email field shows up as required by default (fine, that’s what I want anyway). Then I’ve also set those three text fields (all input type=“text”) in the right column to be required.
They do get the “zemRequired” class properly applied. However, when submitting the form with empty fields, only the email field appears to get checked. If email is valid, the form submits without requiring those other fields or kicking out an error. What gives?
Page code:
<txp:zem_contact form="form_request" label="" to="redacted@redacted.com" />
relevant form_request form code:
<div class="miniCol">
<fieldset>
<legend>Contact Info</legend>
<txp:zem_contact_email break="" default="Email" name="RequestEmail" size="18" required="1" /><br />
<txp:zem_contact_text break="" label="Phone" default="Phone" name="RequestPhone" size="18" required="0" /><br />
<txp:zem_contact_text break="" label="Fax" default="Fax" name="RequestFax" size="18" required="0" />
</fieldset>
</div>
<div class="miniCol">
<fieldset>
<legend>Property Info</legend>
<txp:zem_contact_text break="" label="Property Manager" default="Property Manager Name" name="RequestManager" size="18" required="1" /><br />
<txp:zem_contact_text break="" label="Property Name" default="Property Name" name="RequestProperty" size="18" required="1" /><br />
<txp:zem_contact_text break="" label="Management Company" default="Management Company" name="RequestMgmtCompany" size="18" required="1" /><br />
</fieldset>
</div>
<div class="miniCol">
<txp:zem_contact_select name="RequestProblem" label="What seems to be the problem?" list="Bulb is burned out,Light is stuck on during the day,I changed a bulb & it still doesn't light,A fixture is broken,Other (please specify)" selected="" />
</div>
<div class="miniCol">
<txp:zem_contact_textarea name="RequestDetails" break="" label="Additional Details" cols="16" rows="4" required="0" />
<txp:zem_contact_submit label="Send Your Request" />
</div>
Offline
#275 2007-07-25 21:17:36
Re: zem_contact_reborn 4.0.3.19 (old version)
David, I can’t reproduce it when using just that form code.
I suspect the ‘default’ form values get submitted due to the javascript you’ve added, which restores the default values in the input fields when they’re empty.
Last edited by ruud (2007-07-25 21:17:59)
Offline
#276 2007-07-26 02:53:37
Re: zem_contact_reborn 4.0.3.19 (old version)
werner wrote:
could you please describe your workaround? my server has the same problem – sends the mail but returns false.
First step is to check with your server admin and see if they can reconfigure PHP without the —enable-sigchild option. If and only if they cannot then use the code below. My workaround is a fix in only the loosest sense. I basically made the mail test always return true. Here is how:
Around line 230 in the zem_contact_reborn plugin find the following bit of code:
if (mail($to, $subject, $msg, $headers))
{
$_POST = array();
And change it to this:
$mail = true
if ($mail)
{
mail($to, $subject, $msg, $headers);
$_POST = array();
The original code runs the mail function then returns true or false which in our case will alway return false so the code in the if statement is never run. In my mod I set a variable to always be true (a hack to be sure) then put that as the test for the if statement. Since this is always true it goes inside and runs the mail function and the rest of the code.
Refresh Dallas and other Refreshing Cities.
Offline
#277 2007-07-26 04:14:35
Re: zem_contact_reborn 4.0.3.19 (old version)
ruud wrote:
I suspect the ‘default’ form values get submitted due to the javascript you’ve added, which restores the default values in the input fields when they’re empty.
Of course … which is why the only error I get is “Email is not valid” rather than “email is missing.” It sure is easy to overlook the obvious. Thanks very much for your help.
Offline
#278 2007-07-26 19:37:26
- werner
- Member
- Registered: 2006-09-03
- Posts: 10
Re: zem_contact_reborn 4.0.3.19 (old version)
tinyfly wrote:
First step is to check with your server admin and see if they can reconfigure PHP without the —enable-sigchild option.
they can’t
$mail = true
had a typo, should be
$mail = true;
now it works perfectly – THANK YOU!
Offline
#279 2007-08-03 00:56:50
- Logoleptic
- Plugin Author

- From: Kansas, USA
- Registered: 2004-02-29
- Posts: 482
Re: zem_contact_reborn 4.0.3.19 (old version)
back in March, ruud wrote:
maniqui, the copysender/from thing looks like a bug. If you can confirm that my suggested fix works, it’ll be included in the next version.
Thanks for the fix, Ruud. I didn’t see a follow-up by Julián in the next few pages, but I just tried this myself. The result:
- The sender gets a copy
- The designated recipient(s) in the
toattribute get a copy - The address in the
fromattribute gets nothing (which is as it should be)
I’d love to see this rolled into a future version, since it makes it easier to use this plugin for much more than just contact forms. Will the fix you provided also work when the from_form attribute is used?
Offline
#280 2007-08-04 20:49:08
- rayben
- Member

- From: Cologne, Germany
- Registered: 2004-10-20
- Posts: 31
Re: zem_contact_reborn 4.0.3.19 (old version)
I there any possibility to add some js? For instance, I want to make the values of Name, Email & the Textarea disappear if you click on them and appear again if something else is in focus. I know how the script should look like, but I don’t know where to place it.
Did anyone try this before?
Offline
#281 2007-08-04 21:35:39
Re: zem_contact_reborn 4.0.3.19 (old version)
Adam, yes that would also work if from_form is used instead of from.
rayben, at the moment the only way is either by hacking the plugin code or by using javascript to add the ‘onclick’ attribute after the page is rendered.
Offline
#282 2007-08-04 22:13:10
- rayben
- Member

- From: Cologne, Germany
- Registered: 2004-10-20
- Posts: 31
Re: zem_contact_reborn 4.0.3.19 (old version)
ruud wrote:
rayben, at the moment the only way is either by hacking the plugin code or by using javascript to add the ‘onclick’ attribute after the page is rendered.
Thanks for the Quick Reply. It is not that important.
But I got a strange error:
The textarea field seems to validated if there is a proper e-mail address (which means it works only if I put the email in the textarea field) and if it is validated, the email address shows up in all my three input types (name, email & textarea) and I get an email with just the mail address inside :)
My Form looks like this:
<txp:zem_contact to="my[at]emailaddress.de" subject="yada yada" >
<txp:zem_contact_text label="" default="Name" />
<txp:zem_contact_email label="" default="Email" />
<txp:zem_contact_textarea label="" default="Put your text here" />
<txp:zem_contact_submit label="send"><img src="../images/29.gif" width="70px" height="19px" alt="send">
</txp:zem_contact_submit>
</txp:zem_contact>
Offline
#283 2007-08-04 22:24:58
Re: zem_contact_reborn 4.0.3.19 (old version)
Either the name or the label attribute must be set to something unique (and non-empty) for each of the form fields.
Last edited by ruud (2007-08-04 22:25:24)
Offline
#284 2007-08-04 22:29:39
- rayben
- Member

- From: Cologne, Germany
- Registered: 2004-10-20
- Posts: 31
Re: zem_contact_reborn 4.0.3.19 (old version)
ruud wrote:
Either the
nameor thelabelattribute must be set to something unique (and non-empty) for each of the form fields.
Thanks a lot. That saved my Day :)
Offline
#285 2007-08-08 14:55:05
- rayben
- Member

- From: Cologne, Germany
- Registered: 2004-10-20
- Posts: 31
Re: zem_contact_reborn 4.0.3.19 (old version)
Can you also tell me if I am able to change the email output, so the “name” appears in the email instead of the “label” ?
I mean, only if it is a simple hack…
Offline