Page 3 of 12 FirstFirst 12345 ... LastLast
Results 21 to 30 of 113
  1. #21
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    122
    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?
    Today I am trying something different. Read the install.txt Read the FAQ Read the forum for answers; Then Install the mod. ;-)
    AML Candles

  2. #22
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    122
    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'));
    }
    Today I am trying something different. Read the install.txt Read the FAQ Read the forum for answers; Then Install the mod. ;-)
    AML Candles

  3. #23
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    122
    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
    Today I am trying something different. Read the install.txt Read the FAQ Read the forum for answers; Then Install the mod. ;-)
    AML Candles

  4. #24
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    122
    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
    Today I am trying something different. Read the install.txt Read the FAQ Read the forum for answers; Then Install the mod. ;-)
    AML Candles

  5. #25
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    122
    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.
    Today I am trying something different. Read the install.txt Read the FAQ Read the forum for answers; Then Install the mod. ;-)
    AML Candles

  6. #26
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    122
    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
    Today I am trying something different. Read the install.txt Read the FAQ Read the forum for answers; Then Install the mod. ;-)
    AML Candles

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

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

    Hope i'm not being too anoying
    Today I am trying something different. Read the install.txt Read the FAQ Read the forum for answers; Then Install the mod. ;-)
    AML Candles

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

    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
    122
    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.
    Today I am trying something different. Read the install.txt Read the FAQ Read the forum for answers; Then Install the mod. ;-)
    AML Candles

  10. #30
    Join Date
    Oct 2007
    Location
    MA, USA
    Posts
    319
    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.
    Thank you, Sincerely, MagicMan

 

 
Page 3 of 12 FirstFirst 12345 ... LastLast

Similar Threads

  1. Simple Gallery Solution
    By lucky__starre in forum General Questions
    Replies: 33
    Last Post: 29 Apr 2010, 02:43 AM
  2. Probably really simple solution but I am confused.
    By Cyopz in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 10 Feb 2009, 03:47 AM
  3. A Simple Page Title Solution?
    By plasticmind in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 27 Mar 2008, 07:48 PM
  4. Simple solution needed..is zen cart the right choice.
    By menappi in forum General Questions
    Replies: 5
    Last Post: 23 Oct 2007, 03:57 PM

Bookmarks

Posting Permissions

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