Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#877 2010-09-19 20:39:33

immarabi
Member
Registered: 2008-04-29
Posts: 57

Re: zem_contact_reborn 4.0.3.20

Thanks. You have been enormously helpful. Just to make sure I understood you correctly, let me post it one more time. If I remove $mail->Subject = $subject; then I get no subject in the email. I am not sure what you mean about having the subject encoded twice and how I can avoid that. I forgot to mention that I also changed this: if (!is_callable('mail')) to if (!is_callable('utf8_encode')), I hope that helps with the Content-type. Here is what I have now:

$mail             = new PHPMailer();
        $mail->IsSMTP(); // telling the class to use SMTP
        $mail->Host       = "xxx"; // Webfaction SMTP Server
        $mail->SMTPAuth = true;     // turn on SMTP authentication
        $mail->Username = "xxx";  // Your Webfaction mailbox user
        $mail->Password = "xxx"; // Mailbox password
        $mail->From       = $zem_contact_from;
        $mail->FromName   = $zem_contact_from;
        $mail->Subject    = $subject;
        $mail->MsgHTML($msg);
        $mail->AddAddress($to);
        if(!$mail->Send()) {
        echo "<!-- Nasty error : " . $mail->ErrorInfo ." -->\n"; // Debug
            $out .= graf(zem_contact_gTxt('mail_sorry'));
        } else {
        echo "<!-- Email Sent -->\n";

            $_POST = array();

            return '<div class="zemThanks" id="zcr'.$zem_contact_form_id.'">' .
                    ($thanks_form ? fetch_form($thanks_form) : $thanks) .
                    '</div>';
        }

Offline

#878 2010-09-19 21:04:03

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

If you’re using something else than mail(), you can probably change !is_callable('mail') into false so that code block is never executed.

Comment out (or remove) this line to avoid encoding of the subject line by ZCR:

$subject = zem_contact_mailheader($subject, 'text');

And you can probably add a line like this to the other mail-> lines to set the charset:

$mail->CharSet = 'UTF-8';

PS. and remove the two ‘echo’ lines.

Offline

#879 2010-09-19 21:33:56

immarabi
Member
Registered: 2008-04-29
Posts: 57

Re: zem_contact_reborn 4.0.3.20

One last question, thank you so much for your time. How do you change !is_callable(‘mail’) into false?

Offline

#880 2010-09-19 21:37:02

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

Simply replace that part of the plugin code. Literally replace !is_callable('mail') with false (or FALSE or 0).

Last edited by ruud (2010-09-19 21:37:29)

Offline

#881 2010-10-05 14:01:54

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 535

Re: zem_contact_reborn 4.0.3.20

I’m trying to use zem_contact_reborn to produce a simple contact form using:

<txp:zem_contact to=“my@email-address.com” />

Whenever I try to use it though I keep getting the following error message:

Fatal error: Call to undefined function zem_contact_gTxt() in E:\Inet\ross\textpattern\lib\txplib_misc.php(594) : eval()'d code on line 13

Offline

#882 2010-10-05 14:15:37

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

Re: zem_contact_reborn 4.0.3.20

Did you install zem_contact_lang as well?

Offline

#883 2010-10-05 14:27:49

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 535

Re: zem_contact_reborn 4.0.3.20

slaps forehead No, I completely missed the big red text in the help file which said:

This plugin requires a separate language plugin called zem_contact_lang to be installed and activated to work properly.

Thank you for pointing that out.

Offline

#884 2010-10-07 01:03:45

Rimfya
Member
Registered: 2007-11-22
Posts: 31

Re: zem_contact_reborn 4.0.3.20

Hello.

Awesome plugin. For the first time ever though I’m trying to use ‘send article’. Is there a way to NOT require the user to click a link to show the form? As in, the form is visible when the page loads?

Cheers!

Offline

#885 2010-10-07 09:31:41

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

Rimfya, put this just above your form and it’ll be visible on page load:

<txp:php>$_GET['zem_contact_send_article']='yes';</txp:php>

Offline

#886 2010-10-07 23:02:11

Rimfya
Member
Registered: 2007-11-22
Posts: 31

Re: zem_contact_reborn 4.0.3.20

Awesome ruud. It still showed up the text link but I just put that in a hidden span.

Offline

#887 2010-10-08 17:23:32

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

Rimfya, you can simply remove the zem_contact_send_article tag. All it does is output the link.

Offline

#888 2010-10-12 15:35:34

decoderltd
Member
From: London
Registered: 2006-06-20
Posts: 248
Website

Re: zem_contact_reborn 4.0.3.20

Hi,

I’ve adding a very straightforward ZCR form in the Contact Us section of a simple website but despite adding the relevant CSS I can’t get the error messages to style:

input.zemRequirederrorElement, textarea.zemRequirederrorElement 
        {
	background:none repeat scroll 0 0 #4EAECC;
        color:#CC3333;
        }
ul.zemError {
        background:none repeat scroll 0 0 #4EAECC;
        border-color:#CCCCCC;
        border-style:dotted;
        border-width:1px 1px 0;
        font-style:italic;
        list-style:square inside none;
        margin:-15px 0 30px;
        }
.zemError li {
        border-bottom:1px dotted #CCCCCC;
        padding:3px 5px;
        }

Please ignore the current state of the site (I’m still working through it) but has anyone any ideas on where I’m going wrong?

Offline

Board footer

Powered by FluxBB