Home Forums Weaver and Plugin Interaction Paste this snippet before the closing tag on your HTML template:

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #18651
    TedPalmer
    Participant

    I am using 

    Weaver Xtreme 2.0.7

    I am trying to implement two very popular plugins: “Contact Form 7” and “Contact Form 7 Simple Recaptcha”. I seem to have the Recaptcha part working as can be seen in the attached image. Forget the image. But the image shows a thick green check mark in a CheckBox just before the Recaptcha icon. This forum doesn’t provide for the uploading of images. I would have to provide a URL link to the image and I don’t have a good place to do that. So I’ll just have to do the best I can describing it. I am getting the error message “Failed to send your message. Please try later or contact the administrator by another method.” The instructions on the Google reCAPTCHA user interface web page say in step one “Paste this snippet before the closing </head> tag on your HTML template:” for the first script given as Java Script. And also says “Paste this snippet at the end of the <form> where you want the reCAPTCHA widget to appear:” I have used the WP Dashboard Appearance –> Widgets page to place the first java script in a Text Widget in the Xtreme Theme “Header Widget Area” and placed the second HTML script in a Text Widget in the Xtreme Theme “Pages Bottom Widget Area”. Is this the correct place to place these scripts to have the intended effect? If not where should I place these scripts? THANK YOU for any help you can provide.


    Here is a link to my Contact Us web-page: http://autosubrogate.com/ESW/blog/about/contact-us/ I hope this helps.
    #26516
    scrambler
    Moderator
    You should not have to do anything like that to make a contact form work.
    Have you contacted the plugin developer to see what they have to say about your issue?
    they are the one who can tell you why their plugin is not working
    #26517
    Weaver
    Keymaster

    What you tired to do is incorrect. What they are asking you to do is ridiculous. The days of patching theme code should be long gone, especially for such a thing as simple as a captcha. Because Contact Form  7 is so popular, I’m positive there must be an alternative Captcha plugin for it that doesn’t require such extreme measures as modifying a theme.

    And even what they recommend is WRONG WRONG WRONG. If you simply must make such changes, then the ONLY correct way to do that is via a child theme, and that is way beyond the abilities of 99% of WordPress users.

    #26518
    Gillian
    Moderator

    I can’t see the instructions referred to in the documention for Contact Form 7 Simple Recaptcha.  That plugin’s description simply states: After configuration, add [cf7sr-simple-recaptcha] to any Contact Form 7.

    #26519
    TedPalmer
    Participant

    Yes I have contacted the developer of the plugin. He states that his plugin doesn’t have any instructions as I have described. We are still discussing the subject. I now regret having said anything about plugins. I should just keep my questions very simple to avoid confusion and possibilities of finger pointing at other causes.

    So I will restate my question in more basic and simple terms. How do I insert a Java script “Paste this snippet before the closing </head> tag on your HTML template:”. These instructions come from Google not the plugin author.
    The instructions on the Google reCAPTCHA user interface web page “Manage your reCAPTCHA API” keys at

    I can’t give you a link to the actual web-page Google creates in response to the above configuration page because it has my site and security keys which must remain a secret. I can’t be posting them on a public forum.

    “Paste this snippet before the closing </head> tag on your HTML template:” This reCAPTCHA functionality comes from Google not the plugin author.

    So how do I insert this Java script before the closing </head> tag on a web-page generated by WordPress based on the Weaver Xtreme theme? Just one and only one web-page. I have tried using the Appearance — Widgets option from the WP Dashboard to insert the Java script into the “Header Widget Area”. That has to be for all pages generated by WordPress based on the Weaver Xtreme theme because this option is not web-page specific and I can’t be sure that the Java script is placed just “before the closing </head> tag“. Is there not a way of doing this using the page design setup process for web-pages defined by the Weaver Xtreme theme?

    THANK YOU for any help you can provide.
    #26520
    scrambler
    Moderator

    You are free to ignore sound advice 🙂

    Advanced options > Head Section > Head Section box will insert in the head section of all the pages of the site.

    To insert on a per page basis, you can use page custom field like  header for the top and footer for the bottom.

    If you are not familiar with page custom field, read

    http://forum.weavertheme.com/discussion/1281/custom-fields-on-pages-what-to-use-them-for-and-how-to-use-them

    And I am not sure why you are focusing on the reCAPTACH as that part works fine in your contact form, what appear not to work is submitting the form itself which should have nothing to do with the reCAPTCHA

    #26521
    Weaver
    Keymaster

    Where that advice comes from is irrelevant. For this theme, and a purpose of adding a recaptcha to the contact form, the approach is simply wrong.

    And just to be clear, adding some script to your pages as @scrambler just described will work perfectly well, but you still won’t get what you are trying to get, I fear.

    Scripts usually have TWO parts – the script itself, and then somewhere inside your content that invokes the script. Sometimes these two are in the same place, but once you insert something into the <head> block (beginning, end – it does not really matter!), then you MUST be able to invoke that script in you content (at least for scripts that are supposed to display content like a recaptcha would). You’ve not asked about that part, but could be done if you add the invoking script to a page that is in “Allow RAW HTML” mode.

    #26522
    Gillian
    Moderator

    @TedPalmer – you seriously are over-complicating this.

    All you are trying to do is put a contact form on your site and use a CAPTCHA in conjunction with it to discourage spammers. The two plugins you mentioned in your first post, in combination, do the trick.
    You don’t need to mess around with Google’s reCAPTCHA instructions at all. That said, if you prefer to use Google’s re CAPTCHA directly, and avoid the need for a second plugin (eg Contact Form 7 Simple Recaptcha), then all you need to do is read this page on the Contact Form 7 site and follow the simple directions – there’s no need to separately add scripts to your site etc.
    So you need to first make a decision about which reCAPTCHA solution you want to use (a plugin, or following the CF7 directions) and then implement only that one solution.
    Finally, as @scrambler said, your CAPTCHA is already working fine, it is the actual submitting of a completed form that you seem to be having a difficulty with. If this problem remains after you rationalise your CAPTCHA solution, then that is where you should concentrate your efforts – start by reading this page.
    #26523
    Weaver
    Keymaster

    If the issue is getting the contact form to submit properly, then remove any and all recaptcha plugins and/or scripts, and just show the contact form. See if it works as expected. Then, if it does, try a recaptcha solution – and a plugin should be your first choice. By proving the contact only will work, you can narrow down what the real issue is.

    #26524
    TedPalmer
    Participant

    After my last communication with the author of the “Contact Form 7 Simple Recaptcha” plugin, I uninstalled both “Contact Form 7” and “Contact Form 7 Simple Recaptcha”. Then I began by reinstalling just “Contact Form 7” and getting that working OK; i.e, it would send messages OK. Then I reinstalled “Contact Form 7 Simple Recaptcha” without attempting to do any of the code insertions that was stated on the Google web-page as necessary to make that functionality work. And my “Contact Us” web-page worked as it should as I hoped. So at this point I got what I want, but I’m still not satisfied. Why was it failing before? I added some minor seemingly harmless embelishments. When I got to where I added a 2nd “send to” e-mail address by adding a “; 2nd-emailaddress.com” to the existing “send to” e-mail address, I got the the same error message that I was receiving when this issue began for me.


    Now I am not feeling the least bit embarrassed by this discovery. Nor should I be feeling guilty for seeking help with a problem I was having that had such an easy solution. When somebody is new at doing something, as I am at website development, they don’t know what they “don’t know”. So they are inspired to follow as best they can any instructions they encounter from a creditable source. Google’s fantastic mega success at what they do gives them a lot of creditability to my way of thinking. So when their instructions say to insert this script code in these places and I am not sure of how or where to do that, I am going to ask of the people I am acquainted with wherever I can find them — like in forums — how to do that. I have a long history of success doing that. I have had an account on Experts-Exchange for more than ten years. My profile there shows that I have 131 questions asked there, and with very few exceptions with good results. I figured this was the best place to ask such a question about how to insert script code into the HTML of a web-page. Since the theme of a WordPress website has such an over-arching control effect of all that occurs to produce a web-page.


    So why is it that every time I come here, without exception, to ask a question about Weaver Xtreme theme, I have to prepare myself for being pounced on as if I were an incompetent worthless idiot? I have many years of experience as a COBOL and PL-1 programmer on IBM main frames, as a PL/SQL programmer in Oracle on mid-range computers, and PowerBuilder and Visual BASIC (Beginners Allpurpose Symbolic Instruction Code) on PCs along with various scripting languages like JCL (Job Control Language) on IBM mainframes, Korn Shell script in Unix, and Windows NT Shell Script on Windows PCs. I am also a Sun Certified Programmer for the Java 2 Platform. As an ethical hacker I spoofed my employer’s IBM main frame (it was an inside job) with the advanced knowledge and consent of my manager before “spoof” was a commonly used word for what I did. Now that may not be much compared to Mr. Weaver’s Ph.D. in Computer Science from the University of Utah in 1979, BUT IT IS A LONG WAY FROM NOTHING.

    So if you all would get off of your God Damn high horse and just answer my questions as best you can, I would really appreciate it..!! Ms. Gillian, thank you for the link to “Create Mobil-Friendly Websites!”. It made a big difference for me. The link to the Contact form 7 FAQ was also helpful. Scrambler, thank you for the link to custom fields on pages. I am going to study that also. I am confident it will help me a lot when it comes to better understanding website development.

    Oh! BTW (By The Way). That reCAPTCHA thing is a very big improvement over asking users to solve a puzzle that requires that they analyze a distorted and twisted string of alphanumeric characters and enter them into a text box in order to send their message. A significant number of potential customers just are not going to be bothered with solving a puzzle to send their message. Especially if they get wrong on the 1st attempt. Seems certain that this will increase the number of potential customers who will send me a message. If you want to see a simple demonstration how this works just follow this link: http://autosubrogate.com/ESW/blog/about/contact-us/ If you send me a message, I will reply to let you know that I got it.

    #26525
    Weaver
    Keymaster

    Sorry, I don’t see any language in any of our answers that tried to pounce on you, or implied you were incompetent or anything. As you readily admit, you are new at this. And we know new people as questions, and we really know the answers to a lot of them.

    And if you re-read my first answer, note that I said “What they are asking you to do is ridiculous.”. And I stand by that. It has nothing to do with you or your understanding, but everything to do with what is likely badly worded information that goes with the plugin. I was just trying to steer you away from that bad advice, and onto the simple, correct path. As you noted, once you ignored that information (as we suggested from the very beginning), things worked as expected.

    Perhaps because of your experience with programming, you expect things in WordPress to require modification or low level tweaking to work right. That is almost never true. Themes and plugins are designed to work with options interfaces. Once you understand the full WordPress core API, and APIs offered by some themes and plugins, then you might find you can tweak things with custom code. But understanding WP at a low level like that has a fairly long learning curve. After 7 years at this, I’m still learning things about the WordPress internals.

    And when we get the occasional question that requires deeper knowledge of WordPress or the theme, we do assume that we can provide somewhat technical answers. I really tried do deliver helpful information about using JavaScript within WordPress.

    So I’m sorry we somehow offended you, but I stand by that we tried to provide you with accurate information, and in fact, everything we said in our answers was true. As I said, WordPress really tries to make things simple for 99% of its users, while providing low-level access to that 1% that needs real low level access. We could see that what you were trying to do did not need that low level access.

    #26526
    TedPalmer
    Participant

    Mr. Weaver,

    I accept your apology and I hope that you will accept mine. I get pretty excited myself sometimes. You obviously do fine great work! That is why I chose Weaver Xtreme in the first place. I have enough long hours of experience cleaning up the software of others who just don’t seam to understand how software should be written in a way that is logically elegant and well ordered. Even if what they write works at the time, it is fragile when it encounters data that it didn’t expect, and is impossible to extend by modification to deal with new business rules without having to trash most of it and start completely over. So I recognize extremely good work when I see it. I am looking forward to working more with your product.

     

     

    #26527
    TedPalmer
    Participant

    To Anybody that might be interested:

    I haven’t yet finished reading all of the content at the link that was provided by scrambler. But based on what I have read so far I was able to have a “hello world” moment. I added the string “Razzel Dazzel” to precede the header of a test web-page that I created on my now internet visible WordPress created website. I don’t know for sure how long I’ll leave it there, but since it is not on the main menu as best I can tell nobody can see it unless they know the URL which is http://autosubrogate.com/ESW/blog/test/

    If I can insert a string, I can insert the java script that I was trying to insert based on the Google reCAPTCHA security keys web-page. Life is GOOD when I get good advise.

    #26528
    scrambler
    Moderator

    It definitely helps to read the answers you get 🙂 😉

Viewing 14 posts - 1 through 14 (of 14 total)
  • The forum ‘ Weaver and Plugin Interaction’ is closed to new topics and replies.