Page 5 of 19 FirstFirst ... 3456715 ... LastLast
Results 41 to 50 of 188
  1. #41
    Join Date
    Oct 2009
    Location
    Columbus, Ohio
    Posts
    38
    Plugin Contributions
    0

    Default Re: Adding reCAPTCHA to Contact Us Form

    Quote Originally Posted by spid3r1987 View Post
    never mind, followed some instructions, and it worked
    What did you miss the first time? I've tried installing this twice and still do not see it in configure. It is a pretty simple install, so I'm at a loss as to why it is not working for me. FWIW, I did notice that two files get modified, not just one (the header and tpl files).

  2. #42
    Join Date
    Aug 2005
    Posts
    154
    Plugin Contributions
    0

    Default Re: Adding reCAPTCHA to Contact Us Form

    I installed the mod and it didn't run the SQL automatically upon logging into my admin page! I don't get a reCaptcha configuration option under the "Configuration" drop-down. Now I have a custom admin folder (not called admin) and so I renamed the admin folder in the package to my name so it uploaded to the right place. It only edits one file in the admin folder anyway, admin/includes/functions/extra_functions/recaptcha_functions.php.

    How can I get this to install?

  3. #43
    Join Date
    Aug 2005
    Posts
    154
    Plugin Contributions
    0

    help question

    So I don't know why it won't "auto-install" when it says it will. I get no option for this! I'm running the latest Zen build (with the security patch).

    I see an SQL statement in the admin/includes/functions/extra_functions/recaptcha_functions.php file. Can someone tell me how to get that to work or why this just isn't auto-installing?

  4. #44
    Join Date
    Oct 2004
    Posts
    237
    Plugin Contributions
    2

    Default Re: Adding reCAPTCHA to Contact Us Form

    The sql files aren't installing for me. I did see a lot of extra lines in the files downloaded-- could linefeeds be an issue?
    Tom

  5. #45
    Join Date
    Aug 2005
    Posts
    154
    Plugin Contributions
    0

    Default Re: Adding reCAPTCHA to Contact Us Form

    The files downloaded look fine -- I think this software is broken, but it's weird because it says it's for v1.3.8? Apparently this has to be the case because the last few people posted they had the same issues. Why won't it auto-install? Is there a way to fix this... anyone? :-)

  6. #46
    Join Date
    Oct 2009
    Location
    Columbus, Ohio
    Posts
    38
    Plugin Contributions
    0

    Default Re: Adding reCAPTCHA to Contact Us Form

    I think that if I really wanted to install this I'd figure out how to run the SQL statement in the database rather than trying to get it to auto-install.

  7. #47
    Join Date
    Aug 2005
    Posts
    154
    Plugin Contributions
    0

    red flag Re: Adding reCAPTCHA to Contact Us Form

    I agree, but the SQL statement relies on variables that I don't know so I can't recreate the SQL statement to run it! I don't know why the author didn't just put it in seperate -- would have saved a lot of headaches!

    In the file admin/includes/functions/extra_functions/recaptcha_functions.php we have this function:
    Code:
    function install_recaptcha() {
    	global $db;
    	$db->Execute("INSERT INTO " . TABLE_CONFIGURATION_GROUP . " VALUES ('', 'reCAPTCHA', 'Config options for reCAPTCHA text', '1', '1')");
    	$group_id = mysql_insert_id();
    	$db->Execute("UPDATE " . TABLE_CONFIGURATION_GROUP . " SET sort_order = " . $group_id . " WHERE configuration_group_id = " . $group_id);
    	$db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " VALUES 
    		('', 'Enable Contact Form', 'CONTACT_US_RECAPTCHA_STATUS', 'true', 'Disply reCAPTCHA text on contact form (default: true)', " . $group_id . ", '9', NULL, now(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),
    		('', 'reCAPTCHA Public Key', 'CONTACT_US_RECAPTCHA_PUBLIC_KEY', '', 'Public key given from reCAPTCHA website (default: blank).', " . $group_id . ", '0', NULL, now(), NULL, NULL),
    		('', 'reCAPTCHA Private Key', 'CONTACT_US_RECAPTCHA_PRIVATE_KEY', '', 'Private key given from reCAPTCHA website (default: blank).', " . $group_id . ", '0', NULL, now(), NULL, NULL),
    		('', 'reCAPTCHA Theme', 'CONTACT_US_RECAPTCHA_THEME', 'white', 'Choose a theme option for the widget.', " . $group_id . ", '1', NULL, now(), NULL, 'zen_cfg_select_option(array(\"red\", \"white\", \"blackglass\", \"clean\"),')		
    		");
    }
    So looking at the code I assume TABLE_CONFIGURATION_GROUP is a define for the zen_configuration_group table in the database. Also I would assume that TABLE_CONFIGURATION is the zen_configuration table.
    With those assumptions, someone please tell me if this SQL looks right before I screw something up:
    Code:
    INSERT INTO 'zen_configuration_group' VALUES ('', 'reCAPTCHA', 'Config options for reCAPTCHA text', '1', '1');
    UPDATE 'zen_configuration_group' SET sort_order = '$group_id' WHERE configuration_group_id = '$group_id';
    INSERT INTO 'zen_configuration' VALUES
    ('', 'Enable Contact Form', 'CONTACT_US_RECAPTCHA_STATUS', 'true', 'Disply reCAPTCHA text on contact form (default: true)', $group_id, '9', NULL, now(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),
    ('', 'reCAPTCHA Public Key', 'CONTACT_US_RECAPTCHA_PUBLIC_KEY', '', 'Public key given from reCAPTCHA website (default: blank).', $group_id, '0', NULL, now(), NULL, NULL),
    ('', 'reCAPTCHA Private Key', 'CONTACT_US_RECAPTCHA_PRIVATE_KEY', '', 'Private key given from reCAPTCHA website (default: blank).', $group_id, '0', NULL, now(), NULL, NULL),
    ('', 'reCAPTCHA Theme', 'CONTACT_US_RECAPTCHA_THEME', 'white', 'Choose a theme option for the widget.', $group_id, '1', NULL, now(), NULL, 'zen_cfg_select_option(array(\"red\", \"white\", \"blackglass\", \"clean\"),')
    Things I must figure out in above code:

    1. The $group_id variable is just the next available sort order, which is pulled from the SQL command mysql_insert_id()... how do I represent it in the SQL code properly? It's used in several places and I need to know how to write that properly in SQL.

    2. In the last INSERT statement, we have one of the fields as the following: 'zen_cfg_select_option(array(\"red\", \"white\", \"blackglass\", \"clean\"),' -- MY QUESTION: Do I need to use the escape \ there or do I use double-single quotes to make it the right SQL syntax? Also, what about that loan ( before array, do I need to escape that so SQL doesn't think it has to do with my query string (it's just a part of what needs to be written in that field)?

    3. In the last INSERT statement, I assume the use of the SQL function now() is indeed correct, right?


    Thanks in advance for the help! Hopefully one of you SQL-gurus can let me know what to do to get this all fixed right so I can run it, and hence get this reCaptcha thng to install and work!

  8. #48
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,076
    Plugin Contributions
    15

    Default Re: Adding reCAPTCHA to Contact Us Form

    Quote Originally Posted by davemehta View Post
    Things I must figure out in above code:

    1. The $group_id variable is just the next available sort order, which is pulled from the SQL command mysql_insert_id()... how do I represent it in the SQL code properly? It's used in several places and I need to know how to write that properly in SQL.

    2. In the last INSERT statement, we have one of the fields as the following: 'zen_cfg_select_option(array(\"red\", \"white\", \"blackglass\", \"clean\"),' -- MY QUESTION: Do I need to use the escape \ there or do I use double-single quotes to make it the right SQL syntax? Also, what about that loan ( before array, do I need to escape that so SQL doesn't think it has to do with my query string (it's just a part of what needs to be written in that field)?

    3. In the last INSERT statement, I assume the use of the SQL function now() is indeed correct, right?
    Group ID is auto assigned when first created only, then is used for each configuration assigned to that group.

    ''clean'' is correct for sql.

    now() is the sql date/time setting and is correct.

    To understand the insert better, configuration database has 11 slots, each one needs something inserted into it.
    (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function)

    Some of these fields are required and others may or may not be used, but need something, thus NULL.

    In sort... sql statements are not to hard to do once you look at the table... But, one slip of a key and you can wipe out your database.... so BACK IT UP before doing anything!!!

    The following is what you was asking for, please understand, this may work for you or not! This is not part of a mod, but just answering a question. Use at your own rest!!!

    Code:
    INSERT INTO configuration_group VALUES ('', 'reCAPTCHA', 'Config options for reCAPTCHA text', '1', '1');
    UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();
    SET @t4=0;
    SELECT (@t4:=configuration_group_id) as t4 
    FROM configuration_group
    WHERE configuration_group_title= 'reCAPTCHA';
    INSERT INTO configuration VALUES 
    ('', 'Enable Contact Form', 'CONTACT_US_RECAPTCHA_STATUS', 'true', 'Disply reCAPTCHA text on contact form (default: true)', @t4, '1', now(), now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),'),
    ('', 'reCAPTCHA Public Key', 'CONTACT_US_RECAPTCHA_PUBLIC_KEY', '', 'Public key given from reCAPTCHA website (default: blank).', @t4, '2', now(), now(), NULL, NULL),
    ('', 'reCAPTCHA Private Key', 'CONTACT_US_RECAPTCHA_PRIVATE_KEY', '', 'Private key given from reCAPTCHA website (default: blank).', @t4, '3', now(), now(), NULL, NULL),
    ('', 'reCAPTCHA Theme', 'CONTACT_US_RECAPTCHA_THEME', 'white', 'Choose a theme option for the widget.', @t4, '4', now(), now(), NULL, 'zen_cfg_select_option(array(''red'', ''white'', ''blackglass'', ''clean''),');
    Seems like allot of work just to have it on your 'contact us' page. You could copy the first line, change it to do other pages as well!! Short Order is the number of entree's so one through total number of lines.
    Code:
    ('', 'Enable Ask-a-Question Form', 'ASK_A_QUESTION_RECAPTCHA_STATUS', 'true', 'Disply reCAPTCHA text on Ask-a-Question form (default: true)', @t4, '5', now(), now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),'),
    Dave
    Always forward thinking... Lost my mind!

  9. #49
    Join Date
    Aug 2005
    Posts
    154
    Plugin Contributions
    0

    Default Re: Adding reCAPTCHA to Contact Us Form

    Thanks so much Davewest!!! That SQL did the trick :-)

    Just a couple of notes for those of you wanting to use this in the future:

    1. Run the SQL code provided by Davewest above to get the reCaptcha code to show up in the admin. Note that you must add the prefix "zen_" to the table names "configuration_group" and "configuration" in order for the statement to work properly (if you have that prefix on your tables).

    2. The file "tpl_contact_us_default.php" provided in the custom templates folder is actually NOT in the right place... it writes that file to the "includes/templates/YOURTEMPLATE/" folder... when it should really go in the "includes/templates/YOURTEMPLATE/templates" folder. I just cut and paste the appropriate reCaptcha code into my customized contact_us template and was all set.

  10. #50
    Join Date
    Jul 2006
    Posts
    154
    Plugin Contributions
    0

    Default Re: Adding reCAPTCHA to Contact Us Form

    Sorry, I'm a bit confused by the code. I too tried to install this module and couldn't get it to work. In fact, I couldn't get any of the captcha modules to work. Can a easy to understand, step by step instruction be provided to install this module correctly? It would be a big help.

    Thanks always for the wonderful support on this forum.

    Quote Originally Posted by davemehta View Post
    Thanks so much Davewest!!! That SQL did the trick :-)

    Just a couple of notes for those of you wanting to use this in the future:

    1. Run the SQL code provided by Davewest above to get the reCaptcha code to show up in the admin. Note that you must add the prefix "zen_" to the table names "configuration_group" and "configuration" in order for the statement to work properly (if you have that prefix on your tables).

    2. The file "tpl_contact_us_default.php" provided in the custom templates folder is actually NOT in the right place... it writes that file to the "includes/templates/YOURTEMPLATE/" folder... when it should really go in the "includes/templates/YOURTEMPLATE/templates" folder. I just cut and paste the appropriate reCaptcha code into my customized contact_us template and was all set.

 

 
Page 5 of 19 FirstFirst ... 3456715 ... LastLast

Similar Threads

  1. Contact reCAPTCHA
    By nolsowski in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 29 Apr 2012, 08:54 PM
  2. Contact Recaptcha
    By Miff in forum General Questions
    Replies: 1
    Last Post: 15 Jun 2011, 10:40 PM
  3. Adding a contact form
    By Matt Smith in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 8 Jun 2010, 11:27 PM
  4. Using two modules add extra fields and recaptcha to contact form
    By webmiss in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 22 Feb 2010, 07:43 PM
  5. Removing default contact info on contact us page/adding form to page
    By haggis0929 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 28 Dec 2009, 06:41 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