Simos Posted October 20, 2012 Share Posted October 20, 2012 Hello, what i'm tring to accomplish is replace some characters (greek) with some english ones. I've tried 2 ways to do that - both failed. First of all i tried by making a hook add_hook("PreDomainRegister",1,"hook_changeClientInfo"); Unfortunatelly inside my main function - i cannot neither get the client information neither return it. function hook_changeClientInfo($vars) { $firstname= $vars["params"]["firstname"]; $domain = $vars["params"]["domain"]; return str_replace("a char","b char",$firstname"); } $firstname is nothing - and of course my return is not working as well. Then i tried to do a Transliteration hook , so i made a hooks.php file and placed it in /www/whmcs/modules/registrars/namecheap/ My code is : function hook_transliterate($string) { $string = str_replace("a","w",$string); $string = str_replace("b","v",$string); return $string; } add_hook("Transliteration",1,"hook_transliterate"); Unfortunatelly it seems is never triggers. Any idea what i'm doing wrong? Am i missing something? THanks a lot for your help, Regards, Simos. 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.