Page 1 of 1

Hide NS and use Server IP

Posted: 29 Oct 2016, 21:21
by bady
Hello,

I have 2 small Questions:
  • is it posible to hide the NS Records in the Clientarea? I found the setting to hide the SOA Records but I will hide the NS Records to.
  • Is it possible to use the Server-IP for templates? I only found the option to set a static default IP for the template, but I think it would be good if we could use the Server IP
Thanks.

Re: Hide NS and use Server IP

Posted: 30 Oct 2016, 17:44
by Daniel
Thank you for your questions le met try to answer them:
bady wrote:is it posible to hide the NS Records in the Clientarea? I found the setting to hide the SOA Records but I will hide the NS Records to.
The current branch does not have this option. However you can manipulate the client area record output by using the custom queries feature. Please see: http://www.solutedns.com/documentation/custom-queries/

You could use something like this:

Code: Select all

define("QUERY_CLIENT_RECORDS", "AND type NOT LIKE 'NS'");
bady wrote:Is it possible to use the Server-IP for templates? I only found the option to set a static default IP for the template, but I think it would be good if we could use the Server IP[/list]
If SoluteDNS can find a product dependent IP address it can use this IP when the default IP tags are used. If it isn't able to find these IP's it will use the provided default IP address as set in the template settings. In order to be able to find related products the template must be assigned to a product. Please note the default template can not be used for this purpose as it is used for domain only registrations. When a domain is ordered together with a product you can specify a custom template to be used instead of the default one. Please see: http://www.solutedns.com/documentation/template/ and the "Handling" tab in the SoluteDNS admin area Settings.

Re: Hide NS and use Server IP

Posted: 06 Nov 2016, 18:32
by bady
Hi Daniel, thanks!

I think I will buy your software - I like it. But I have one new question: When the client orders a Wehosting Package with a free domain. Solute creates the records after the order and not after the product creation. What is, when I use the Server Setting "Add to the least full server" and the product will creat on an other Server of the Servergroup? Is it possible that WHMCS creates the Hosting Package at first, Solute loads the product IP and create the records and whmcs registrer the domain then?

Re: Hide NS and use Server IP

Posted: 07 Nov 2016, 19:12
by Daniel
By default SoluteDNS runs after the shoppingcartcheckout hook point. You can do additional processing using the WHMCS hook system and SoluteDNS internal API.

Please see: For example if you want to do additional processing when the order completed page is shown you could add:

Code: Select all

add_hook('ShoppingCartCheckoutCompletePage', 1, function ($vars) 
{
    ## Get IP based on  your own requirements
    $ip;  // Requires additional code

    ## Get domain related to product
    $domain = "example.com"; // Requires additional code

    ## Initiate SoluteDNS API
    $dns_api = new SDNS_api();

    $newrecord = array(
      "name" => $domain,
      "type" => "A",
      "content" => $ip,
      "prio" => "0",
      "ttl" => "3600",
    );

    ## Add new record
    $result = $dns_api->record->add($domain, $newrecord);

});

Re: Hide NS and use Server IP

Posted: 20 Sep 2018, 13:43
by Stender
Hi Daniel, how much additional processing could you add like that? Is there a limit?

Re: Hide NS and use Server IP

Posted: 22 Sep 2018, 11:40
by Daniel
You can add as many WHMCS hook points as you want. The information in this topic was about an older release prior to the Core being built into our WHMCS modules meaning the mentioned Internal API is no longer available. You can now use the Core API for DNS interaction: https://docs.solutedns.com/core/resources/