Advertisement:

Author Topic: Advanced Contact Form  (Read 77279 times)

Offline Deprecated

  • SMF Hero
  • ******
  • Posts: 3,499
Advanced Contact Form
« on: September 26, 2008, 06:15:53 PM »
Link to Mod

Obsolete
« Last Edit: November 24, 2008, 11:44:58 AM by Deprecated »

Offline Deprecated

  • SMF Hero
  • ******
  • Posts: 3,499
Re: Advanced Contact Form
« Reply #1 on: September 27, 2008, 11:14:38 AM »
Please be advised that this mod package has been updated as follows:

Version 1.01 (Sept. 27, 2008) added English UTF-8 language strings.

Offline Nibogo

  • SMF Hero
  • ******
  • Posts: 6,672
  • Gender: Male
    • smfpacks on Facebook
    • @smfpacks on Twitter
    • SMFPacks
Re: Advanced Contact Form
« Reply #2 on: September 27, 2008, 12:43:43 PM »
Nice Mod
But i was creating a Contact Form with Ajax but maybe you can add ajax to this mod , that can be great ^^

Offline Deprecated

  • SMF Hero
  • ******
  • Posts: 3,499
Re: Advanced Contact Form
« Reply #3 on: September 27, 2008, 01:21:50 PM »
I had originally intended to make my contact form AJAX but I decided to evolve my project as far as I could before adding in the AJAX technology. When I had the contact form working as good as it could, when I had added what I figured would be enough options to please everybody's preferences, only then did I look at what it would take to add AJAX.

When I saw how well my contact form works without AJAX, when I considered how much additional work it would be to add AJAX, and when I considered that probably contact forms aren't used that often anyway, so any bandwidth savings would probably result in only slightly improved speeds and any bandwidth costs would be improved by the AJAX only by a negligible amount.

The only reason I could think of to add AJAX would be to make this the Ultimate Contact Form rather than the Advanced Contact Form. In fact I expect to get smart on AJAX pretty soon, and one of the first things I'll do is probably come back and add AJAX to this contact form. And I'll rename it the Ultimate Contact Form for SMF 2.0. :)

So make that definite "maybe" that I'll be adding AJAX sometime soon! :) Probably after I get some more AJAX smarts than I have at present. :)


Offline Michael Kopka

  • Semi-Newbie
  • *
  • Posts: 22
  • Gender: Male
  • Intelligenz liegt in der Familie
    • The World. Of Michi!
Re: Advanced Contact Form
« Reply #5 on: October 03, 2008, 12:21:37 PM »
i integrated the mod in my board but for testing it always says the email adress is invalid. i tried with some different ones. whats wrong with it.

here my board: www.autotrac.org [nofollow]
My SMF: AutoTrac.org [nofollow]

Offline Deprecated

  • SMF Hero
  • ******
  • Posts: 3,499
Re: Advanced Contact Form
« Reply #6 on: October 03, 2008, 01:43:22 PM »
Are you running under Windows? Please describe your configuration.

Offline Michael Kopka

  • Semi-Newbie
  • *
  • Posts: 22
  • Gender: Male
  • Intelligenz liegt in der Familie
    • The World. Of Michi!
Re: Advanced Contact Form
« Reply #7 on: October 03, 2008, 07:19:52 PM »
running under linux ---> http://www.hosteurope.de [nofollow] webpack
My SMF: AutoTrac.org [nofollow]

Offline Deprecated

  • SMF Hero
  • ******
  • Posts: 3,499
Re: Advanced Contact Form
« Reply #8 on: October 03, 2008, 07:40:24 PM »
The last part of the validity check tests for a valid A or MX record for the domain part of the sender's email address. Obviously your setup is failing at that point. I presume that is something to do with your web hosting setup that checkdnserr() is not working correctly.

The best thing you could do is to just take out the A/MX record check, and your email addresses will still be tested to see if they are legally constructed, just no test to see if it's a real domain.

In Contact.php find and delete this code:
Code: [Select]
if (function_exists('checkdnsrr'))
if (!(checkdnsrr($domain, 'MX') || checkdnsrr($domain, 'A'))) return false; // domain does not have a valid A or MX record
else
if (!(win_checkdnsrr($domain, 'MX') || win_checkdnsrr($domain, 'A'))) return false; // domain does not have a valid A or MX record

That should get you in operation.

Offline Michael Kopka

  • Semi-Newbie
  • *
  • Posts: 22
  • Gender: Male
  • Intelligenz liegt in der Familie
    • The World. Of Michi!
Re: Advanced Contact Form
« Reply #9 on: October 04, 2008, 06:03:25 AM »
Now it works. Just a little delay in sending but it's okay ... Thanks a lot.
My SMF: AutoTrac.org [nofollow]

Offline Deprecated

  • SMF Hero
  • ******
  • Posts: 3,499
Re: Advanced Contact Form
« Reply #10 on: October 04, 2008, 09:41:27 AM »
There is something a little different about your hosting service's implementation of checkdnserr(). It worked great for me and apparently for most other people, but slow for you? If I receive more reports that the checkdnserr() isn't working I can put in an option override. Most of my function that uses checkdnserr() is checking to see that there is a properly formed email address. Only that last step with checkdnserr() actually checks to see if the domain is a real valid domain. It's not absolutely essential so if it's a bother we can just turn it off and the checking will be almost as good.

Offline edi67

  • SMF Hero
  • ******
  • Posts: 1,532
  • Gender: Male
  • Italian Supporter
    • CrazyZone
