Jump to content

Disable manage namservers


wrender

Recommended Posts

We want to force clients to use our nameservers if they have a domain registered with us.

Is it possible to disable the "manage nameservers" feature from the client portal?

I don't believe there is a way to disable it from the admin side - so you are left with removing links to the option through template modification... exactly how would depend upon your template, e.g if you are using a custom based on v5, then you should only need to edit the template(s); if using a custom based on "Six", you may need an action hook to remove the links from the sidebar too.

 

for "Six", you could remove the following two lines from clientareadomains.tpl @ line 69...

 

<li><a href="clientarea.php?action=domaindetails&id={$domain.id}#tabNameservers"><i class="glyphicon glyphicon-globe"></i> {$LANG.domainmanagens}</a></li>

.. and line 90 for bulk options...

 

<li><a href="#" id="nameservers" class="setBulkAction"><i class="glyphicon glyphicon-globe"></i> {$LANG.domainmanagens}</a></li>

... and if you needed to remove the "Nameservers" and "Private Nameserver" sidebar links, you could use the action hook below - just give it a filename, e.g nameserverssidebar.php and add it to the includes/hooks/ folder...

 

<?php

use WHMCS\View\Menu\Item as MenuItem;

add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar)
{
   if (!is_null($primarySidebar->getChild('Domain Details Management'))) {
                $primarySidebar->getChild('Domain Details Management')
                               ->removeChild('Modify Nameservers')
                               ->removeChild('Manage Private Nameservers');
   }
});

alternatively, I guess you could not do the above and just modify the clientareadomaindetails.tpl and clientarearegisterns.tpl templates instead - replacing the applicable sections with a message to contact you if they wish to modify their nameservers.

Link to comment
Share on other sites

Thanks a lot Brian! Further to this:

 

Edited out line 72-78 of clientareadomaindetails.tpl and removed

{if $managementoptions.nameservers}
                   <li>
                       <a class="tabControlLink" data-toggle="tab" href="#tabNameservers">
                           {$LANG.changeDomainNS}
                       </a>
                   </li>
               {/if}

Edited by wrender
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
Reply to this topic...

×   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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

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