Version 1.22.0

Released: 2004-05-30

CMD_API_RESELLER_STATS new

api version of CMD_RESELLER_STATS.

sample output:

CMD_API_RESELLER_STATS

aftp=ON&bandwidth=%35%30%30&cgi=ON&dns=OFF&dnscontrol=ON&domainptr=unlimited&ftp=unlimited&ip=shared&ips=%30&mysql=unlimited&nemailf=unlimited&nemailml=unlimited&nemailr=unlimited&nemails=unlimited&ns%31=ns%31.domain.com&ns%32=ns%32.domain.com&nsubdomains=unlimited&oversell=ON&package=custom&php=ON&quota=%31%30%30&sentwarning=no&serverip=ON&ssh=ON&ssi=ON&ssl=ON&userssh=ON&vdomains=unlimited

CMD_API_RESELLER_STATS?type=usage

bandwidth=%31%33%37&domainptr=%33&ftp=%32%30&mysql=%31%33&nemailf=%39&nemailml=%32&nemailr=%34&nemails=%31%38&nsubdomains=%36&nusers=%31%33&quota=%32%34.%37&vdomains=%31%32%37

CMD_API_RESELLER_STATS?type=allocated

bandwidth=%31%33%30%31&domainptr=%37%37&ftp=unlimited&mysql=unlimited&nemailf=unlimited&nemailml=unlimited&nemailr=unlimited&nemails=unlimited&nsubdomains=unlimited&nusers=%30&quota=unlimited&vdomains=unlimited

Count files owned by apache to Users disk usage new

Any files uploaded by apache (eg: using php) will be owned by apache and not reflected in the system quotas. This will go though and count all files owned by apache in the users home directory and include them in the Users disk usage.

Plugin System (SKINS) new

Ability to add plugins without needing to change the skin for each update.

https://forum.directadmin.com/showthread.php?t=2373&p=18334#post18334

Plugins will be placed in:

/usr/local/directadmin/plugins

Each plugin will have a name (go figure 😃 ) ... inside that: (eg. plug_name)

/usr/local/directadmin/plugins/plug_name

inside the plug_name directory, we'll have a plugin.conf file with the following (example):

name=Hello World
id=hello_world
author=JBMC-Software
version=1.0
update_url=http://www.directadmin.com/hello_world.tar.gz
active=yes
installed=yes

Most of it is self explanitory, but the update_url, if you have it in that file will allow DA to update the script when the admin clicks an "update" button in the plugins manager page. active=yes or no would be to turn it on and off.

installed=yes or no would be to figure out if it's been installed yet.(or uninstalled)

inside the plug_name directory will be 4 directories:

user
reseller
admin
images

inside those directories will store the actual files to be viewed. The output of those files should only be html snippets as they will be inserted into an |OUTPUT| token on a plugins.html page in the skin. Users will only be able to acces the files that are available at their level. user, reseller, and admin must have an index.html file with the html snippet code for DA to start with when viewing the plugin at the respective access level. The images directory will store images.

The files for the plugin (index.html etc).. but be executable (755) by the user calling it (user logged into da). They must be scripts with the proper interpreter lines at the top, eg:

#!/usr/local/bin/php

DA wil not tokenize these scripts so all data is passed via the environment.

All output on the stdout is inserted into the |OUTPUT| token on the skins page. No data from the strerr will be retrieved. The return value of the script isn't not checked, so errors should be directed to the stdout.

There are no file_user.conf files like in the skins. The plugins system will allow files to be accessed directly, eg:

domain.com:2222/CMD_PLUGINS/plug_name/index.html

SKINS:

admin/content_main.html:

|PLUGIN_0_ADMIN_TXT|
|PLUGIN_1_ADMIN_TXT|
|PLUGIN_2_ADMIN_TXT|
|PLUGIN_3_ADMIN_TXT|

OR for image based skins with icons:

