Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#76 2007-03-13 11:56:34

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: zem_contact_reborn 4.0.3.19 (old version)

All working now – thank you very much for your help.

Offline

#77 2007-03-13 13:53:07

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: zem_contact_reborn 4.0.3.19 (old version)

Hi Stef, sorry to bug you again, but although the field is pre filled, the field not getting sent in the email.

Offline

#78 2007-03-13 16:53:25

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,499
Website GitHub

Re: zem_contact_reborn 4.0.3.19 (old version)

lee wrote:

although the field is pre filled, the field not getting sent in the email.

Dang, you’re right. I’m sure it used to work. Sorry to give you bogus info. Perhaps this version keeps track of which attributes are supplied to the zem_contact tag and only allows those to be sent? Maybe it doesn’t “see” the pre-filled text field because it’s masked by the PHP tags? * shrug *

If that’s the case I’d expect it to ignore it completely, instead of rendering it correctly on the page and not including it in the form output. Curiouser and curiouser, said Alice.

I’ve had a look through the plugin but it’s mighty clever stuff in there; beyond my current level of PHP-ness. If I spot anything I’ll check back in, but in the meantime… can anyone else help?

Last edited by Bloke (2007-03-13 17:03:34)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#79 2007-03-13 18:27:01

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

Re: zem_contact_reborn 4.0.3.19 (old version)

This one does work:

<txp:php>
  $topic = preg_match('/^[\w -]{1,50}$/', gps('topic')) ? gps('topic') : '';
  echo parse('<txp:zem_contact_text label="Topic" default="'.$topic.'" />');
</txp:php>

If the visitor shouldn’t be able to change or see the ‘topic’, then you could also do this:

<txp:zem_contact_secret label="Topic"><txp:php>
  echo (preg_match('/^[\w -]{1,50}$/', gps('topic')) ? gps('topic') : '');
</txp:php></txp:zem_contact_secret>

(some extra code added to ensure that the topic only contains alpnanumeric characters and underscore/dash/space and is no longer than 50 chars.)

Last edited by ruud (2007-03-13 20:35:16)

Offline

#80 2007-03-13 20:33:04

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: zem_contact_reborn 4.0.3.19 (old version)

Hi Rudd, thanks for helping out. I tried your code but get:

Parse error: syntax error, unexpected ‘;’ in /users/home/……/textpattern/publish/taghandlers.php(2681) : eval()’d code on line 3

Last edited by lee (2007-03-13 20:34:33)

Offline

#81 2007-03-13 20:35:33

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

Re: zem_contact_reborn 4.0.3.19 (old version)

Oops, fixed it in the above code (the end of the ‘parse’ line was incorrect).

Last edited by ruud (2007-03-13 20:40:59)

Offline

#82 2007-03-13 20:42:09

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: zem_contact_reborn 4.0.3.19 (old version)

Many thanks for all the help guy’s, it’s much appreciated. The code is working perfectly now.

Offline

#83 2007-03-16 21:41:21

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: zem_contact_reborn 4.0.3.19 (old version)

Hi.

I have updated today to .19 and now when I use the contact form, I’m receiving e-mails twice.
I haven’t changed anything in the contact form.

I think I have found what’s going on and it seems to be a bug: when there is a copysender="yes", both e-mails (the original, and the copy to the sender) are being sent to the recipient.
I have tried removing the copysender attribute and this second test worked as expected: I have received the mail just once.

Please, can anyone confirm? Thanks.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#84 2007-03-16 22:28:15

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: zem_contact_reborn 4.0.3.19 (old version)

BTW: if you have both zem_contact_lang and zem_contact_lang_mlp (that, as I understand, right now is useless because zem_contact_reborn isn’t configured to play nice with MLP) activated, in the front-end I get this error, and all the site broken:


