ATK Configuration
From Achievo/ATK Wiki
Below is a categorized list of configuration options. This page is far from complete. If you encounter a configuration value in ATK that is not listed here, please help us improve the documentation by adding it.
Within a category, the options are listed alphabetically.
- $config_identifier = "atkapp";
- Unique application identifier. Set this when using multiple applications within one website
Contents |
Database Configuration
- $config_db["default"]["driver"]
- Which database driver to use
- Possible values :
- mysql - All MySQL versions since 3.23
- mysqli - not supported?
- mysql41 - MySQL 4.1+. On top of the "mysql" driver, this one has transaction support. (requires PHP5, mysqli extension)
- mssql - not supported?
- oci805 - Oracle 8.0.5
- oci8 - All Oracle 8i versions
- oci9 - Oracle9i+ (also works for 10G)
- pgqsl - PostgreSQL 7.1+
- db2 - not supported?
- i5 - not supported?
- Default : mysql
- $config_db["default"]["host"] = "localhost";
- Specify the hostname of the database server
- $config_db["default"]["db"] = "genbydb";
- $config_db["default"]["user"] = "admin";
- $config_db["default"]["password"] = "";
- $config_edit_fieldprefix
- This configoption sets the default fieldprefix for all fields in all nodes to use in ATK. If you only want to use the fieldprefix for some of the nodes in your ATK application use the setEditFieldPrefix method of the atknode class instead.
- Possible values : Text with the fieldprefix
- Default : N/A
Debugger Configuration
- $config_debug = 0;
- The debug level.
- -1 - No debug printed, no debug info collected
- 0 - No debug information printed, but still collected for error reports
- 1 - Print some debug information at the bottom of each screen
- 2 - Print debug information, and pause before redirects
- 3 - Like 2, but also adds trace information to each statement
- $config_mailreport = "";
- The automatic error reporter. Error reports are sent to the given email address. If you set this to "", error reporting will be turned off. WARNING: DO NOT LEAVE THIS TO THE DEFAULT ADDRESS OR PREPARE TO BE SEVERELY FLAMED!
GUI Configuration
- $config_defaulttheme
- The theme defines the layout of your application. You can see which themes there are in the directory atk/themes.
- $config_force_theme_recompile = true;
- The themecompiler caches all theme settings for performance reasons. This means that when you make changes to a themedefinition, they won't actually be used unless the cache is removed and the themecompiler is forced to recompile. It is always advisable to turn on the $config_force_theme_recompile (ATK>=5.03)config option when working on themes, this will reduce performance but also ensure that the themecompiler will recompile the themecache for every reload, thus always giving you the current and correct themedefinitons. Or you could also just remove the themecache, just use 'rm -rf atktmp/themes' in your application root (with atktmp being the name of the temporary directory). You must have the rights to do this though (only root and the webserver user should have this right).
- $config_fullscreen = false;
- If the users are using IE, then the application can be run in fullscreen mode.
- $config_language="en";
- The language of the application. You can use any language for which a language file is present in the atk/languages directory.
- $config_manytoone_autocomplete_minchars
- The number of characters a user must type before a manytoonerelation starts to do autocompletion
- Possible values : Number higher than 0
- Default : 2
- $config_menu_align
- how the menu aligns. This is not a standard config variable, so you can't find it in config.inc.php
- Possible values : left, center, right
- Default : center
- $config_menu_delimiter = "[value]";
- If you use a horizontal menu (top or bottom, you may want to change the menu_delimiter to " " (menu_delimiter is what atk puts between menu items).
- Posible values : <br>, " ", pretty much anything.
- $config_menu_layout
- A theme defines which menus it supports. (because the layout is very theme specific so it doesn't support all of them). If a theme supports multiple menu's, then you can choose one by defining $config_menu_layout. However, if a menu is selected that is not supported by the theme, the theme will fallback to the first menu it does support.
- Possible values : Set by $theme['compatible_menus'] in themedef.inc
- Default : first menu supported by the theme.
- $config_menu_pos = "left";
- You can have a menu at "top", "left", "right" or "bottom".
- $config_recordlist_icons = true;
- $config_recordlistorientation
- Place the recordlist action icons on the left or right of recordlists.
- Possible values : right, left, both
- Default : right
- $config_recordlistvorientation
- Place the column headers (fieldname, searchfields etc.) at the top or bottom of recordlists.
- Possible values : top, bottom, both
- Default : top
- $config_recordsperpage
- The number of records to display in a list of records. If there are more records than this number, previous/next links and page numbers will be added.
- Possible values : positive number
- Default : 25
- $config_top_frame = 1;
- If you have a menu at either left or right, you can add an extra topframe by setting the following option to 1. If you set it to 1, you must provide a "top.php" file in your application directory.
- $config_defaultfavico
- Display a favicon in the the browser's address field
- Enter path and filename of the favicon image file, e.g. $config_defaultfavico = "./favicon.ico";
- See Adding_a_favicon.
Security Configuration
- $config_administratorpassword = "demo";
- If you specify an administrator password here, you are always able to login using user 'administrator' and the specified password, regardless of the type of authentication used! if you set it to nothing (""), administrator login is disabled, and only valid users are allowed to login (depending on the type of authentication used).
- $config_application_root = "/";
- The application root if you're using urlrewrites within your httpd or htaccess configuration i think this should be '/' be careful with this setting because it could create a major securityhole. It is used to set the cookiepath when using PHP sessions.
- $config_auth_enablepasswordmailer = true;
- This will put an extra button on the longin screen to have a password sent to the email address regered for the username entered. Of note, the following options must also be set for this to work:
- $config_auth_usernode = "module.nodename";
- $config_auth_usertable = "user_tablename";
- $config_auth_userfield = "username_fieldname";
- $config_auth_emailfield = "useremail_fieldname";
- $config_auth_passwordfield = "userpassword_fieldname";
- Possible values : True
- Default : N/A
- $config_auth_mail_server = "localhost";
- Mail server name
- $config_auth_mail_port = 143;
- Port of the mail server (default is 110 (pop3) but you can set it to 143 (imap) or something else.
- $config_auth_ldap_host = "";
- if you use "ldap" as authentication, these parameters are nessesary
- $config_auth_ldap_context = "";
- if you use "ldap" as authentication, these parameters are nessesary
- $config_auth_usertable = "lesson5_employee";
- If you use "db" as authentication type, you can set the table and fields from which atk should read the username and password information.
- $config_auth_userfield = "login";
- If you use "db" as authentication type, you can set the table and fields from which atk should read the username and password information.
- $config_auth_passwordfield = "password";
- If you use "db" as authentication type, you can set the table and fields from which atk should read the username and password information.
- $config_auth_leveltable = "lesson5_employee";
- If you work with groups/levels you need these parameters
- $config_auth_levelfield = "profile_id";
- If you work with groups/levels you need these parameters
- $config_auth_accesstable = "lesson5_accessright";
- If you work with groups/levels you need these parameters
- $config_auth_loginform = true;
- Setting this to true will make ATK use a loginform instead of a browser popup.
- If set to false, login info should be set in:
$_SERVER["PHP_AUTH_USER"] = "username"; $_SERVER["PHP_AUTH_PW"] = "password";
- $config_authentication = "none";
- The type of authentication (user/password verification) to use. Currently supported are:
- "none" - no authentication
- "config" - users / passwords are set in this configfile
- "db" - users / passwords are stored in a table in the database.
- "imap" - users / passwords are stored in the IMAP server
- "pop3" - users / passwords are stored in the POP3 server
- "ldap" - users / passwords are stored in an LDAP server
- "server" - authentication is done by the webserver (.htaccess)
- if you need to use multiple authentication types list them delimited by comma
- $config_auth_loginpage = 'http://myurl';
- For applications that do not want to use the atk login form or the htaccess box this config variable can contain an url to redirect to instead of displaying the login form of ATK.
- Possible values : Text with the url
- Default : N/A
- $config_auth_mail_virtual = false;
- if you use "pop3" or "imap" as authentication, you have to fill in this parameter. Set this to true if you have virtual mail domains. Atk will append '@' and the config_auth_mail_suffix to the login name.
- $config_auth_mail_suffix = "yourdomain.com";
- if you use "pop3" or "imap" as authentication, you have to fill in this parameter. Mail suffix, if mail_virtual is set to true.
- $config_authentication_cookie = false;
- If set to true, a cookie with username/password is written, so users will stay logged in, even if they close their browser.
- $config_authentication_cookie_expire = 10080;
- The 'authentication cookie' lifetime in seconds.
- $config_authentication_md5 = true;
- This parameter specifies whether the passwords are stored as an md5 string in the database / configfile / whatever. If set to false, the passwords are assumed to be plain text. Note: Not all authentication methods support md5! e.g, if you use pop3 authentication, set this to false. Note2: If set to false, and authentication_cookie is set to true, the password in the cookie will be stored plaintext!!!
- $config_authorization = "none";
- The type of authorization (what is a user allowed to do?) Normally this will be the same as the authentication, but in special cases like POP3 authentication you might want to authorize via a table in the database. NOTE, the following options are only useful if authentication is not set to "none".
- $config_logging = 0;
- $config_logfile = "/tmp/atk-security.log";
- Atk can write security events to a logfile. There are several values you can choose for $config_logging.
- 0 - No logging
- 1 - Log logins
- 2 - Log actions ("User x performed action x on module y")
- $config_max_loginattempts = 5;
// Configure password restricitons
- $config_password_minsize = 0;
- $config_password_minupperchars = 0;
- $config_password_minlowerchars = 0;
- $config_password_minalphabeticchars = 0;
- $config_password_minnumbers = 0;
- $config_password_minspecialchars = 0;
- $config_restrictive = true;
- If config_restrictive is set to true, access is denied for all features for which no access requirements are set. If set to false, access is always granted if no access requirements are set.
- $config_securityscheme = "group";
- The security scheme is used to determine who is allowed to do what. Currently supported:
- "none" - anyone who is logged in may do anything.
- "level" - users have a certain level, and certain features of the application require a minimum level.
- "group" - users belong to a group, and certain features may only be executed by a specific group.
If you have config_authentication set to "config", you may now specify a set of usernames and passwords (in plain text).
Example: atkConfig::addUser("harry","password");
If securityscheme is "level" or "group", you may also specify the level or group as third parameter: atkConfig::addUser("harry","password",3); atkConfig::addUser("harry","password","admins");
Document Writer Configuration
- $config_doctemplatedir = "doctemplates/";
- For document attributes, ATK automatically searches for template documents in a specific directory. The base directory to search in can be specified below. The document templates must be put in a specific directory structure under this base directory: first of all a subdirectory must be made for every module for which you want to include document templates (equal to the modulename of that module, as set in config.inc.php). Then a subdirectory in that directory must be made according to the name of the node for which you want to include document templates. In this subdirectory you can put your document template files. So if you have $config_doctemplatedir set to "doctemplates/", then you can put your documents in "doctemplates/modulename/nodename/".
Data Internationalization Configuration
- $config_supported_languages = array("EN","NL","DE");
- $config_defaultlanguage="EN";
- $config_use_atkerrorhandler = false;
Meta Node Configuration
- $config_meta_caching = true or false
This option controls the caching of atkmetanode definitions.
During development it is good to have this turned off so that atk does not generate metanode cache entries. If this is not done changes to the metanode definitions may not be reflected in the application until the contents of the atktmp/meta and atktmp/tablemeta (cache) directories are cleared. In a production environment where there are no changes in atk metanode definitions , the cached definitions will provide much better performance.