|PLUGIN_0_ADMIN_IMG|
|PLUGIN_1_ADMIN_IMG|
|PLUGIN_2_ADMIN_IMG|
|PLUGIN_3_ADMIN_IMG|

reseller/content_main.html

|PLUGIN_0_RESELLER_IMG|
...
|PLUGIN_0_RESELLER_TXT|
...

user/show_domain.html or user/show_domain_advanced.html

|PLUGIN_0_IMG|
|PLUGIN_1_IMG|
...

or

|PLUGIN_0_TXT|
|PLUGIN_1_TXT|
...

Those tokens will be added add global tokens, so you can really add them anywhere.

files_user.conf

CMD_PLUGINS=user/plugin.html

see included skins for details.. main token: |OUTPUT|

Subdomain Bandwidth API new

CMD_API_SUBDOMAIN_BANDWIDTH?domain=domain

Returns a list of integers of kilobytes transferred as reported by the webalizer.hist file. If the file does not exist, zero is returned.

eg:

sub1=%33%36%38&billings=%30&testing=%30

ability to set TTL per record type new

Set the named.db to work like the following:

|?A_TIME=14400|
|?NS_TIME=14400|
|?MX_TIME=14400|
|?CNAME_TIME=14400|
|?PTR_TIME=14400|
$TTL 14400
@       IN      SOA     |NS1|      |EMAIL| (
                                                |SERIAL|
                                                7200
                                                3600
                                                1209600
                                                86400 )

|NS|
|A|
|MX|
|CNAME|
|PTR|

Show bandwidth history and API. (SKINS) new

Show usage settings for previous months.

Put link in user_stats.html as /CMD_USER_HISTORY?domain=|domain|

(domain is not required, but just to make sure it shows up in the |TREE|)

new page:

user/show_history:

