Override registrar's DNS management

SoluteDNS for WHMCS v2.xx.xxx and lower
gorip96
Registered
Posts: 18
Joined: 29 Dec 2014, 10:03

It's the addon module from https://www.resellerclub-mods.com/ that's handling the DNS management, not the resellerclub registrar module itself
User avatar
Daniel
Support
Posts: 207
Joined: 02 Aug 2013, 17:50

Ok well then the upcoming hook sounds the most promising to solve the priority issue.
gorip96
Registered
Posts: 18
Joined: 29 Dec 2014, 10:03

Looking forward to it
gorip96
Registered
Posts: 18
Joined: 29 Dec 2014, 10:03

Update to 2.17.001, but unfortunately still can't overwrite other module's DNS management
User avatar
Daniel
Support
Posts: 207
Joined: 02 Aug 2013, 17:50

Please make sure the hook is working:

The file name must be: custom_hooks.php
and this file must be placed in the /modules/addons/solutedns directory

Code: Select all

function SDNS_hook_ClientAreaMenuPriority() {
	return array(
		'ClientAreaPrimarySidebar' => 2,
		'ClientAreaPrimaryNavbar' => 1
	);
}
Make sure the arrray is returned by the function.

You could simply check if the function works by adding die(); to it and see if the client area stops working.

You must change the priority value accordingly.
gorip96
Registered
Posts: 18
Joined: 29 Dec 2014, 10:03

This is the entry of my custom_hooks.php

Code: Select all

[sinihost@server1 ~]$ cd public_html/store/modules/addons/solutedns/
[sinihost@server1 solutedns]$ cat custom_hooks.php
function SDNS_hook_ClientAreaMenuPriority() {
        return array(
                'ClientAreaPrimarySidebar' => 1
        );
}
[sinihost@server1 solutedns]$

Does it need both lines? Since I only need the PrimarySidebar
User avatar
Daniel
Support
Posts: 207
Joined: 02 Aug 2013, 17:50

For the domain details page you just need the primary sidebar. But you may want to try raise the number to an higher value.

I believe during testing the higher value got more priority. But this is based on the WHMCS menu system.
gorip96
Registered
Posts: 18
Joined: 29 Dec 2014, 10:03

Owh, I thought 1 got the highest priority

But I already try with higher number ( I tried with 2,9,9999 ) and still doesn't work
User avatar
Daniel
Support
Posts: 207
Joined: 02 Aug 2013, 17:50

I'm sorry to hear it still doesn’t work. As far SoluteDNS goes, changing the priority of the WHMCS menu system really is the limit of menu organisation without hardcoding it. As it seems the SoluteDNS value gets overwritten after all you may want to look at the other module in which way it’s overwriting it.

As long you can reach the WHMCS DNS Management page for registrar modules SoluteDNS can pick this up and redirect it to the SoluteDNS DNS Management page. So you might want to take measures to revert the changes made by the module to the WHMCS default value.
gorip96
Registered
Posts: 18
Joined: 29 Dec 2014, 10:03

It's okay, I totally understood that this is not something relatively easy to overcome, since hooks priority is hardcoded on hooks.php itself, and every developer can use the same function, which we could never know which priority they use

SoluteDNS itself actually is usable in my system, but the reason I'm questioning about this, is so that customer don't have to go through different menu, for different DNS management module
Post Reply