HollyRidge Posted October 6, 2016 Share Posted October 6, 2016 I need to rename the whmcs index.php to something else such as hosting.php. The problem that I am having with this is that it breaks the Six theme captcha. This is necessary as we will be using a different (custom) index page. See my attached screen shots for more details.The same issue exists in v6.3.1 and v7.0.0. Named index.php Same file, just renamed to hosting.php The index.php and hosting.php are the stock index.php from whmcs v7.0.0. They are exactly the same. It is basically two copies of index.php (one by the default name index.php, and another that is renamed hosting.php). Notice the difference in the captcha part on the two pages. For some reason it does not display the same on both pages, even though they are essentially the same page. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted October 6, 2016 Share Posted October 6, 2016 use the {debug} tag inside your template/header.tpl to find out the variables passed to index.php file, then compare it with the ones passed to hosting.php, likely hosting.php will have less variables/settings than index.php. you will need to define those settings/variables in hosting.php to work properly 0 Quote Link to comment Share on other sites More sharing options...
HollyRidge Posted October 6, 2016 Author Share Posted October 6, 2016 whmcs index.php=hosting.php. This means that the file is encrypted therefore I cannot make changes to it. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted October 6, 2016 Share Posted October 6, 2016 you can do what I suggested using this ActionHook 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 6, 2016 Share Posted October 6, 2016 changing index.php to hosting.php in v7 didn't affect recaptcha for me - other than alignment is slightly off... what you might need to do is tweak /templates/six (or custom)/includes/captcha.tpl and change the two references of... {if $filename == 'index'} to... {if $filename == 'hosting'} and see if that fixes the issue. 0 Quote Link to comment Share on other sites More sharing options...
HollyRidge Posted October 6, 2016 Author Share Posted October 6, 2016 I have it fixed. I found that in the captcha.tpl and changed it. Thanks brian! I started with... {if $filename == 'index' || $filename == 'hosting' } That will allow it either file. I ended up expanding this to allow for all pages that have the captcha so that version 2 would work. They kept pulling version 1 on other pages such as contact, register, supporttickets, etc. Here is what I ended up with... On the first one... {if $filename == 'domainchecker' || $filename == 'index' || $filename == 'hosting' || $filename == 'submitticket' || $filename == 'register' || $filename == 'contact'} On the other two... {if $filename == 'index' || $filename == 'hosting' || $filename == 'submitticket' || $filename == 'register' || $filename == 'contact'} 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.