|?TREE=&raquo; <a class=tree href="/CMD_SHOW_DOMAIN?domain=\`domain\`">\`domain\`</a> &raquo; <a class=tree href="/CMD_USER_STATS?domain=\`domain\`">User Stats for \`USERNAME\`</a> &raquo; <a class=tree href="/CMD_USER_HISTORY?domain=\`domain\`">User History</a>|
|?HELP_SECTION=www.site-helper.com/stats.html|
|HTM_USER_TOP|

<b>User History</b><br>

|HISTORY|
|HTM_USER_BOTTOM|

API:

The Api returns the list of past months. All resets done within the same month will be added together. Since the reset is done on the first day of the month, all resets done on the first day of the month, including all days from the previous month (except the first day from the previous month) will be included in the last months totals. The default DA install does 1 reset per month on the 1st day. A format example is as follows:

%32%30%30%34 %30%35=bandwidth%3D%31%34%34.%30%33%35%26quota%3D%32%32.%39%32%30%30%34 %30%36=bandwidth%3D%31%34%36.%30%33%35%26quota%3D%32%32.%39

Where decoded it looks like (it's all sent on one line):

2004 05=bandwidth=144.035&quota=22.9
2004 06=bandwidth=146.035&quota=22.9

All previous months will be included in the one query.

User:

CMD_API_USER_HISTORY

Reseller:

CMD_API_USER_HISTORY?user=bob

template for proftpd virtualhosts new

template system for virtualhosts in the /etc/profptd.vhosts.conf.

/usr/local/directadmin/data/templates/proftpd.vhost.conf

/usr/local/directadmin/data/templates/custom/proftpd.vhost.conf

<VirtualHost |ip|>
   ServerName        "|ServerName|"
   ExtendedLog       |ExtendedLog| WRITE,READ userlog
   AuthUserFile      |AuthUserFile|
|EXTRA|
</VirtualHost>

The EXTRA token will be reservd for any possible additions required to the template at a future date. It will be empty for now.

Server Load (api and admin panel) new

Add a display for the current server load, as well as an api for it.

It's has been added to the admin stats.

The API is called:

CMD_API_LOAD_AVERAGE

and can be used by both Resellers and Admins. The return value is:

fifteen=%30.%32&five=%30.%34%33&one=%31.%30%37

where the values of one,five and fifteen are the load averages (url encoded)

Domain pointers API new

CMD_API_DOMAIN_POINTER?domain=domain.com

returns:

list[]=domain2.com&list[]=domain3.com

CMD_API_DOMAIN_POINTER

domain=domain.com
action=add
from=domain2.com
alias=yes  (dont pass 'alias' at all for 'no')

CMD_API_DOMAIN_POINTER

domain=domain.com
action=delete
select0=domain2.com
(select1=domain3.com)
(...)

New Enhanced Skin new

Including new skin with all DirectAdmin updates.

New language feature. Languages can be added and set through DA. The environmental variable "LANGUAGE" will be passed to all scripts in the skins and to the plugins system.

All language text will be place in the file of the name name in a directory called "lang" with the language right after.

Example, engligsh (en):

user/content_main.html

the language file would be:

lang/en/user/content_main.html

The format of the language file is a simple TOKEN=text. When the language is changed, the "en" is changed to the new language.

You are not required to have a language for each html file available.

A page can include the language file from another html page by loading it with |LF_OTHERFILE| where LF_OTHERFILE is specified in the files_*.conf, eg:

LF_OTHERFILE=user/content_main.html

With that, all tokens/text from the content_main.html language file would be loaded into the html file that calls |LF_OTHERFILE|

CMD_API_POP quota usage fix fixed

Usages were all being returned as zero. Caused because program didn't have the required permission to read the directory. Both the quota and usage will be in bytes.

Backup restore uses old NS's fixed

When moving a user to a new server, the restore uses the old nameservers. This fix will create the user with the ns's set by the Reseller on his Nameserver's screen.

There is also a report of the NS values being entered incorrectly:

domain.com NS ns1.domain.com. <--
domain.com... NS ns1.domain.com. <--
domain.com. NS ns2.domain.com. 

Unable to duplicate the period problem.

Domain Pointers not restored with backup fixed

Domain Pointers not restored with backup.

Outlook reg files to use different http request format fixed

change outlook reg file download to use:

/CMD_EMAIL_REG/domain.com/user@domain.com/user@domain.com/outlook_user.reg

DNS zone reader fixed

fix the dns zone reader to handle arbitrary length subdomains (for people who insist on using 800 character domain names 😃 )

Added check to make sure A record value is an IP address.

Added check to make sure CNAME doesn't exist before adding A record.

Added check to make sure A doesn't exist before adding CNAME record.

Removal of a protected directory user prevents login fixed

When a user is removed from the list of users setup to work on a password protected directory, the .htpasswd has it's permissions changed to 600 from 644. This prevents apache from reading the .htpasswd file thus preventing login.

Workaround:

In the filemanager, go to:

/domains/domain.com/.htpasswd/public_html/path

and set the permissions on the .htpasswd file to 644.

phpmyadmin version errors fixed

https://forum.directadmin.com/showthread.php?p=20065

Fix phpMyAdmin version in the install script.

Note that we now use a symbolic link from /var/www/html/phpMyAdmin to the appropriate phpMyAdmin version directory. If you're changing phpMyAdmin versions, the aliases in your /etc/httpd/conf/httpd.conf will need to be updated.

Ticket system shows "today" for all date with same day of month fixed

Havn't confirmed this yet.. report is that the time in the ticket/message system reports "today" for all days with the same day of month.

Copy User backup data as different user when creating backup fixed

If the user already has all of his space used up, he won't be able to create a backup file. If a Reseller tries to create a backup, the User's username is used so the backup would exceed the alloted space allowed. This fix will copy the data as root, but still compess the tar.gz if the user is doing the backup. If the Reseller does the backup, then the tar.gz will be compressed as root, as it's always been.

Last Updated: