Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#49 2006-12-30 01:32:27

Zarabadoo
Member
From: Denver, CO
Registered: 2004-03-14
Posts: 28
Website

Re: Plugin: zem_contact_reborn 4.0.3.18 (old version)

It is working splendidly now. thank you very much.


—Al “Zarabadoo” Steffen
http://www.zarabadoo.com

Offline

#50 2007-01-02 00:34:24

snkhan
Member
From: Leicester, UK.
Registered: 2004-07-20
Posts: 57
Website

Re: Plugin: zem_contact_reborn 4.0.3.18 (old version)

When using the following tag:

<txp:zem_contact_checkbox label="This is not Spam" break="" />

Why does the plugin output the checkbox before the label?:

<input type="checkbox" id="thisisnotspam" class="zemRequirederrorElement" name="thisisnotspam" /><label for="thisisnotspam" class="zemRequirederrorElement thisisnotspam">This is not Spam</label>

It should be rendering like this:

<label for="thisisnotspam" class="zemRequirederrorElement thisisnotspam">This is not Spam</label><input type="checkbox" id="thisisnotspam" class="zemRequirederrorElement" name="thisisnotspam" />

Offline

#51 2007-01-02 00:41:25

Zarabadoo
Member
From: Denver, CO
Registered: 2004-03-14
Posts: 28
Website

Re: Plugin: zem_contact_reborn 4.0.3.18 (old version)

I believe it comes down to the fact that, traditionally, the checkbox comes before the label. Same with radio buttons. You are basically looking at a list and selecting the options you want. So in that respect, it is correct. That would require an edit to the plugin code for it to do what you want. Otherwise it would have to get an implementation of a labelfirst="0|1" attribute in some future version.

I looked at the code, and it looks like you would have to replace this (it is about 23 presses of the page down button in the edit box):

return '<input type="checkbox" id="'.$name.'" class="'.$zemRequired.$isError.'" name="'.$name.'"'. ($value ? ' checked="checked"' : '').' />'.$break. '<label for="'.$name.'" class="'.$zemRequired.$isError.' '.$name.'">'.$label.'</label>';

with this:

return '<label for="'.$name.'" class="'.$zemRequired.$isError.' '.$name.'">'.$label.'</label>'.$break. '<input type="checkbox" id="'.$name.'" class="'.$zemRequired.$isError.'" name="'.$name.'"'. ($value ? ' checked="checked"' : '').' />';

I haven’t tested it, but it is a pretty simple edit since it is only a return statement. Also, it only allows for a static fix, so you cannot go back unless you edit the code back to the original.

Last edited by Zarabadoo (2007-01-02 01:02:04)


—Al “Zarabadoo” Steffen
http://www.zarabadoo.com

Offline

#52 2007-01-02 01:06:01

snkhan
Member
From: Leicester, UK.
Registered: 2004-07-20
Posts: 57
Website

Re: Plugin: zem_contact_reborn 4.0.3.18 (old version)

That worked beautifully – thanks!

Offline

#53 2007-01-02 02:20:27

tommoulaert
New Member
From: Antwerp, Belgium
Registered: 2007-01-02
Posts: 4
Website

Re: Plugin: zem_contact_reborn 4.0.3.18 (old version)

ruud wrote:

Edit the plugin, change this line:

if (is_callable('checkdnsrr') and !checkdnsrr($domain,'MX') and !checkdnsrr($domain,'A'))

into:

if (is_callable('checkdnsrr') and checkdnsrr('textpattern.com.','A') and !checkdnsrr($domain.'.','MX') and !checkdnsrr($domain.'.','A'))

This change checks if it can resolve textpattern.com. If it can’t then DNS is probably not working properly and the MX check is skipped. I’ll add this to the next ZCR release.

