From cd05ef2add009908b774555052eabe36e86e78d2 Mon Sep 17 00:00:00 2001 From: Christian Scheibelhut Date: Fri, 27 Jan 2023 17:13:10 +0100 Subject: [PATCH 1/3] edit FriendlyCaptcha.html for eu-endpoint integration, edit Readme --- README.md | 10 ++++++++++ .../Private/Frontend/Partials/FriendlyCaptcha.html | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f5b0636..d72ae7a 100644 --- a/README.md +++ b/README.md @@ -10,3 +10,13 @@ The recommended way to install TYPO3 Console is by using [Composer](https://getc composer require balatd/db_friendlycaptcha +### Configuration + +extend your typo3conf/LocalConfiguration with the following: + + 'db_friendlycaptcha' => [ + 'lang' => 'de', + 'private_key' => 'XXXXXXXX', + 'public_key' => 'XXXXXXXXX', + 'verify_server' => 'https://eu-api.friendlycaptcha.eu/api/v1/puzzle', (or 'https://api.friendlycaptcha.com/api/v1/puzzle' for global endpoint) + ], diff --git a/Resources/Private/Frontend/Partials/FriendlyCaptcha.html b/Resources/Private/Frontend/Partials/FriendlyCaptcha.html index 8e284f0..712c6e1 100644 --- a/Resources/Private/Frontend/Partials/FriendlyCaptcha.html +++ b/Resources/Private/Frontend/Partials/FriendlyCaptcha.html @@ -13,7 +13,8 @@ />
+ data-puzzle-endpoint="{configuration.verify_server}" + {f:if(condition: '{configuration.lang}', then: 'data-lang="{configuration.lang}"')} From f6b4e80a5252e5a54128028b906aea3fca3e6924 Mon Sep 17 00:00:00 2001 From: Christian Scheibelhut Date: Fri, 27 Jan 2023 17:58:44 +0100 Subject: [PATCH 2/3] include puzzle endpoint --- README.md | 5 ++++- Resources/Private/Frontend/Partials/FriendlyCaptcha.html | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d72ae7a..69cfc4c 100644 --- a/README.md +++ b/README.md @@ -18,5 +18,8 @@ extend your typo3conf/LocalConfiguration with the following: 'lang' => 'de', 'private_key' => 'XXXXXXXX', 'public_key' => 'XXXXXXXXX', - 'verify_server' => 'https://eu-api.friendlycaptcha.eu/api/v1/puzzle', (or 'https://api.friendlycaptcha.com/api/v1/puzzle' for global endpoint) + 'verify_server' => 'https://eu-api.friendlycaptcha.eu/api/v1/siteverify', + 'puzzle_server' => 'https://eu-api.friendlycaptcha.eu/api/v1/puzzle', ], + +leave verify_server and puzzle_server empty for global endpoint diff --git a/Resources/Private/Frontend/Partials/FriendlyCaptcha.html b/Resources/Private/Frontend/Partials/FriendlyCaptcha.html index 712c6e1..590e556 100644 --- a/Resources/Private/Frontend/Partials/FriendlyCaptcha.html +++ b/Resources/Private/Frontend/Partials/FriendlyCaptcha.html @@ -13,7 +13,11 @@ />
+ + data-puzzle-endpoint="{configuration.puzzle_server}" + + {f:if(condition: '{configuration.lang}', then: 'data-lang="{configuration.lang}"')}
From ff6ac616e2f7fa3212f039aeb80e07c865304bed Mon Sep 17 00:00:00 2001 From: Christian Scheibelhut Date: Fri, 27 Jan 2023 18:44:58 +0100 Subject: [PATCH 3/3] #76288: Fix FriendlyCaptcha Template --- Resources/Private/Frontend/Partials/FriendlyCaptcha.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Private/Frontend/Partials/FriendlyCaptcha.html b/Resources/Private/Frontend/Partials/FriendlyCaptcha.html index 590e556..0bce481 100644 --- a/Resources/Private/Frontend/Partials/FriendlyCaptcha.html +++ b/Resources/Private/Frontend/Partials/FriendlyCaptcha.html @@ -18,7 +18,7 @@ data-puzzle-endpoint="{configuration.puzzle_server}" - {f:if(condition: '{configuration.lang}', then: 'data-lang="{configuration.lang}"')} + {f:if(condition: '{configuration.lang}', then: 'data-lang="{configuration.lang}"')}>