[ZendTo] Patch for recaptcha and tne new_dropoff.js problem (for the beta)

Santiago Garcia Mantinan manty at manty.net
Thu Sep 3 10:36:31 BST 2020


I'd like to make you a new suggestion and also comment on your mail.
The suggestion would be this:

--- templates/header.tpl        2020-09-03 10:17:32.884356266 +0200
+++ templates/header.tpl~       2020-09-02 10:06:14.000000000 +0200
@@ -184,7 +184,7 @@
       name: 'localeForm',
       id:   'localeForm',
       method: 'post',
-      action: '{call name=hidePHPExt t='changelocale.php'}',
+      action: '{$zendToURL}{call name=hidePHPExt t='changelocale.php'}',
       enctype: 'multipart/form-data',
       style: 'display:none'

I have tested this change and it works, I'm having the external site
redirect you to the internal URL if you are coming from the intranet
and without that change I was redirected to the external site again
every time i switched locale, with this change I stay inside without
any problem.

I also have a question on translations, where should one mail updates
on them, to the list or to you directly?
And about translations... I'm adapting all of our translated templates
because the wording that I can get to doesn't make any sense in
Spanish or Galician (to which I'm translating) but I've seen similar
trouble on other languages I understand, the thing is that maybe we
should start a discussion with translators to see if we can get some
flexibility with variables for the company stuff, I'll try to
illustrate this with an example:

I'm using zendto at work, the company should be pretty similar to your
setup as I work for the Council of A Coruña, well, if I setup the
variables like this:

OrganizationShortName = "A Coruña"
OrganizationShortType = "the Council"

Things look a bit odd even in english, but in spanish or similar...
they just don't go.

Maybe the best solution is to edit the templates like I'm doing it
already, but maybe we could come up with something better without
needing too much work on code that would allow this, or maybe there is
no good way.

Some of the problems I find is with that article, "the Council" in
spanish is "el Ayuntamiento" which then has contractions if you stick
it to "users of", which is "usuarios de", as it would make "usuarios
del Ayuntamiento", but if the company has a femenine article it
wouldn't make a contraction and so it happens with plural (masculine
and femenine) and those adjectives would have to get translations as
well, ... so it is basically very difficult, don't know if it really
makes sense even to try to make any changes, but maybe we can discuss
it a bit and try to get to something :-?

Anyway... back to the old email...

> Using recaptcha.net instead of recaptcha.google.com is the change recommended by Google so that the reCAPTCHA service works for users in China, who cannot reach 99% of Google services. Because it's on a separate domain name, China allow that 1 Google service through their firewall.

Ok then, but you are still using www.google.com on the CurlPost.php, so then...

--- p/opt/zendto/www/ReCaptcha/RequestMethod/CurlPost.php
2020-03-04 16:56:42.000000000 +0100
+++ /opt/zendto/www/ReCaptcha/RequestMethod/CurlPost.php    2020-08-17
11:42:15.947472184 +0200
@@ -40,7 +40,7 @@
      * URL to which requests are sent via cURL.
      * @const string
-    const SITE_VERIFY_URL = 'https://www.google.com/recaptcha/api/siteverify';
+    const SITE_VERIFY_URL =

      * Curl connection to the reCAPTCHA service

> In the call to include the dropoff_js.tpl file, the {} brackets tell the Smarty template system to read and process the new_dropoff.js.tpl file, which you will find in /opt/zendto/templates. This allows me to substitute Smarty variables in the JS code, while keeping it all in a separate file.

I can see that now on my 6.05 setup but it was not like that when I
tested it on 6.04, I suppose it was kind of a mess with my setup.
Sorry about the noise.

Thanks for your work. Regards...
Manty/BestiaTester -> http://manty.net

More information about the ZendTo mailing list