Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
INSERT INTO `#__extensions` (`name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`)
SELECT 'plg_captcha_powcaptcha', 'plugin', 'powcaptcha', 'captcha', 0, 1, 1, 0, 1, '', '{}', '', 0, 0
WHERE NOT EXISTS (SELECT * FROM `#__extensions` e WHERE e.`type` = 'plugin' AND e.`element` = 'powcaptcha' AND e.`folder` = 'captcha' AND e.`client_id` = 0);
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
INSERT INTO "#__extensions" ("name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state")
SELECT 'plg_captcha_powcaptcha', 'plugin', 'powcaptcha', 'captcha', 0, 1, 1, 0, 1, '', '{}', '', 0, 0
WHERE NOT EXISTS (SELECT * FROM "#__extensions" e WHERE e."type" = 'plugin' AND e."element" = 'powcaptcha' AND e."folder" = 'captcha' AND e."client_id" = 0);

39 changes: 39 additions & 0 deletions administrator/language/en-GB/plg_captcha_powcaptcha.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
; Joomla! Project
; (C) 2025 Open Source Matters, Inc. <https://www.joomla.org>
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

PLG_CAPTCHA_POWCAPTCHA="CAPTCHA - Proof of Work"
PLG_CAPTCHA_POWCAPTCHA_XML_DESCRIPTION="This CAPTCHA plugin presents a math task to the user's browser that the browser can solve automatically. It's not supposed to prove humanship of the user, but to prove that the user is willing to invest the necessary time to solve the task. Currently based on the Altcha (altcha.org) library."

; Admin parameters
PLG_CAPTCHA_POWCAPTCHA_AUTOSOLVE_LABEL="Automatic Solution"
PLG_CAPTCHA_POWCAPTCHA_AUTOSOLVE_DESC="Should the captcha be solved automatically, without requiring the user to actively click on the respective box?"
PLG_CAPTCHA_POWCAPTCHA_AUTOSOLVE_OFF="Off"
PLG_CAPTCHA_POWCAPTCHA_AUTOSOLVE_ONFOCUS="When captcha field receives focus"
PLG_CAPTCHA_POWCAPTCHA_AUTOSOLVE_ONLOAD="When page is loaded"
PLG_CAPTCHA_POWCAPTCHA_AUTOSOLVE_ONSUBMIT="When form is submitted"
PLG_CAPTCHA_POWCAPTCHA_DIFFICULTY_LABEL="Difficulty"
PLG_CAPTCHA_POWCAPTCHA_DIFFICULTY_DESC="The harder the captcha gets, the more computing time will be required to solve it."
PLG_CAPTCHA_POWCAPTCHA_DIFFICULTY_CUSTOM="Custom"
PLG_CAPTCHA_POWCAPTCHA_DIFFICULTY_EASY="Easy"
PLG_CAPTCHA_POWCAPTCHA_DIFFICULTY_HARD="Hard"
PLG_CAPTCHA_POWCAPTCHA_DIFFICULTY_MODERATE="Moderate"
PLG_CAPTCHA_POWCAPTCHA_EXPIRATION_LABEL="Expiration"
PLG_CAPTCHA_POWCAPTCHA_EXPIRATION_DESC="How long should a solution be valid?"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PLG_CAPTCHA_POWCAPTCHA_EXPIRATION_LABEL="Expiration"
PLG_CAPTCHA_POWCAPTCHA_EXPIRATION_DESC="How long should a solution be valid?"
PLG_CAPTCHA_POWCAPTCHA_EXPIRATION_DESC="How long should a solution be valid?"
PLG_CAPTCHA_POWCAPTCHA_EXPIRATION_LABEL="Expiration"

alphasort

PLG_CAPTCHA_POWCAPTCHA_EXPIRATION_1MIN="1 minute"
PLG_CAPTCHA_POWCAPTCHA_EXPIRATION_5MIN="5 minutes"
PLG_CAPTCHA_POWCAPTCHA_EXPIRATION_10MIN="10 minutes"
PLG_CAPTCHA_POWCAPTCHA_EXPIRATION_1HOUR="1 hour"
PLG_CAPTCHA_POWCAPTCHA_MAXNUMBER_LABEL="Maximum Number"
PLG_CAPTCHA_POWCAPTCHA_MAXNUMBER_DESC="Defines the maximum number that's used in the task that needs to be solved. The higher the number, the harder to solve."

; Client-side interface customisation
PLG_CAPTCHA_POWCAPTCHA_ARIALINKLABEL="Visit Altcha.org"
PLG_CAPTCHA_POWCAPTCHA_ERROR="Verification failed. Try again later."
PLG_CAPTCHA_POWCAPTCHA_EXPIRED="Verification expired. Try again."
PLG_CAPTCHA_POWCAPTCHA_FOOTER="Protected by <a href=\"https://altcha.org/\" target=\"_blank\" aria-label=\"Visit Altcha.org\" rel=\"noopener noreferrer\">ALTCHA</a>"
PLG_CAPTCHA_POWCAPTCHA_LABEL="I'm not a robot"
PLG_CAPTCHA_POWCAPTCHA_VERIFIED="Verified"
PLG_CAPTCHA_POWCAPTCHA_VERIFYING="Verifying..."
PLG_CAPTCHA_POWCAPTCHA_WAITALERT="Verifying... please wait."
7 changes: 7 additions & 0 deletions administrator/language/en-GB/plg_captcha_powcaptcha.sys.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
; Joomla! Project
; (C) 2025 Open Source Matters, Inc. <https://www.joomla.org>
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

