Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#373 2008-07-22 22:24:37

nabrown78
Member
From: Northampton, MA, USA
Registered: 2006-10-04
Posts: 294
Website

Re: zem_contact_reborn 4.0.3.20

I have implemented this plugin just fine on several hosts. I have a new site on fasthosts.co.uk, and in the diagnostics I see:

The following PHP functions (which may be necessary to run Textpattern) are disabled on your server: pass_thru, pcntl_exec, proc_close, proc_get_status, proc_nice, proc_terminate, pclose, pfsockopen, posix_kill, posix_mkfifo

The form seems to work fine (www.saatchishul.org/contact), but it never sends an email!

I realize there’s not much to go on, but any ideas what might be the issue? I don’t see any of those functions in the plugin code…maybe some other server issue getting in the way?

Thanks

UPDATE: I found this sample script on the fasthosts site:

Provided that you set the sendmail variable, before attempting to send the email. Specify the from address as a fifth parameter in the sendmail function, and the email is either to, or from, a Fasthosts hosted email address you should have no problems.

<?php
ini_set(‘sendmail_from’, $email_from);
$email_to = “bob@bobsdomain.co.uk”;
$name =$_POST[‘name’];
$email_from =$_POST[‘email’];
$email_subject = “Feedback from website”;
$comments = $_POST[‘message’];
$headers =
“From: $email_from .\n”;
“Reply-To: $email_from .\n”;

Now lets build the message of the email with the users name and comments.

$message= “Name: “. $name . “\nComments: “ . $comments;

Finally, let’s send the email. If the email is sent we will go to a thank you page, if there is an error we will display a brief message.

