Page 3 of 14 FirstFirst 1234513 ... LastLast
Results 21 to 30 of 131
  1. #21
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    113
    Plugin Contributions
    1

    Default Re: Simple CSS/PHP AntiSpam solution for your contact form

    Oh one other thing.
    Doesn't strike me as the type of mode that is base version dependant, but thought I should check.

    I'm using v1.3.9h

    is this still good for this mode, hopefully?

  2. #22
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    113
    Plugin Contributions
    1

    Default Re: Simple CSS/PHP AntiSpam solution for your contact form

    Quote Originally Posted by dw08gm View Post
    1. Found the following hides well in templates/tpl_whatever.

    Code:
    <div style="visibility:hidden; display:none;">
    <label class="inputLabel" for="confirm_email">Confirm Email: </label>
    <input id="confirm_email" name="leaveblank" type="text"><span class="alert"><strong>&nbsp;*&nbsp;</strong></span>
    <br class="clearBoth" />
    </div>
    2. Also replaced the following in modules/pages/whatever/header_php.php

    Code:
    	if (!empty($leaveblank)) {
          exit;
        }
    with

    Code:
    	if (!empty($leaveblank)) {
        zen_redirect(zen_href_link(FILENAME_WHATEVER, 'action=success'));
        }
    as it gives the impression of the form passing.

    Cheers and thanks for the heads up.
    Hi as a noob I do need to check if Im getting it right. So I hope you don't mind me checking.

    If I was applying this to my contacts us page would the correct edit be?

    if (!empty($leaveblank)) {
    zen_redirect(zen_href_link(FILENAME_CONTACT_US, 'action=success'));
    }
    or would it be;
    if (!empty($leaveblank)) {
    zen_redirect(zen_href_link(CONTACT_US, 'action=success'));
    }

  3. #23
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    113
    Plugin Contributions
    1

    Default Re: Simple CSS/PHP AntiSpam solution for your contact form

    Quote Originally Posted by adem.i View Post
    I found the solution to the problem I had previously discussed.

    for some reason, I didn't have a subject box and in the code in this thread , the line '!empty($name) and !empty($subject) and empty($leaveblank)) {' can't be used because when a real person submits enter, zen cart will be waiting for an entry in a subject box that doesn't exist, so just modify the line by

    !empty($name) and empty($leaveblank)) {

    alone
    *******************************************
    Are you saying?
    this:
    if ($zc_validate_email and !empty($enquiry) and !empty($name) and !empty($subject) and empty($leaveblank)) {
    should look like this:
    if ($zc_validate_email and !empty($name)and empty($leaveblank)) {

    Did you get this to work?
    Not really being that knowledgeable in php I really need to check things out a lot and hope you don't mind me asking what other might see as a silly question.

    I can't get the form to send mail after I edit the php and was hoping this was the answer.
    It works when I put text in the hiden field (as if I were a bot)
    does nothing when I leave the field blank.

    Thanks Billy

  4. #24
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    113
    Plugin Contributions
    1

    Default Re: Simple CSS/PHP AntiSpam solution for your contact form

    I know, yak yak yak.

    Here's another question for the knowledgeable.
    In the line

    if ($zc_validate_email and !empty($enquiry) and !empty($name) and !empty($subject) and empty($leaveblank)) {

    there is the use of "!" before some "empty" "perameters"

    further down the same file where empty($leaveblank)
    is called in the error checking part

    if (!empty($leaveblank)) {
    exit;
    it has a "!".

    I know this is not a php tutorial site, but I am trying to understand why this does not work with about 4 weeks of self-learning in php.

    So does it matter if the "!" is used or not?
    Does it matter if "!" is used inconsistantly (if that is what it is)?
    does it not matter because it is being correctly used in the error check and should not be used in the earlier if statement?

    Please help Billy

  5. #25
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    113
    Plugin Contributions
    1

    email error Re: Simple CSS/PHP AntiSpam solution for your contact form

    OKay one more question (for just now anyway).

    After re-editing:
    /includes/modules/pages/contact_us/header_php.php

    with the suggestion from adem.i

    I think it is now functioning as intended:
    Normal situation; human contact form sends mail to store address.

    with the suggestion from dw08gm
    Bot situation; input form fakes sending mail to store address.

    Can anyone else confirm that these are two mods to the mod are correct?

    Would this be a complete list of files to aply the pair of mods to in order to cover to whole store;

    1.
    /includes/modules/pages/contact_us/header_php.php
    /includes/templates/template_default/templates/tpl_contact_us_default.php

    2.
    /includes/modules/create_account.php (would this even be needed?)
    /includes/modules/pages/create_account/header_php.php
    /includes/templates/template_default/templates/tpl_modules_create_account.php

    3.
    /includes/templates/template_default/tpl_tell_a_friend.php
    /includes/modules/pages/tell_a_friend/header_php.php

    Thanks guys I know how anoying I can be when I start on learning something new.
    This is like trying to learn to drive in a foreign country and your instructor does not speak the same language as you.
    But I'm lovin' it.

  6. #26
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    113
    Plugin Contributions
    1

    Default Re: Simple CSS/PHP AntiSpam solution for your contact form

    Okay I lied, one more;

    If the list of files I asked about in the previous post is correct, does anyone know where abouts in these file I would add the mods.

    I know I could spend hours adding things, breaking things, and getting generally frustrated

    Just thought it might be easier to ask and stay calm

  7. #27
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    113
    Plugin Contributions
    1

    Default Re: Simple CSS/PHP AntiSpam solution for your contact form

    Hope i'm not being too anoying

  8. #28
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    984
    Plugin Contributions
    6

    Default Re: Simple CSS/PHP AntiSpam solution for your contact form

    Multiple posts within 24 hours in the same thread will not win you many friends. Nevertheless:

    a) The exclamation mark before code generally means "not", ie !empty = not empty.

    b)
    Code:
    If I was applying this to my contacts us page would the correct edit be?
    
    if (!empty($leaveblank)) {
    zen_redirect(zen_href_link(FILENAME_CONTACT_US, 'action=success'));
    }
    or would it be;
    if (!empty($leaveblank)) {
    zen_redirect(zen_href_link(CONTACT_US, 'action=success'));
    }
    Use whatever your existing code says in the "zen_redirect" line.

    c)
    Would this be a complete list of files to aply the pair of mods to in order to cover to whole store;
    IIRC, yes, the header_php and the corresponding tpl_.
    But test and see.

    d)Works in 139h.

    Now go and have a good rest.

  9. #29
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    113
    Plugin Contributions
    1

    Default Re: Simple CSS/PHP AntiSpam solution for your contact form

    @dw08gm Thank you!

    I appreciate your help.
    I do realise that multiple posting is very bad form and do appologise for that. I'm only 46 and still just a kid.

    I am still working through many mods to get the store ready and will be returning to this one, Security and Anti- anything being very important.

  10. #30
    Join Date
    Oct 2007
    Location
    MA, USA
    Posts
    385
    Plugin Contributions
    0

    Default Re: Simple CSS/PHP AntiSpam solution for your contact form

    I tried using this with the Create Account Page and after customer filled out form and hit submit, it just redirected to a blank page and no customer was created.

    I have removed it to see if I could figure out what is wrong.

 

 
Page 3 of 14 FirstFirst 1234513 ... LastLast

Similar Threads

  1. v150 Contact Form PHP help
    By valsurfer101 in forum General Questions
    Replies: 1
    Last Post: 18 Sep 2012, 07:43 PM
  2. One solution for selling simple link product, but limited
    By estertester in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 23 Jun 2009, 07:32 AM
  3. Move Contact Us form above define_contact_us.php
    By swiss1939 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 19 Nov 2008, 02:39 PM
  4. Contact Us form CSS
    By tee-dot in forum General Questions
    Replies: 6
    Last Post: 29 Jul 2008, 08:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg