Page 1 of 1

Different Default Add_User for two Domains

Posted: Mon Nov 07, 2011 11:26 am
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

Re: Different Default Add_User for two Domains

Posted: Mon Nov 07, 2011 11:49 am
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">

Re: Different Default Add_User for two Domains

Posted: Mon Nov 07, 2011 11:54 am
by qoverq
Thank you very much!

Re: Different Default Add_User for two Domains

Posted: Thu Nov 10, 2011 7:20 am
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...

Re: Different Default Add_User for two Domains

Posted: Thu Nov 10, 2011 12:50 pm
by FTP
OK, check out the line 279.