Version 1.23.0
Released: 2004-10-11
new
If-Then-Else in skins and all templatesBasic if-then-else tool for skin designers. Very useful for hiding buttons. This method is preferred to running a php script because there is significantly less overhead. This can also be used in any template, allowing for more flexibility with almost everything.
examples:
|*if DOMAIN|
<a href="http://|DOMAIN|">Link to |DOMAIN|</a>
|*else|
Sorry, no domain to click
|*endif|
|*if !DOMAIN|
you have no domain!
|*endif|
|*if USERNAME="bob"|
Hi bob!
|*endif|
|*if USERNAME=USER|
Are you working on yourself?
|*endif|
Numbers are also supported:
|*if "1">"2"|
like this will ever happen!
|*else|
yeah, thats more like it
|*endif|
operators are:
= != > < >= <=
with = and !=, they'll be evaluated as strings. All others require numbers (decimal points allowed).
You can either use tokens, or a string on either side of the operation. Numbers should always be in quotes or they'll be evaluated as tokens.
You can assign tokens inside if-then-else statements:
|*if "1">"2"|
|?STR=something is going on here..|
|*else|
|?STR=all is well|
|*endif|
The result is: |STR|
For more advanced operations, such as && or ||, see this guide:
http://help.directadmin.com/item.php?id=324
new
spf record format changechanged
domain.com. IN TXT "v=spf1 ~all"
to
domain.com. IN TXT "v=spf1 a mx ip4:12.34.56.78 ~all"
The format of the line in the named.db template is:
|DOMAIN|. IN TXT "v=spf1 a mx ip4:|SERVER_IP| ~all"
The |SERVER_IP| token is not available until 1.22.7 and higher.
new
CMD_API_SHOW_USER_USAGEApi to show the usage for the current user. Just dumps the user.usage file into a url encoded array. Same as CMD_API_SHOW_USER_USAGE?user=username, except this can be called by users when "user" is not included.
new
Spamassassin added to account packages (SKINS)For all forms, the value passed will be "spam=ON", or nothing at all (checkbox).
It's added to all pacakges screens (reseller and user packages) as well as the modify reseller/user screens and the create customized user/reseller.
echo "action=addspam" >> /usr/local/directadmin/data/task.queue
will be run during the update to add spam=ON to all packages, users and resellers so that it's on by default. You can then uncheck it if you don't want it. It will also be hidden from the skin if it's off.
USERSPAM is now a global token for users
RESELLERSPAM is now a global token for resellers.
They'll be set to ON or OFF.
|*if USERSPAM="ON"|
spam html
|*endif|
will be used to hide spamassassin items.
Download the skins and view the CHANGELOG file to see which files have been modified.
http://www.directadmin.com/power_user.tar.gz
http://www.directadmin.com/default.tar.gz
http://www.directadmin.com/enhanced.tar.gz
new
Admin Log Viewer (SKINS)Interface for admins to view system logs from the admin panel.
The list is in /usr/local/directadmin/data/templates/logs.list
If you'd like to customize the list, copy is to the custom directory and make the changes there.
SKINS:
files_admin.conf
CMD_LOG_VIEWER=admin/log_viewer.html
Create a link to /CMD_LOG_VIEWER in the Admin Panel.
new file: admin/log_viewer.html
fixed
changed file permission of ~/.spamassassin/spamFor the spam folder in /home/username/.spamassassin/spam, the file permission is changed to:
-rw-rw---- mail username spam
Also, the filter_spamfolder template now looks like (added 660):
if
$h_X-Spam-Status: contains "Yes"
then
save |HOME|/.spamassassin/spam 660
finish
endif
fixed
Language is changing when admin change his own skinWhen an admin/reseller account modifies himself and changes his own skin, then language was also being set to it thus preventing the skins language packs from being read.
Workaround if an admin has the wrong language set (will see "none" all over the place):
Edit /usr/local/directadmin/data/users/admin/user.conf and set "language=en"
fixed
Restore large backups can't get to the "restore options" page.The process that DA uses to get the options to display to the user before restoring a backup file is to run "tar tzf" on it. This will create a list of files which DA can then read in and figure out what's there to be restored.
When a tar file (in one example) has upwards of 20,000 files, the standard method of reading in a file has to be optimized a certain way. This fix does that. The fix also will find any new domains to be added during the "restore options" page, so that all checkboxes can be selected, even for data that belongs to a domain that has not yet been added to DA (but exists in the backup).
fixed
Reseller list is emptyBug where adding admin creates a new empty reseller.list file. To rebuild it, just run:
grep usertype=reseller /usr/local/directadmin/data/users/*/user.conf | cut -d/ -f7 > /usr/local/directadmin/data/admin/reseller.list
chown diradmin:diradmin /usr/local/directadmin/data/admin/reseller.list
chmod 600 /usr/local/directadmin/data/admin/reseller.list
Once the list is rebuilt, then a tally will recount all the stats.
echo "action=tally&value=all" >> /usr/local/directadmin/data/task.queue
fixed
Charset EncodingFollowing this thread:
https://forum.directadmin.com/threads/2675
Removed the encoding of characters above 127, which should allow any charset to work, assuming the charset is set in the browser/skin.