Document additional antispam configuration - #52
Open
avasiliev2026 wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The updated docs/examples contain a couple of copy-paste issues/inconsistencies (notably direct $_POST['email'] access and the defer mismatch with getFrontendHTMLCode()) that should be corrected to avoid misleading users.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR expands the project documentation to cover additional CleantalkAntispam configuration and updates the README + example handler to use the fluent setter API (including Bot Detector guidance).
Changes:
- Updates the README integration snippet to use fluent setters and links to an additional configuration guide.
- Adds
readme_additional.mddescribing check types, sender fields, IP overrides, Bot Detector/event token usage, and troubleshooting. - Updates the
form_with_handlerexample to load the API key fromCLEANTALK_API_KEY, use contact-form mode, and defer-load the Bot Detector script (with troubleshooting logging commented out).
File summaries
| File | Description |
|---|---|
| README.md | Updates the main quickstart snippet and adds a link + warning about diagnostic logs containing personal data. |
| readme_additional.md | New extended documentation for fluent configuration options and Bot Detector/event token behavior. |
| examples/form_with_handler/form_with_handler.php | Updates example HTML/handler code to match the newer fluent configuration approach and recommended script loading. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+79
to
+81
| $email = $_POST['email']; // Get this value from your form. | ||
| $cleantalk_antispam = (new CleantalkAntispam($api_key)) | ||
| ->setEmail($email); |
|
|
||
| ## Frontend HTML helper | ||
|
|
||
| `CleantalkAntispam::getFrontendHTMLCode()` returns the Bot Detector script tag. Pass `true` to also include a warning for visitors who have disabled JavaScript. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.