Zennuie Posted March 2, 2021 Share Posted March 2, 2021 Does anyone have any experience regarding adding PHP to a theme?I was trying to add the code to my theme in either the globalTemplate or navbar section. I was getting an error when doing so, I tried using the double curly brackets; but this caused the same error. If anyone could help with this matter, it would be a life saver! <?php if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP'];?> Link to comment Share on other sites More sharing options...
Solution opentype Posted March 2, 2021 Solution Share Posted March 2, 2021 You need to use the template syntax as explained here on several pages. https://invisioncommunity.com/4guides/themes-and-customizations/template-syntax/introduction-to-template-syntax-r137/ Zennuie 1 Link to comment Share on other sites More sharing options...
Stuart Silvester Posted March 3, 2021 Share Posted March 3, 2021 It's also worth pointing out that the code you're trying to use, you don't need to use. Make sure you have enabled the 'Trust IP addresses provided by proxies?' setting in your AdminCP. Link to comment Share on other sites More sharing options...
Recommended Posts