postcd Posted June 10 Share Posted June 10 (edited) Hello, in WHMCS, I have supportticketsubmit-steptwo.tpl file, and i would like to add hcaptcha to it. I have the hcaptcha code, which seems to be PHP. The last line i could add into the mentioned .tpl file, after current recaptcha button code, but regarding PHP-like code, when i have added it between {php}{/php} tags, it failed to display support form. List of hcaptcha integrations: https://github.com/hCaptcha/hcaptcha-integrations-list?tab=readme-ov-file#hcaptcha-integrations-list Please can you tell me what to place where in order it to display recaptcha + hcaptcha? Edited June 10 by postcd 0 Quote Link to comment Share on other sites More sharing options...
bear Posted June 10 Share Posted June 10 Have you specifically allowed {php} tags in smarty? I believe it's off by default. 0 Quote Link to comment Share on other sites More sharing options...
postcd Posted June 11 Author Share Posted June 11 7 hours ago, bear said: Have you specifically allowed {php} tags in smarty? I believe it's off by default. No, but when i insert into said .tpl file: Quote {php} echo "smarty PHP4"; phpinfo(); {/php} then it shows a PHP info page and the text... 0 Quote Link to comment Share on other sites More sharing options...
NormanRynd Posted June 22 Share Posted June 22 On 6/10/2024 at 9:30 PM, postcd said: Hello, in WHMCS, I have supportticketsubmit-steptwo.tpl file, and i would like to add hcaptcha to it. I have the hcaptcha code, which seems to be PHP. The last line i could add into the mentioned .tpl file, after current recaptcha button code, but regarding PHP-like code, when i have added it between {php}{/php} tags, it failed to display support form. List of hcaptcha integrations: https://github.com/hCaptcha/hcaptcha-integrations-list?tab=readme-ov-file#hcaptcha-integrations-list Please can you tell me what to place where in order it to display recaptcha + hcaptcha? I been trying for days to allow {php} tags in my .tpl no matter what smarty policy i do it won't work can you please guide me how to do so? Thanks 0 Quote Link to comment Share on other sites More sharing options...
WhmTools Posted June 23 Share Posted June 23 (edited) Can you ask the support of hcaptcha weather they have javascript code instead of php, so that you can place that in the tpl file. Edited June 23 by WhmTools 0 Quote Link to comment Share on other sites More sharing options...
postcd Posted June 26 Author Share Posted June 26 (edited) On 6/23/2024 at 8:03 AM, WhmTools said: ask the support of hcaptcha I have asked them and their reply is to use minimal example: https://docs.hcaptcha.com/#add-the-hcaptcha-widget-to-your-webpage Quote <html> <head> <title>hCaptcha Demo</title> <script src="https://js.hcaptcha.com/1/api.js" async defer></script> </head> <body> <form action="" method="POST"> <input type="text" name="email" placeholder="Email" /> <input type="password" name="password" placeholder="Password" /> <div class="h-captcha" data-sitekey="your_site_key"></div> <br /> <input type="submit" value="Submit" /> </form> </body> </html> and to call "siteverify" using the token returned from answering the challenge. Pseudo-code example for that: https://docs.hcaptcha.com/#verify-the-user-response-server-side . They are also linking to https://docs.hcaptcha.com and https://github.com/hCaptcha/hcaptcha-integrations-list ... Edited June 26 by postcd 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.