I have the same problem with normal belgian email-acounts (telenet.be, belgacom.be, scarlet.be, … as well as with my hotmail-account.

I did the php-test for scarlet and telenet and got folowing results :

for telenet :
OS: Linux
gethostbyname: 195.130.131.38
getmxrr: ok
checkdnsrr: ok
checkdnsrr(MX): ok
checkdnsrr(A): ok

for scarlet:
OS: Linux
gethostbyname: scarlet.be
getmxrr: ok
checkdnsrr: ok
checkdnsrr(MX): ok
checkdnsrr(A): fail

I did already change the line but it doesn’t seem to work. I’m able though to send an email from my other website (info@tm-graphix.be)

Offline

#54 2007-01-02 07:10:47

pmichaels
New Member
Registered: 2007-01-02
Posts: 1

Re: Plugin: zem_contact_reborn 4.0.3.18 (old version)

Hi,

I am experiencing problems with the form as described in post #36. The script seems to work as it displays the “Thank You” message at the end but I never receive any of the email. I’ve tested receiving email on Gmail and Yahoo mail. I made the change suggested, to check if textpattern.com could be resolved and I also ran dnstest.php – everything is ok. Do you have any advice for me, or has anyone though of a solution?
Thank you!

Offline

#55 2007-01-02 10:45:29

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Plugin: zem_contact_reborn 4.0.3.18 (old version)

Miniscule error – semicolon inserted after cols attribute for textarea.

line 433

		'<textarea id="'.$name.'" class="'.$zemRequired.$isError.'" name="'.$name.'" cols="'.$cols.'"; rows="'.$rows.'">'.htmlspecialchars($value).'</textarea>';

to

		'<textarea id="'.$name.'" class="'.$zemRequired.$isError.'" name="'.$name.'" cols="'.$cols.'" rows="'.$rows.'">'.htmlspecialchars($value).'</textarea>';
  • Could a div with a class be added to the thank you message output?
  • Is there anyway to add an anchor to the URL on email submit, like with Textpattern’s comment? I think it’d be useful for long pages with the contact form on the bottom.

Thanks!

Offline

#56 2007-01-02 12:43:31

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

Re: Plugin: zem_contact_reborn 4.0.3.18 (old version)

tommoulaert, the two tests you post look fine. The contact form for which you experience problems, is that located on http://www.tommoulaert.be/contact or somewhere else… because I don’t get errors when using hotmail.com or scarlet.be email addresses on that website. The change you made in the code only applies to the “is geen geldige email-host.” error (in english: “is not a valid email host”)

pmichaels, try setting the from attribute in the zem_contact tag to an email address that belongs to your website. For example, if you have a website pmichaels.com, try setting from=“postmaster@pmichaels.com”
If you see the thanks message, but no email arrives, then it can be either spamfiltering or something else in the mail server that prevents the mail from being delivered. Your webhost can look in the mail log files to see what happens exactly. The problem is outside of zem_contact_reborn.

jm, I can’t find that semi-colon in the 4.0.3.18 version… which version are you using?
  • Would a <div id=“zemThanks”> thanks message </div> be okay?
  • It’s probably possible to add an anchor automatically to get to the right place on the page when pressing submit…. but where should the anchor point? To the place where errors are displayed or to the place where the thanks message is shown?

Last edited by ruud (2007-01-02 18:15:14)

Offline

#57 2007-01-02 12:48:55

tommoulaert
New Member
From: Antwerp, Belgium
Registered: 2007-01-02
Posts: 4
Website

Re: Plugin: zem_contact_reborn 4.0.3.18 (old version)

Ruud I just recently made a change to the php-code (to remove the mx and a test)

else { preg_match(“/@(.+)$/”, $email, $match); $domain = $match1;

//removed the dns-check #if (is_callable(‘checkdnsrr’) and checkdnsrr(‘textpattern.com.’,‘A’) and !checkdnsrr($domain.’.’,‘MX’) and !checkdnsrr($domain.’.’,‘A’)) if( false ) { $zem_contact_error[] = zem_contact_gTxt(‘invalid_host’, htmlspecialchars($domain)); $isError = “errorElement”; }

else { $zem_contact_from = $email; } } }

And by the way, don’t let you be tricked by the fact that the thank you comes first on the page. It is still in developing)-fase

I just tried and got an error again “mail could not be sent”

Last edited by tommoulaert (2007-01-02 13:04:53)

Offline

#58 2007-01-02 14:23:09

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

Re: Plugin: zem_contact_reborn 4.0.3.18 (old version)

tommoulaert, The “mail could not be sent” or rather “Sorry, unable to send email” (mail_sorry) is not related to the code you’re commenting out in the plugin. It’s an error you get when there is no mail function available in PHP or if the mail function returns an error. Look at the diagnostics tab of TXP and check if shows a list of PHP functions that are disabled.

On which URL are you testing your contact form?

Last edited by ruud (2007-01-02 14:24:38)

Offline

#59 2007-01-02 14:37:37

tommoulaert
New Member
From: Antwerp, Belgium
Registered: 2007-01-02
Posts: 4
Website

Re: Plugin: zem_contact_reborn 4.0.3.18 (old version)

I’m testing it on http://www.tommoulaert.be/contact/contact

the diagnose works really fine

Pre-flight controle
Alle testen goed doorstaan!
Diagnostische info:

It works really fine if submit it using the email-adres of my other domain (tm-graphix.be) but that is hosted with the same company

Offline

#60 2007-01-02 17:05:29

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

Re: Plugin: zem_contact_reborn 4.0.3.18 (old version)

tommoulaert, it looks like the mailserver of your webhost requires the email address in the “From:” mail header to be one that is hosted on that same server. Try setting the from attribute of the zem_contact tag to an email address within your own domain name. If your website were hosted on www.example.com, you’d do:

<txp:zem_contact from="you@example.com" to="you@example.com" />

Last edited by ruud (2007-01-02 17:06:34)

Offline

Board footer

Powered by FluxBB