Форуми / Cotonti / Extensions / Cloudflare Turnstile Plugin

Cloudflare Turnstile CAPTCHA integration for Cotonti Siena (0.9.x). Protect your site effectively from spam, bots, and automated submissions with Cloudflare’s advanced CAPTCHA alternative.

Rootali
#48389 13.03.2025 20:08

Files to Update & New Code

You need to add these codes to the following template files:

  • Login Formusers.auth.tpl
  • Registration Formusers.register.tpl
  • Comment Formcomments.tpl
  • Contact Formcontact.tpl

Login Form (users.auth.tpl)

Old code:

{USERS_AUTH_VERIFYIMG}
{USERS_AUTH_VERIFYINPUT}

Updated code:

<!-- Cloudflare Turnstile Captcha -->
<!-- IF {USERS_AUTH_VERIFY_IMG} -->
<tr>
    <td colspan="2" class="textcenter">
        {USERS_AUTH_VERIFY_IMG}
        {USERS_AUTH_VERIFY_INPUT}
    </td>
</tr>
<!-- ENDIF -->

Add this code at the bottom of the login form inside the users.auth.tpl file.


Registration Form (users.register.tpl)

Old code:

{USERS_REGISTER_VERIFYIMG}
{USERS_REGISTER_VERIFYINPUT}

Updated code:

<!-- Cloudflare Turnstile Captcha -->
<!-- IF {USERS_REGISTER_VERIFY_IMG} -->
<tr>
    <td colspan="2" class="textcenter">
        {USERS_REGISTER_VERIFY_IMG}
        {USERS_REGISTER_VERIFY_INPUT}
    </td>
</tr>
<!-- ENDIF -->

Add this code at the bottom of the registration form inside the users.register.tpl file.


Comment Form (comments.tpl)

Old code:

{COMMENTS_FORM_VERIFYIMG}
{COMMENTS_FORM_VERIFYINPUT}

Updated code:

<!-- Cloudflare Turnstile Captcha -->
<!-- IF {COMMENTS_FORM_VERIFY_IMG} -->
<tr>
    <td colspan="2" class="textcenter">
        {COMMENTS_FORM_VERIFY_IMG}
        {COMMENTS_FORM_VERIFY_INPUT}
    </td>
</tr>
<!-- ENDIF -->

Add this code inside the comment form inside the comments.tpl file.


Contact Form (contact.tpl)

Old code:

{CONTACT_FORM_VERIFY}

Updated code:

<!-- Cloudflare Turnstile Captcha -->
<!-- IF {CONTACT_FORM_VERIFY_INPUT} -->
<tr>
    <td colspan="2" class="textcenter">
        {CONTACT_FORM_VERIFY_INPUT}
    </td>
</tr>
<!-- ENDIF -->

Add this code at the bottom of the contact form inside the contact.tpl file.


 

File Name Old Tags New Tags
users.auth.tpl (Login Form) {USERS_AUTH_VERIFYIMG}, {USERS_AUTH_VERIFYINPUT} {USERS_AUTH_VERIFY_IMG}, {USERS_AUTH_VERIFY_INPUT}
users.register.tpl (Registration Form) {USERS_REGISTER_VERIFYIMG}, {USERS_REGISTER_VERIFYINPUT} {USERS_REGISTER_VERIFY_IMG}, {USERS_REGISTER_VERIFY_INPUT}
comments.tpl (Comment Form) {COMMENTS_FORM_VERIFYIMG}, {COMMENTS_FORM_VERIFYINPUT} {COMMENTS_FORM_VERIFY_IMG}, {COMMENTS_FORM_VERIFY_INPUT}
contact.tpl (Contact Form) {CONTACT_FORM_VERIFY} {CONTACT_FORM_VERIFY_INPUT}

 

Dear @Kort, I think this is what you wanted to say, did I understand correctly? I have updated the tags, I am uploading them to githuba now. if this tag system is correct.

Update plugin: https://github.com/SLW-CMS/Cotonti_Turnstile

 

my blog: https://rootali.net

Відредаговано: Rootali (13.03.2025 20:20, 1 місяць тому)