Different Default Add_User for two Domains

Please post here if you have problems in using Wing FTP Server.
Post Reply
qoverq
Posts: 21
Joined: Fri Oct 28, 2011 11:45 am

Different Default Add_User for two Domains

Post by qoverq »

Hello

Is it possible to make different Default Add_User Sites for two Domains?

Example:
Adding User in different Domains
First Domain has standard checked the protocols FTP and HTTP
Second Domain has standard checked the protocols FTPS and HTTPS


Is it possible to raise the maximum characters for the Username.
Default is 30 characters.

Greetz
FTP
Site Admin
Posts: 2072
Joined: Tue Sep 29, 2009 6:09 am

Re: Different Default Add_User for two Domains

Post by FTP »

1. Just edit the file "webadmin/admin_adduser_form2.html", before the last "</script>", add the following script:

Code: Select all

<% if _GET["username"] == nil and _GET["domain"] == "domain1" then %>
	$("protocol_ftp").checked = true;
	$("protocol_http").checked = true;

	$("protocol_ftps_tls").checked = false;
	$("protocol_ftps_ssl").checked = false;
	$("protocol_https").checked = false;
	$("protocol_ssh").checked = false;
<% elseif _GET["username"] == nil and _GET["domain"] == "domain2" then %>
	$("protocol_ftps_tls").checked = true;
	$("protocol_ftps_ssl").checked = true;
	$("protocol_https").checked = true;
	$("protocol_ssh").checked = true;

	$("protocol_ftp").checked = false;
	$("protocol_http").checked = false;
<% end %>
2. Just edit the file "webadmin/admin_adduser_form2.html", find and replace the following line:

Code: Select all

<input id="username" type="text" style="width:305px;"  maxlength="30">
into:

Code: Select all

<input id="username" type="text" style="width:305px;"  maxlength="128">
qoverq
Posts: 21
Joined: Fri Oct 28, 2011 11:45 am

Re: Different Default Add_User for two Domains

Post by qoverq »

Thank you very much!
qoverq
Posts: 21
Joined: Fri Oct 28, 2011 11:45 am

Re: Different Default Add_User for two Domains

Post by qoverq »

I got a problem...

the first Thing works perfect, but the second with the Username Length doesn't work.

Now the Username can be 128 characters, but it only saves the first 30...
FTP
Site Admin
Posts: 2072
Joined: Tue Sep 29, 2009 6:09 am

Re: Different Default Add_User for two Domains

Post by FTP »

OK, check out the line 279.
Post Reply