Where does DirectAdmin get |domain| from

fazel3

Verified User
Joined
May 23, 2006
Messages
11
When you login as a user, say you only have one domain name in your account - where is the domain name that replaces the |domain| tag coming from?

I have a VPS on which I have created a test user, on my skin - the |domain| tag is replaced by 'none'.

Was wondering if any one can help me out! :)
 
Hello,

DA grabs it from the /usr/local/directadmin/data/users/username/domains.list if there is only 1 domain, else it displays a list for you to chose from.

Note that DA checks to make sure that the domain is valid before adding the token.. If an invalid domain is being used, DA should be adding an entry into your /var/log/directadmin/system.log that it's not a valid domain. This is a relatively new check, if you think the domain should be valid, let me know what the domain is.

John
 
Hello, thanks for your reply ... I was able to fix that particular problem :)

I am however struggling with another problem - is it possible to adjust the output that is sent to the template file?

I have highlighted my problem in the screenshot below to make it clearer:

www.pagesite.com/screen.jpg
 
That's hardcoded.

The only way to do that would be to use this guide:
http://help.directadmin.com/item.php?id=74

With the |TEXT| and |RESULT| tokens in the:
/usr/local/directadmin/data/skins/enhanced/template.html
file, for your own skin.

Eg, change:
PHP:
      <td valign="middle" align="center">
        <p align="center">|TEXT|</p>
      </td>
to:
PHP:
      <td valign="middle" align="center">
        <p align="center">
|$/usr/local/bin/php 
<?php 
$data = <<<END 
|TEXT| 
END; 
$data = str_replace("Password Changed", "You have changed your password", $data); 
echo $data; 
?> 
DONE|
</p>
      </td>
Which would changed any occurnces of "Password Changed" to "You have changed your password" in for the output of the password results in the template.html file.

Repeat the same steps for the |RESULT| token "Password Successfully changed".

John
 
Back
Top