Howto change default selected package items?

Richard G

Verified User
Joined
Jul 6, 2008
Messages
14,179
Location
Maastricht
If admin creates a new package, default there will be a list of items, like by default unlimited email, SSH access, SSL access.
However "Anonymous Ftp Accounts" and "DNS Control" are both not selected standard.

Now I would like to change some of these standard selected items, like I want SSH not selected by default, so I don't have to unselect it everytime I create a new package.

How can I change these default selections?

I tried changing /usr/local/directadmin/data/users/admin/user.conf and changing there SSH=ON to SSH=OFF, but that did not make any difference. So maybe I've got to look somewhere else?

If possible in such way that those settings are kept also when DA is updated.
 
You can use some javascript in the skin to select or unselect when the page loads.
 
Indeed, I don't know any javascript and don't want to use any for it. It must be setup somewhere in some template or script.
It would be better if we could get to know how to change it some default way by changing a template or script from Directadmin itself.
 
Since I had not looked at the skins I assumed the options list was probably generated by the DirectAdmin core and not editable.

But as it turns out the options list, at least for CMD_SHOW_RESELLER_PACKAGE, is editable and you can change what is selected by default. Of course you will need to edit this skin every time DirectAdmin updates every few months or you can chattr +i that particular file so that it cannot change.

Have a look at the skins tutorial for more information on the skin files.
 
Thanks. However I knew about this already, but it's only applicable for resellers. You can't change the default values for admin with that, neither serverwide.

So I presume you might be correct that it is done by core. In that case I think I'm going to make a suggestion to make these standard options user defined.

Suggestion made:
http://www.directadmin.com/forum/showthread.php?p=180089#post180089
 
Last edited:
CMD_SHOW_RESELLER_PACKAGE IS a admin function. I did not even look at what was available for resellers.
 
To change it for admins
/usr/local/directadmin/data/skins/enhanced/admin/show_reseller_package.html

To change it for resellers
/usr/local/directadmin/data/skins/enhanced/reseller/show_user_package.html
 
I see now I have to fix something within the skin files with that command, but it's not good when you have to change that every DA update.

So that's why I made the suggestion to make such option user definable (easy and definitive way).

Thanks though for giving this solution already.
 
You would not have to change the file every time if you made it immutable.
 
Yep, you already wrote that in one of your previous reply's (chattr command), but I'm a bit nervous to do that because I don't want to miss important updates or fixes which might come in the skins when DA updates.

However I changed the files now... so maybe I will use the chattr command at a later stage. I just have to keep a good eye on the changelog of DA updates then.
 
I believe there is an update page specific to skins since everyone who has custom skins would need to know about it.

You can also create a new skin based on a copy of the one you are using. Then it would be easy to compare the two.
 
Just copy the skin folder to another name and suddenly you have another skin that you can play with.
 
Back
Top