PLG_CAPTCHA_POWCAPTCHA="CAPTCHA - Proof of Work"
PLG_CAPTCHA_POWCAPTCHA_XML_DESCRIPTION="This CAPTCHA plugin presents a math task to the user's browser that the browser can solve automatically. It's not supposed to prove humanship of the user, but to prove that the user is willing to invest the necessary time to solve the task. Currently based on the Altcha (altcha.org) library."
37 changes: 37 additions & 0 deletions build/build-modules-js/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,43 @@
{
"settings": {
"vendors": {
"altcha": {
"name": "altcha",
"js": {
"dist_external/altcha.js": "js/altcha.js",
"dist_external/worker.js": "js/worker.js"
},
"css": {
"dist_external/altcha.css": "css/altcha.css"
},
"provideAssets": [
{
"name": "altcha",
"type": "script",
"uri": "altcha.js",
"attributes": {
"defer": true,
"async": true,
"type": "module"
}
},
{
"name": "altcha",
"type": "style",
"uri": "altcha.css"
},
{
"name": "altcha",
"type": "preset",
"dependencies": [
"altcha#script",
"altcha#style"
]
}
],
"dependencies": [],
"licenseFilename": "LICENSE.txt"
},
"awesomplete": {
"name": "awesomplete",
"js": {
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@
"phpseclib/bcmath_compat": "^2.0.3",
"jfcherng/php-diff": "^6.16.2",
"php-tuf/php-tuf": "^1.0.3",
"php-debugbar/php-debugbar": "^2.2.4"
"php-debugbar/php-debugbar": "^2.2.4",
"altcha-org/altcha": "^1.2"
},
"require-dev": {
"phpunit/phpunit": "^9.6.29",
Expand Down
49 changes: 48 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions installation/sql/mysql/base.sql
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`,
(0, 'plg_behaviour_compat6', 'plugin', 'compat6', 'behaviour', 0, 0, 1, 0, 1, '', '{"classes_aliases":"0","legacy_classes":"1"}', '', 1, 0),
(0, 'plg_behaviour_taggable', 'plugin', 'taggable', 'behaviour', 0, 1, 1, 0, 1, '', '{}', '', 2, 0),
(0, 'plg_behaviour_versionable', 'plugin', 'versionable', 'behaviour', 0, 1, 1, 0, 1, '', '{}', '', 3, 0),
(0, 'plg_captcha_powcaptcha', 'plugin', 'powcaptcha', 'captcha', 0, 1, 1, 0, 1, '', '{}', '', 1, 0),
(0, 'plg_content_confirmconsent', 'plugin', 'confirmconsent', 'content', 0, 0, 1, 0, 1, '', '{}', '', 1, 0),
(0, 'plg_content_contact', 'plugin', 'contact', 'content', 0, 1, 1, 0, 1, '', '', '', 2, 0),
(0, 'plg_content_emailcloak', 'plugin', 'emailcloak', 'content', 0, 1, 1, 0, 1, '', '{"mode":"1"}', '', 3, 0),
Expand Down
1 change: 1 addition & 0 deletions installation/sql/postgresql/base.sql
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder",
(0, 'plg_behaviour_compat6', 'plugin', 'compat6', 'behaviour', 0, 0, 1, 0, 1, '', '{"classes_aliases":"0","legacy_classes":"1"}', '', 1, 0),
(0, 'plg_behaviour_taggable', 'plugin', 'taggable', 'behaviour', 0, 1, 1, 0, 1, '', '{}', '', 2, 0),
(0, 'plg_behaviour_versionable', 'plugin', 'versionable', 'behaviour', 0, 1, 1, 0, 1, '', '{}', '', 3, 0),
(0, 'plg_captcha_powcaptcha', 'plugin', 'powcaptcha', 'captcha', 0, 1, 1, 0, 1, '', '{}', '', 1, 0),
(0, 'plg_content_confirmconsent', 'plugin', 'confirmconsent', 'content', 0, 0, 1, 0, 1, '', '{}', '', 1, 0),
(0, 'plg_content_contact', 'plugin', 'contact', 'content', 0, 1, 1, 0, 1, '', '', '', 2, 0),
(0, 'plg_content_emailcloak', 'plugin', 'emailcloak', 'content', 0, 1, 1, 0, 1, '', '{"mode":"1"}', '', 3, 0),
Expand Down
53 changes: 34 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"@fortawesome/fontawesome-free": "^6.7.2",
"@popperjs/core": "^2.11.8",
"accessibility": "^3.0.17",
"altcha": "^2.2.4",
"awesomplete": "^1.1.7",
"bootstrap": "^5.3.8",
"choices.js": "^11.1.0",
Expand Down
Loading
Loading