webio Posted May 24, 2010 Share Posted May 24, 2010 Hello, Is there way to return .html instead of .php when WHMCS is calling $smarty.server.PHP_SELF function? Regards 0 Quote Link to comment Share on other sites More sharing options...
webio Posted May 24, 2010 Author Share Posted May 24, 2010 (edited) OK. I've managed to do this using smart plugin: <?php function smarty_modifier_php2html($string) { return str_replace(".php",".html",$string); } ?> which I named modifier.php2html.php and placed inside /include/smarty/plugins directory. I had to replace all occurences of "{$smarty.server.PHP_SELF}" and change them to "{$smarty.server.PHP_SELF|php2html}" Edited May 24, 2010 by webio typo 0 Quote Link to comment Share on other sites More sharing options...
m00 Posted May 24, 2010 Share Posted May 24, 2010 You can also use the existing smarty function "replace": {$smarty.server.PHP_SELF|replace:".php":".html"} 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.