$sent = mail($email_to, $email_subject, $message, $headers, ‘-f’ .$email_from);
if ($sent)
{
header( “Location: http://www.bobsdomain.co.uk/thankyou.html” );
} else {
echo ‘There has been an error sending your comments. Please try later.’;
}
?>

example sendmailscript form

This script does not have any validation or error checking, so it is not recommended that you copy it directly to your website, however, it does show the basics of sending email from our webservers, and can be used as a framework for your own scripts.

Using third party scripts to send email
Third party scripts using sendmail will also work on Fasthosts servers, although some will need slight changes made in order to work correctly.

If you are using a third party script to send email remember to set the sendmail_from variable (using ini_set(‘sendmail_from’,email_from)), add the fifth -f parameter, and send the email either to, or from, a Fasthosts hosted email address.

This all seems helpful, but I’m wary of editing the plugin code — any guidance much appreciated!

LAST UPDATE I promise:

I edited this line:

if (mail($to, $subject, $msg, $headers))

to read:

if (mail($to, $subject, $msg, $headers, '-fme@mydomain.org'))

except with a real email address. I don’t really get why this worked, but it seems to have, so mabe it will help someone else.

Cheers!

Last edited by nabrown78 (2008-07-22 22:58:19)

Offline

#374 2008-08-07 15:02:22

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: zem_contact_reborn 4.0.3.20

I am coding a site at the moment where the customer would like to place some text into the email field which means I need to set “value”, however it seems I can’t do this as there is no “value” attribute even though value=”“ shows up in the source. Anyway that this can be done?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#375 2008-08-07 16:51:21

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact_reborn 4.0.3.20

There is a ‘default’ attribute, although perhaps that behaves a bit different from what you’re asking.

Offline

#376 2008-08-07 17:04:33

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: zem_contact_reborn 4.0.3.20

No that doesn’t do it Ruud. If I’m correct, “default” is for setting an email address in case the visitor doesn’t enter anything. I’m not sure why you might want to do that What I require is to place some text into the field such as “we require your email address” which disappears when the visitor clicks the box, something like you can do for the “search” field in a search form, or even like you can do for the “submit” input in ZCR. For this I need to be able to set “value” which you can do for the “submit” input because it picks up the “label” attribute (if my memory is correct).


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#377 2008-08-07 20:43:29

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 305
Website GitHub Twitter

Re: zem_contact_reborn 4.0.3.20

Hello,

I have only a small comprehension/understanding problem by using zem_contact_reborn 4.0.3.20 with textpattern 4.0.6.

I call zem_contact_reborn for sending articles by email over a section named “artikel_senden”. And this section is only calling a form

<txp:output_form form="artikel_senden" />

The form “artikel_senden” looks like this.

<txp:zem_contact to="you@example.com" send_article="1" label="Artikel versenden" thanks="Der Artikel wurde an die von Ihnen angegebene E-Mailadresse gesendet." >
<p> <txp:zem_contact_text label="Ihr Name:" /></p>
<p> <txp:zem_contact_email label="Ihre E-Mailadresse:"/></p>
<p> <txp:zem_contact_email label="E-Mail des Empfängers:" send_article="1" /></p>
<p> <txp:zem_contact_textarea label="Ihre Mitteilung:" /></p>
<p> <txp:zem_contact_submit label="Senden" /></p>
</txp:zem_contact>

In my default-articleform I have also a call in this way.

<a href="http://www.ukraine-nachrichten.de/index.php?s=artikel_senden&amp;id=<txp:article_id />&amp;zem_contact_send_article=yes"><img src="/images/email.png" alt="E-Mail" title="E-Mail" /></a>&nbsp;Artikel mailen

First, it’s working fine. The user can send the article and get’s it.

What is disturbing me is, that when the “article_senden” form shows up, there is also under the “send” button the entire content of what the default article_form should bring up (article_body, comments and so on). I only want this send_article form, but I don’t understand where the error lies.

Thanks

Offline

#378 2008-08-12 17:08:12

danieljacoby
New Member
Registered: 2008-08-12
Posts: 3

Re: zem_contact_reborn 4.0.3.20

I can’t get to install zem_contact_reborn. I get a blank page even when using the SecFilterScanPOST Off in the .htaccess file. I’m using Textpattern 4.0.6. Any hints?

Offline

#379 2008-08-12 17:16:24

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: zem_contact_reborn 4.0.3.20

Do you mean during installation? Have you tried using the gzipped version?

Last edited by thebombsite (2008-08-12 17:18:00)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#380 2008-08-12 17:47:20

danieljacoby
New Member
Registered: 2008-08-12
Posts: 3

Re: zem_contact_reborn 4.0.3.20

Thank you, thebombsite, I just tried the gzipped version and it worked fine. :)

Offline

#381 2008-08-16 15:42:59

catnip
Member
From: Sydney Australia
Registered: 2006-07-29
Posts: 58
Website

Re: zem_contact_reborn 4.0.3.20

Hello, spent some time reading through the whole thread but couldn’t find any solution to what I’m trying to achieve.
I was wondering whether it’s possible with ZCR to;
1. provide focus to the first form field after the page loads?
2. make the form disregard the default text in a textarea which is set as required=“1” when validating? Something like: display error if field is empty or is equal to ‘default’.
3. implement something like this: <textarea name="message" rows="6" cols="40" required="1" onfocus="this.value=''; return false;">type your message...</textarea>

Hope you can help.
Thanks ~ j

Offline

#382 2008-08-16 17:58:46

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact_reborn 4.0.3.20

  1. probably requires a bit of Javascript
  2. requires hacking plugin code.
  3. allowing extra attributes such as onfocus is something I plan on doing after the TXP 4.0.7 release

Offline

#383 2008-08-16 23:52:11

catnip
Member
From: Sydney Australia
Registered: 2006-07-29
Posts: 58
Website

Re: zem_contact_reborn 4.0.3.20

Thanks Ruud for the very quick response!
I am not a coder/developer and the code I quoted was from another forum.
Any chance you can provide further instructions for #1 and #2?

Thanks.

Offline

#384 2008-08-17 15:27:47

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

Re: zem_contact_reborn 4.0.3.20

For #1: have a look at the DOM of any Google search form (extract here) or, if you prefer jQuery, see Bloke’s reply below.


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

Offline

Board footer

Powered by FluxBB