Re: Advanced Contact Form
« Reply #11 on: October 04, 2008, 10:45:17 AM »
I have this error
Code: [Select]
Parse error: syntax error, unexpected ')', expecting '(' in /membri/ediboard/Sources/Contact.php on line 158
Line 158 is:
      foreach (new RegexIterator($it, '~^' . $host . '~', RegexIterator::GET_MATCH) as $result)

i have smf 2.0 beta 3.1
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Offline Deprecated

  • SMF Hero
  • ******
  • Posts: 3,499
Re: Advanced Contact Form
« Reply #12 on: October 04, 2008, 12:49:19 PM »
I suspect that you are running PHP 4.x on your server. I was only able to reproduce your problem by downgrading my PHP 5.2.6 to PHP 4.

I've gone ahead and rewritten that routine for both PHP 4 and 5, and posted Advanced Contact Form version 1.02 at the mod site.

I've also added a new option, "Skip sender email address domain record check." Default is that domain must have valid A or MX record. The option skips this test.

Note also that the default configuration is that the sender's email address is used as the "from" email address in the contact form email. If the sender's email address is not valid this can cause the message to error unable to send. If that happens you should set "Don't use contact form email address as sender email address" and then your contact forms will always come from your website email address.

Please let me know if this fixes your problem.

Offline edi67

  • SMF Hero
  • ******
  • Posts: 1,532
  • Gender: Male
  • Italian Supporter
    • CrazyZone
Re: Advanced Contact Form
« Reply #13 on: October 04, 2008, 01:49:40 PM »
I suspect that you are running PHP 4.x on your server. I was only able to reproduce your problem by downgrading my PHP 5.2.6 to PHP 4.

I've gone ahead and rewritten that routine for both PHP 4 and 5, and posted Advanced Contact Form version 1.02 at the mod site.

I've also added a new option, "Skip sender email address domain record check." Default is that domain must have valid A or MX record. The option skips this test.

Note also that the default configuration is that the sender's email address is used as the "from" email address in the contact form email. If the sender's email address is not valid this can cause the message to error unable to send. If that happens you should set "Don't use contact form email address as sender email address" and then your contact forms will always come from your website email address.

Please let me know if this fixes your problem.

Work perfect now with these 3 option enabled:
    Require email address:
   Don't use contact form email address as sender email address:
   Skip sender email address domain record check:


thx bro
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Offline Burke ♞ Knight

  • SMF Hero
  • ******
  • Posts: 3,534
Re: Advanced Contact Form
« Reply #14 on: November 02, 2008, 03:43:20 PM »
In the configuration settings, you have the text at the right to be font color #444444

However, that makes it hard to see in dark themes.
May I make a suggestion, that in the next update, to have the text just use the default color?

Offline Deprecated

  • SMF Hero
  • ******
  • Posts: 3,499
Re: Advanced Contact Form
« Reply #15 on: November 06, 2008, 08:59:44 AM »
That *is* the default color for the rest of the text on that page, at least in the default theme. My text was not in a HTML container that had CSS applied, so the text was getting browser default #000000 black which looked ugly compared to the other text on the page, so I tracked down what color was applied and found the #444444, and that's what I used. It's the only thing that would look right in the default theme.

Offline Reverend Jeremiah

  • Semi-Newbie
  • *
  • Posts: 41
  • Gender: Male
    • Jesus Christ Arcade
Re: Advanced Contact Form
« Reply #16 on: November 25, 2008, 08:41:17 AM »
Oh darn, I would love to put this mod on my site but it is only compatable with other versions. I have 1.1.7 and I dont want to go 2.0 Beta yet because of the amount of mods I have installed would be a nightmare for me to upgrade to it.

Offline L'AltroWeb

  • Jr. Member
  • **
  • Posts: 344
  • Gender: Male
  • L'AltroWeb
    • laltroweb on Facebook
    • @laltroweb on Twitter
    • L'AltroWeb
Re: Advanced Contact Form
« Reply #17 on: November 26, 2008, 07:00:26 PM »
Hi!
I have installed your mod, all works perfectly except one warning in validation (w3c)
Contact Form Validation! :)
How i can fix?
Edit:
I've changed this line (Contact.template.php)
Code: [Select]
echo 'type="text" size="24" name="name" id="name2"';to this
Code: [Select]
echo 'type="text" size="24" name="name" id="name"';And now validation is ok!
In your opinion is a right fix???

Offline vulcan59

  • Jr. Member
  • **
  • Posts: 175
  • Gender: Male
Re: Advanced Contact Form
« Reply #18 on: November 30, 2008, 10:53:41 PM »
I am aware that Deprecated  will not be here at SMF anymore but I would still like to register my appreciation for this mod as well as for his numerous contributions to so many here. I downloaded and install this mod with no problems. Thank you.

Best wishes in your future endeavours.

Regards.

Offline vulcan59

  • Jr. Member
  • **
  • Posts: 175
  • Gender: Male
Re: Advanced Contact Form
« Reply #19 on: December 06, 2008, 11:18:18 PM »
Hi Michael211,

Just in case you are not aware, Deprecated has left SMF.

You can read about it in this topic Goodbye

I hope someone helps you out. You might have to do a manual uninstall. I had the same problem previously and I had to go through each file and delete the non applicable code. I came to realise that quite often the install or an uninstall does not completely do the job properly. Manual editing is very often required.

Cheers.