{"id":16756865,"url":"https://github.com/fetzi/kirby-uniform-recaptcha","last_synced_at":"2025-08-04T15:33:12.202Z","repository":{"id":62504353,"uuid":"48356114","full_name":"fetzi/kirby-uniform-recaptcha","owner":"fetzi","description":"Extension of the kirby-uniform plugin","archived":false,"fork":false,"pushed_at":"2019-01-15T11:49:40.000Z","size":8,"stargazers_count":13,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-11T12:19:59.699Z","etag":null,"topics":["kirby","kirby-plugin","php","recaptcha"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fetzi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-21T06:58:01.000Z","updated_at":"2022-02-26T21:17:58.000Z","dependencies_parsed_at":"2022-11-02T12:31:02.970Z","dependency_job_id":null,"html_url":"https://github.com/fetzi/kirby-uniform-recaptcha","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/fetzi/kirby-uniform-recaptcha","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fetzi%2Fkirby-uniform-recaptcha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fetzi%2Fkirby-uniform-recaptcha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fetzi%2Fkirby-uniform-recaptcha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fetzi%2Fkirby-uniform-recaptcha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fetzi","download_url":"https://codeload.github.com/fetzi/kirby-uniform-recaptcha/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fetzi%2Fkirby-uniform-recaptcha/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268715215,"owners_count":24295286,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kirby","kirby-plugin","php","recaptcha"],"created_at":"2024-10-13T03:42:15.791Z","updated_at":"2025-08-04T15:33:12.176Z","avatar_url":"https://github.com/fetzi.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kirby-uniform-recaptcha\n\nAn extension to the Kirby 2 plugin [Uniform](https://github.com/mzur/kirby-uniform) (v3) to add the Google reCAPTCHA guard.\n\n## Installation\n\n### Kirby CLI\n\nGet the [Kirby CLI](https://github.com/getkirby/cli) and run `kirby plugin:install fetzi/kirby-uniform-recaptcha`.\n\n### Traditional\n\n[Download](https://github.com/fetzi/kirby-uniform-recaptcha/archive/master.zip) the repository and extract it to `site/plugins/uniform-recaptcha`.\n\n### Composer\n\nRun `composer require fetzi/kirby-uniform-recaptcha`. Then add the second `require` to the `index.php` like this:\n\n```php\n// load kirby\nrequire(__DIR__ . DS . 'kirby' . DS . 'bootstrap.php');\nrequire 'vendor'.DS.'autoload.php';\n```\n\nBe sure to include the new `vendor` directory in your deployment.\n\n## Configuration\n\nDefine the mandatory config settings:\n\n1. `c::set('uniform-recaptcha-sitekey', 'YOUR RECAPTCHA SITEKEY');`\n2. `c::set('uniform-recaptcha-secret', 'YOUR RECAPTCHA SECRET');`\n\n## Usage\n\nYou can use the `recaptchaGuard` in your controllers form definition:\n\n```php\n$form = new Form(/* ... */);\n\nif (r::is('POST')) {\n    $form-\u003erecaptchaGuard()\n        -\u003eemailAction(/* ... */);\n}\n```\n\nTo embed the recaptcha field into your template simply call\n`\u003c?php echo recaptcha_field(); ?\u003e`\n\nThe plugin needs the recaptcha Javascript File provided by Google. You can either include the [JavaScript file](https://www.google.com/recaptcha/api.js) directly into your page or by calling the method `embed_recaptcha_js()` in your template.\n\n**Example**\n```html+php\n\u003cform action=\"\u003c?php echo $page-\u003eurl()?\u003e\" method=\"post\"\u003e\n    \u003clabel for=\"name\" class=\"required\"\u003eName\u003c/label\u003e\n    \u003cinput\u003c?php if ($form-\u003eerror('name')): ?\u003e class=\"erroneous\"\u003c?php endif; ?\u003e name=\"name\" type=\"text\" value=\"\u003c?php echo $form-\u003eold('name') ?\u003e\"\u003e\n\n    \u003c!-- ... --\u003e\n\n    \u003c?php echo csrf_field() ?\u003e\n    \u003c?php echo recaptcha_field() ?\u003e\n    \u003cinput type=\"submit\" value=\"Submit\"\u003e\n\u003c/form\u003e\n\u003c?php echo embed_recaptcha_js(); ?\u003e\n```\n\n## Author\n\nJohannes Pichler [https://johannespichler.com](https://johannespichler.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffetzi%2Fkirby-uniform-recaptcha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffetzi%2Fkirby-uniform-recaptcha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffetzi%2Fkirby-uniform-recaptcha/lists"}