Skip to content

Document additional antispam configuration - #52

Open
avasiliev2026 wants to merge 1 commit into
CleanTalk:masterfrom
avasiliev2026:39616-document-additional-antispam-configuration
Open

Document additional antispam configuration#52
avasiliev2026 wants to merge 1 commit into
CleanTalk:masterfrom
avasiliev2026:39616-document-additional-antispam-configuration

Conversation

@avasiliev2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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.md describing check types, sender fields, IP overrides, Bot Detector/event token usage, and troubleshooting.
  • Updates the form_with_handler example to load the API key from CLEANTALK_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 thread README.md
Comment on lines +79 to +81
$email = $_POST['email']; // Get this value from your form.
$cleantalk_antispam = (new CleantalkAntispam($api_key))
->setEmail($email);
Comment thread readme_additional.md

## Frontend HTML helper

`CleantalkAntispam::getFrontendHTMLCode()` returns the Bot Detector script tag. Pass `true` to also include a warning for visitors who have disabled JavaScript.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants