Different Default Add_User for two Domains

Please post here if you have problems in using Wing FTP Server.

Different Default Add_User for two Domains

Postby qoverq » Mon Nov 07, 2011 11:26 am

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
qoverq
 
posts 19
 
joined Fri Oct 28, 2011 11:45 am

Re: Different Default Add_User for two Domains

Postby FTP » Mon Nov 07, 2011 11:49 am

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">
FTP
Site Admin
 
posts 1215
 
joined Tue Sep 29, 2009 6:09 am

Re: Different Default Add_User for two Domains

Postby qoverq » Mon Nov 07, 2011 11:54 am

Thank you very much!
qoverq
 
posts 19
 
joined Fri Oct 28, 2011 11:45 am

Re: Different Default Add_User for two Domains

Postby qoverq » Thu Nov 10, 2011 7:20 am

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...
qoverq
 
posts 19
 
joined Fri Oct 28, 2011 11:45 am

Re: Different Default Add_User for two Domains

Postby FTP » Thu Nov 10, 2011 12:50 pm

OK, check out the line 279.
FTP
Site Admin
 
posts 1215
 
joined Tue Sep 29, 2009 6:09 am


Return to Support

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron