ole1986 / wp-ispconfig3

Wordpress ISPConfig plugin with Gutenberg support
https://wordpress.org/plugins/wp-ispconfig3/
28 stars 13 forks source link

Check for domain availability only in ISPConfig #24

Closed ole1986 closed 4 years ago

ole1986 commented 4 years ago

Currently wp-ispconfig3 uses whois to check for avaialble domains It was requested to only check the domain against ISPConfig (through REST API).

Therefore I will provide a new option soon

Pingback: https://github.com/ole1986/wc-invoice-pdf/issues/5

ole1986 commented 4 years ago

Unfortunately there is no proper way to do a REST API call and request all domain being used by the websites/clients.

Only option is to receive all available sites, based on the given sys_userid and sys_usergroup

See: https://git.ispconfig.org/ispconfig/ispconfig3/blob/master/interface/lib/classes/remote.d/sites.inc.php#L831

MachineITSvcs commented 4 years ago

Is there a way to loop through all users by ID and get each user's group's? And run that function against the returned values? If so, I'm sure it can all be done in the same SOAP connection before close.

-- Collin Machine

On Fri, Oct 25, 2019, 8:47 AM ole notifications@github.com wrote:

Unfortunately there is no proper way to do a REST API call and request all domain being used by the websites/clients.

Only option is to receive all available sites, based on the given sys_userid and sys_usergroup

See: https://git.ispconfig.org/ispconfig/ispconfig3/blob/master/interface/lib/classes/remote.d/sites.inc.php#L831

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ole1986/wp-ispconfig3/issues/24?email_source=notifications&email_token=AD7WLRJVQ4U4JZPAGEIX4F3QQLTHZA5CNFSM4JEV3KDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECIHX6Q#issuecomment-546339834, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD7WLRP3H2FXOWFUFQ7JEDTQQLTHZANCNFSM4JEV3KDA .

ole1986 commented 4 years ago

I am currently working on it... Almost done but being also busy with other stuff unfortunately

ole1986 commented 4 years ago

BONUS:

Once then wp-ispconfig3 plugin is enabled you can access the domain check using ajax request (E.g. jQuery)

var domain = 'yourdomain.net';
$.post(ajaxurl, { action: 'ispconfig_whois', 'domain': domain }, null, 'json').done(function(resp){
    if (resp.class !== 'ispconfig-msg-error') {
        // is free
    } else {
        // is reserved
    }
});
MachineITSvcs commented 4 years ago

Nice! That'll help a lot for field validation before form submission!

-- Collin Machine

On Sat, Oct 26, 2019, 9:18 AM ole notifications@github.com wrote:

BONUS:

Once then wp-ispconfig3 plugin is enabled you can access the domain check using ajax request (E.g. jQuery)

var domain = 'yourdomain.net'; $.post(ajaxurl, { action: 'ispconfig_whois', 'domain': domain }, null, 'json').done(function(resp){ if (resp.class !== 'ispconfig-msg-error') { // is free } else { // is reserved } });

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ole1986/wp-ispconfig3/issues/24?email_source=notifications&email_token=AD7WLROAQRF3S65SRAU7P5TQQQ7R3A5CNFSM4JEV3KDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECKHXCI#issuecomment-546601865, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD7WLRNWHURNDGPF47KPDZ3QQQ7R3ANCNFSM4JEV3KDA .