Basics like how to use ssh, how to login to DA etc..How can I convert a unix timestamp into something readable?
Basics like how to use ssh, how to login to DA etc..How can I convert a unix timestamp into something readable? The UNIX timestamp is a number representing the number of seconds since 1970.
Most applications can use this value to keep track of what time it is.
If there you have a unix timestamp and need to see what time it represents, then you can create a basic php script to decode it for you.
Create a time.php in your public_html foler, and enter the following data:
<html>
<body onLoad=”document.form.time.focus();”>
<?
if (isset($_GET[‘time’]))
{
echo date(“r”, $_GET[‘time’]);
echo “<br><br>”;
}
?>
<form action=time.php method=GET name=form>
Timestamp: <input type=text name=time> <input type=submit>
</form>
</body>
</html>
Then view it through the web, enter the number and submit the form.
How can I edit all of the templates, messages, and default index.html pages?
If there you are looking to customize the look and feel to the data that is using for your users, this guide will explain where these files are, and how to go about editing them. (note that this does not apply to skins)
To edit the default index.html placeholder file that new domains will getting after being created, you will edit the index.html found in /home/reseller/domains/default/index.html, where the reseller is the name of the account that will create the User.
If a User creating a secondary domain in his account, this same path still applies (that of the User’s creator)
One level above that, when a new Reseller or Admin is being creating, this “default” directory is creating and filling with defaults.
After their account is created, they will use these files as mentioning above.
If you want to edit the default files that are copying into /home/reseller/domains/default, you can find these defaults in:
/usr/local/directadmin/data/templates/default
However, you must ensure to follow the “templates” editing guidelines, which will be discussed next.
Message and templates can be found in:
/usr/local/directadmin/data/templates
Files here are reading in, usually “tokenized” (variable swap with real values) and use for their respective purposes. Templates can be edited to customize the look and feel of this data, however there are few rules that need to be following to ensure your data stays intact.
The templates directory comes in the DirectAdmin update.tar.gz package,
so after each update of DirectAdmin, all files in the templates folder are overwrite. This allows the templates to stay updated to their latest version.
If you wish to make changes to these files, in order to prevent updates from overwriting your changes,
you simply first copy the template file that you wish to edit to the custom folder:
/usr/local/directadmin/data/templates/custom
then edit the copied file that’s in the custom folder. Files in the custom folder override the files in the templates folder.
For the first example of directory templates (like the default/index.html) if you want to customize the index.html for new Resellers,
then you must copy the whole directory (and it’s full contents) into the custom folder, eg:
/usr/local/directadmin/data/templates/custom/default/*
Please Note that the placeholder index.html for the domains own by a Reseller is taking from his creator, not his own default directory.
So if the”admin” where to create Reseller “bob”,
then bob’s own personal domains will grab the placeholder index.html from /home/admin/domains/default/index.html, and not his own default or the templates default.