title: create whmcs domain registrar module to sell domains with the tld of my country
body: <p>Hi everyone<br/>I have a site with whmcs and i want to sell domains with the tld of my county that is .al and i've searched the web for this but all told me that i need to create a domain registrar module.<br>I'v downloaded the template from the whmcs site but i don't know how to use it.Does anyone have any idea how can i achieve this.</p>
  
  <pre><code>   &lt;?php
  
      function template_getConfigArray() {
  $configarray = array(
   "Username" =&gt; array( "Type" =&gt; "text", "Size" =&gt; "20", "Description" =&gt; "Enter your username here", ),
   "Password" =&gt; array( "Type" =&gt; "password", "Size" =&gt; "20", "Description" =&gt; "Enter your password here", ),
   "TestMode" =&gt; array( "Type" =&gt; "yesno", ),
  );
  return $configarray;
      }
  
      function template_GetNameservers($params) {
  $username = $params["Username"];
  $password = $params["Password"];
  $testmode = $params["TestMode"];
  $tld = $params["tld"];
  $sld = $params["sld"];
  # Put your code to get the nameservers here and return the values below
  $values["ns1"] = $nameserver1;
  $values["ns2"] = $nameserver2;
  $values["ns3"] = $nameserver3;
  $values["ns4"] = $nameserver4;
  # If error, return the error message in the value below
  $values["error"] = $error;
  return $values;
      }
  
      function template_SaveNameservers($params) {
  $username = $params["Username"];
  $password = $params["Password"];
  $testmode = $params["TestMode"];
  $tld = $params["tld"];
  $sld = $params["sld"];
  $nameserver1 = $params["ns1"];
  $nameserver2 = $params["ns2"];
  $nameserver3 = $params["ns3"];
  $nameserver4 = $params["ns4"];
  # Put your code to save the nameservers here
  # If error, return the error message in the value below
  $values["error"] = $error;
  return $values;
      }
  
      function template_GetRegistrarLock($params) {
  $username = $params["Username"];
  $password = $params["Password"];
  $testmode = $params["TestMode"];
  $tld = $params["tld"];
  $sld = $params["sld"];
  # Put your code to get the lock status here
  if ($lock=="1") {
      $lockstatus="locked";
  } else {
      $lockstatus="unlocked";
  }
  return $lockstatus;
     }
  
      function template_SaveRegistrarLock($params) {
  $username = $params["Username"];
  $password = $params["Password"];
  $testmode = $params["TestMode"];
  $tld = $params["tld"];
  $sld = $params["sld"];
  if ($params["lockenabled"]) {
      $lockstatus="locked";
  } else {
      $lockstatus="unlocked";
  }
  # Put your code to save the registrar lock here
  # If error, return the error message in the value below
  $values["error"] = $Enom-&gt;Values["Err1"];
  return $values;
     }
  </code></pre>
  
  <p>This is a part of the code from the module template.</p>