Jump to content
  • 0

How To Transfer Domain From Admin Panel


flangefrog

Question

6 answers to this question

Recommended Posts

  • 0

the action for admin is addService , with a quick search in the logicbox module i found this under getAdminAddFields()

 

// Handle transfer request
if (isset($vars->transfer) || isset($vars->{'auth-code'})) {
return $this->arrayToModuleFields(Configure::get("Logicboxes.transfer_fields"), null, $vars);
}
that mean that the transfer will done if you provide the 'auth-code' and selecting the transfer button . but as i see in the reurned modulefields no option for transfer is just

 

$module_fields = $this->arrayToModuleFields(array_merge(Configure::get("Logicboxes.domain_fields"), Configure::get("Logicboxes.nameserver_fields")), null, $vars);
so try change it to :

 

$module_fields = $this->arrayToModuleFields(array_merge(Configure::get("Logicboxes.domain_fields"), Configure::get("Logicboxes.transfer_fields") , Configure::get("Logicboxes.nameserver_fields")), null, $vars);
is not tested but it can give you the road to go .

you can also see the code in getClientAddFields() .

NOTE : if you use another registrar module you can search for a semilar workaround .

Link to comment
Share on other sites

  • 0

the action for admin is addService , with a quick search in the logicbox module i found this under getAdminAddFields()

 

// Handle transfer request
if (isset($vars->transfer) || isset($vars->{'auth-code'})) {
return $this->arrayToModuleFields(Configure::get("Logicboxes.transfer_fields"), null, $vars);
}
that mean that the transfer will done if you provide the 'auth-code' and selecting the transfer button . but as i see in the reurned modulefields no option for transfer is just

 

$module_fields = $this->arrayToModuleFields(array_merge(Configure::get("Logicboxes.domain_fields"), Configure::get("Logicboxes.nameserver_fields")), null, $vars);
so try change it to :

 

$module_fields = $this->arrayToModuleFields(array_merge(Configure::get("Logicboxes.domain_fields"), Configure::get("Logicboxes.transfer_fields") , Configure::get("Logicboxes.nameserver_fields")), null, $vars);
is not tested but it can give you the road to go .

you can also see the code in getClientAddFields() .

NOTE : if you use another registrar module you can search for a semilar workaround .

 

 

Is this in your Reloaded module mate?

Link to comment
Share on other sites

  • 0

Is this in your Reloaded module mate?

 

No , i have stopped publishing released for the reloaded module until v3.3 or maybe until the new domain module ;

 

 

Thanks for your reply naja7host. I had though I was missing something but maybe Blesta devs were/are planning to use it but it's unfinished. I'll put both the whois fields and transfer fields on the admin page and have an option whether to use the whois fields.

 

i get some free time to make a search in this , as we also need it , i have arrived to a working solution , now in the admin area you can select register or transfer , then the auth-code box will appear  ,the tweak is the fallowing , change the  getAdminAddFields function with this one 

public function getAdminAddFields($package, $vars=null) {
 
  // Handle universal domain name
  if (isset($vars->domain))
   $vars->{'domain-name'} = $vars->domain;
  
  if ($package->meta->type == "domain") {
   // Set default name servers
   if (!isset($vars->ns1) && isset($package->meta->ns)) {
    $i=1;
    foreach ($package->meta->ns as $ns) {
     $vars->{"ns" . $i++} = $ns;
    }
   }
 
   // Handle transfer request
   if (isset($vars->transfer) || isset($vars->{'auth-code'})) {
    return $this->arrayToModuleFields(Configure::get("Logicboxes.transfer_fields"), null, $vars);
   }
   // Handle domain registration
   else {
  
    $fields = array(
      'transfer' => array(
       'label' => "Domain Action",
       'type' => "radio",
       'value' => "1",
       'options' => array(
        '1' => "Register",
        '2' => "Transfer",
       )
      ),    
      'domain-name' => array(
       'label' => Language::_("Logicboxes.transfer.domain-name", true),
       'type' => "text"
      ),
      'auth-code' => array(
       'label' => Language::_("Logicboxes.transfer.auth-code", true),
       'type' => "text"
      )
     );
   
  
   
    $module_fields = $this->arrayToModuleFields(array_merge($fields, Configure::get("Logicboxes.nameserver_fields")), null, $vars);
   
    if (isset($vars->{'domain-name'})) {
     $tld = $this->getTld($vars->{'domain-name'});
    
     if ($tld) {
      $extension_fields = array_merge((array)Configure::get("Logicboxes.domain_fields" . $tld), (array)Configure::get("Logicboxes.contact_fields" . $tld));
      if ($extension_fields)
       $module_fields = $this->arrayToModuleFields($extension_fields, $module_fields, $vars);
     }
    }
   
    $module_fields->setHtml("
    <script type=\"text/javascript\">
     $(document).ready(function() {
      // Set whether to show or hide the ACL option
      $('#auth-code_id').closest('li').hide();
      if ($('input[name=\"transfer\"]:checked').val() == '2')
       $('#auth-code_id').closest('li').show();
      $('input[name=\"transfer\"]').change(function() {
       if ($(this).val() == '2')
        $('#auth-code_id').closest('li').show();
       else
        $('#auth-code_id').closest('li').hide();
      });
     });
    </script>
    ");   
     
    return $module_fields;
   }
  }
  else {
   return new ModuleFields();
  }
}

is the same almost for all other registrar modules , just change the language to your own use .

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...