Fatal error: Cannot redeclare zem_contact_gtxt() (previously declared in /home/mgo/html/textpattern/lib/txplib_misc.php(512) : eval()'d code:75) in /home/mgo/html/textpattern/lib/txplib_misc.php(512) : eval()'d code on line 2

In the meanwhile, to avoid this problem, I have de-activated MLP zem_contact_reborn_MLP.

Last edited by maniqui (2007-03-16 22:29:29)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#85 2007-03-17 00:02:29

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

Re: zem_contact_reborn 4.0.3.19 (old version)

manique, have you set the from attribute to your own email address in the zem_contact_reborn tag? In that case, try changing this line:

mail($from, $subject, $msg, $headers);

into:

mail(($reply ? $reply : $from), $subject, $msg, $headers);

zem_contact_lang and zem_contact_lang_mlp can’t be active at the same time. They both serve the same purpose, so activating just one is enough. The ZCR_mlp plugin should work with the current ZCR version.

Offline

#86 2007-03-17 01:26:15

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: zem_contact_reborn 4.0.3.19 (old version)

ruud wrote:

have you set the from attribute to your own email address in the zem_contact_reborn tag?

Yes, I did.
I think I forgot to say that the sender doesn’t receive the copy. Did I say it?

Ruud, thanks for the suggestion, but I don’t like the idea of changing the plug-in code and remember the change in future updates (but if you confirm me that the change you suggested will be included in the next release I will think about applying it).

For now, I have removed the from: attribute, and added again the copysender="yes" attribute.
I don’t even know why I was using the from: attribute (i mean… I would like to know what could be the benefits of using it).

Now, I have a question that is in my mind since the first releases of this plugin:
What are the purposes of attributes from_form and to_form.

Sorry if those are too obvious but I can’t get them!

zem_contact_lang and zem_contact_lang_mlp can’t be active at the same time. They both serve the same purpose, so activating just one is enough. The ZCR_mlp plugin should work with the current ZCR version.

Ok. I think I will keep with the classic zem_contact_lang by now.
But I would like to ask: Isn’t it the idea that if ZCR is MLP-compatible, then there should be no need to install and additional plug-in (ZCR_lang_MLP, in this case)?
I need some clarification here, hehe.

Ruud, thanks again.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#87 2007-03-17 10:55:44

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

Re: zem_contact_reborn 4.0.3.19 (old version)

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.

The from attribute is used to force the use of one specific email address in the email From: header. This can be necessary if the mailserver on your webhost refuses to send mail unless you to set the From: header to domain that’s hosted on that webserver.

from_form/to_form are there so you can use a TXP form to set values for the To: and From: email headers. The plugin help contains an example of how the to_form can be used (it’s one of the advanced examples)

If ZCR supports MLP natively, then a separate plugin like ZCR_lang_MLP is no longer needed. The reason why that is on the wishlist is to avoid having to change 2 plugins each time a new translation string is added.

Last edited by ruud (2007-03-17 11:01:30)

Offline

#88 2007-03-19 21:46:42

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: zem_contact_reborn 4.0.3.19 (old version)

I have a couple of requests for the next version if these are not already possible.

It would be fantastic if I could somehow wrap the label in a tag seperately and in addition to a wraptag on the input/select/textarea.

Example:
<txp:zem_contact_text label="Your Name" labelwraptag="dt" wraptag="dd" />

would ouput something like:
<dt><label for="idname">Your Name</label></dt> <dd><input type="text" class="zemText zemRequired" id="idname" /></dd>

Also it would be nice to be able to specify an image button that aren’t inside the <button></button> tags.

Example:
<input type="image" src="../path/to/button/image.gif" value="Submit" />

Offline

#89 2007-03-19 22:27:49

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

Re: zem_contact_reborn 4.0.3.19 (old version)

You can abuse the ‘break’ attribute to do simulate the labelwraptag/wraptag, at least the part that appears between the label and the input field. And the submit button is just a submit button. If you add an image submit button in plain HTML it’ll work just as well ;)

Last edited by ruud (2007-03-19 22:36:35)

Offline

#90 2007-03-21 17:06:29

sugoo
Member
Registered: 2006-05-29
Posts: 20

Re: zem_contact_reborn 4.0.3.19 (old version)

Hi, I tried to install the new version, but I’m getting the following error:

An appropriate representation of the requested resource /textpattern/index.php could not be found on this server.

Can anyone help? Thanks.

Offline

Board footer

Powered by FluxBB