Jump to content
Sign in to follow this  
tatocaster

Transliteration During Domain Validation and Register

Recommended Posts

Hello,

what i'm trying to accomplish is replace some characters (აბც) with some english ones and vise versa.

I've tried 2 ways to do that - both failed.

 

First of all i tried by making a hook

add_hook("PreDomainRegister",1,"hook_transliterate");

 

Unfortunatelly inside my main function - i cannot neither get the client information neither return it.

 

function hook_transliterate($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/hooks/transliterate.php

 

 

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.

 

 

Then I tried

add_hook("DomainValidation",999,"hook_transliterate");

 

hook activates every time when domain availability checking running but, i want to transliterate this string and return to client input as different characters for ex: abc = აბც . it would be great to save in DB also like these. Any help will be appreciated.

 

Thanks

Edited by tatocaster
bolded code

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Similar Content

    • By Web Host Pro
      We recently raised our domain price a little and was wondering how to update all the prices on the domains already registered. Obviously new domains have the new price but already purchased domains are not changed.
    • By growe
      Currently as an Enom reseller, I am charged a percentage by Enom when I add funds to my Enom account using PayPal. Then when I sell a domain registration through WHMCS and use PayPal as the gateway, I am charged fees again by PayPal. I am beginning to question whether it is best to sell domain registrations through WHMCS or not.
       
      Does everyone have this double fee problem or do you most of you resellers refill your Enom accounts using offline methods to avoid the fees?
    • By fiberit
      I get domain unavailable for extensions: .eu .be .aero .gr
       
      I have check this issue with some long names and always get "unavailable".
    • By clbryan26
      I am using the following Registrars [FreeNom, NetEarthOne, and Enom].
       
      I have setup most of my domains to use FreeNom (as its usually a whole lot cheaper). When I go to add another domain with a different registrar or try to modify a domain already listed as FreeNom; after I click the save button it will not save. I can not change the Registrar value from Freenom to anything else nor can I add another registrar other than FreeNom.
    • By totallytech
      Hey All,
       
      I'm trying to add an attractive way to add domain names...
       
      When you look at other providers such as 123-reg and 1and1 etc when you check domain names and try to buy them its a very attractive, colourful way to do it, however the basic whmcs way isn't very user friendly nor very nice so I was wondering what people have done to have the domains checker etc really try to sell domains?
       
      Cheers
  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated