Current Record: conf.ini_file #25

conf.ini File Table of Contents conf.ini File Stand-alone Attributes Example 1: A simple conf.ini file Example 2: A more complex conf....

Current Record: conf.ini_file #25

conf.ini File Table of Contents conf.ini File Stand-alone Attributes Example 1: A simple conf.ini file Example 2: A more complex conf....

conf.ini_file

[Permalink]

conf.ini File

The conf.ini file is where most of the application-level configuration information is stored for a Xataface application. It contains information such as:

  • database connection information
  • which tables should appear in the tables menu.
  • preference settings
  • authentication settings
  • which add-on modules are to be used
  • output caching settings
  • history/undo settings
  • other misc settings.

Every conf.ini file must contain at least the following sections:

Name Description Version
_database Contains database connection info. all
_tables Contains a list of tables that are to be included in the navigation menu of the application. all

The following optional sections may also be included:

Name Description Version
_allowed_tables Specifies tables that should be explicitly allowed to override disallowed tables listed or matched in the _disallowed_tables section. 0.7
_auth Contains information about authentication. 0.6
_disallowed_tables A list of tables or patterns that match tables that should be blocked from being accessed directly through the application. By default any table beginning with an underscore, 'dataface_', or ending in '__history' are blocked. This prevents unintended access to some of the automatically created tables in Xataface. 0.7
_feed Configuration options for RSS feeds that are generated by the application. 1.0
_history Settings pertaining to the history feature (e.g. whether it has been enabled). 0.7
_index Settings for the full site search indexing. 1.0
_modules A list of modules that are enabled for this application. 1.0
_output_cache Output cache settings. Using output caching can dramatically improve performance for busier sites. 0.8
_themes A list of the themes that are to be applied to the application. 0.8
table_labels A list that defines friendly labels for displaying table names. Simiilar to the [_tables] section, but these tables do not appear in the application's navigation menu by default. This is also the only method to display friendly table names in the search index results as of Xataface 2.1 or prior. (See Editing Search Results >> How Do I change table names). Also see the label global directive in the fields.ini_file. all

Stand-alone Attributes

Stand-alone attributes for an INI file must appear at the beginning of the INI file (before any of the sections). The conf.ini may contain the following stand-alone attributes.

Name Description Values Version
cache_queries Enables query caching. Enabling this feature can yield drastic performance improvements especially on busy sites with large databases. boolean (0 or 1) 1.2
cache_queries_log Enables logging of query caching to the file /tmp/querylog.log so that you can tell whether your queries are being cached, and which ones are being cached. boolean (0 or 1) 1.2
default_action The default action to be performed if it is not explicitly specified in the query (e.g. 'list', 'find', 'edit'). Default is 'list'. string 0.6
debug If this is set to 1, then the application will run in debug mode which displays the available slots and blocks on the screen, along with some other debug information. 0 or 1 (default is 0) 0.6
default_browse_action The default action to perform in the details tab. E.g. When you click on the "details" tab there are a number of sub-tabs including 'view', 'edit', etc... . The default value for this directive is 'view'. If you want to go directly to the edit form when clicking on a record in list view, you would set default_browse_action to 'edit'. string 0.6
default_language The default language to use. This is the 2-digit ISO language code. If this value is not specified it defaults to the first language listed in the [languages] section. string (2-digit ISO language code) 0.6
default_limit The default limit (i.e. the number of records to show per page) if none is explicitly specified in the query. Default is 30. int 0.6
default_table The default table to show if none is specified by the query. If you do not define this value, then the first table in the [_tables] section is used. string 0.6
disable_session_ip_check Default behaviour automatically tracks the IP address of the user when they log in. If a request is made for a session from a different IP then the session is automatically destroyed and the user is logged out. boolean 1.3rc4
title A title for the application (appears in the browser title bar). string 0.6
usage_mode *DEPRECATED: No longer works in Xataface 2.0 or higher* The usage mode of the application. If this value is set to edit, then ajax inline editing is enabled (i.e. you can click on any value in the application to edit it inline. 'view' or 'edit' 0.6

Example 1: A simple conf.ini file

[_database]
    host="localhost"
    name="mydb"
    user="mydbuser"
    password="foo"
    
[_tables]
webpage_sites="Websites"
translations = "Translations"
packages="Packages"
users=Users
proof_jobs="Jobs"
webpage_status="Webpages Status"

Example 2: A more complex conf.ini file

;debug=1
;default_action=home
;google_translate_url="http://weblite-dns2.com/proxy.php"
google_translate_url="http://ec2-75-101-244-123.compute-1.amazonaws.com/proxy.php"
title="Web Lite Translate"
default_price_per_word=0.15

;;Configuration settings for application
title="translation_weblite_ca"
scriptUrl="http://translation.weblite.ca/index.php"
multilingual_content=1

[_database]
    host="localhost"
    name="mydb"
    user="mydbuser"
    password="foo"
    
[_tables]
    webpage_sites="Websites"
    translations = "Translations"
    packages="Packages"
    users=Users
    proof_jobs="Jobs"
    webpage_status="Webpages Status"

[_auth]
    users_table=users
    username_column=username
    password_column=password
    secret_code="ljkasdfjkldsafliasdoiudsfoi"
    allow_register=1
    session_timeout=999999999
    
[_modules]
    modules_ShoppingCart="modules/ShoppingCart/ShoppingCart.php"

[ShoppingCart_taxes]
    ;; This section is necessary to declare that we have NO taxes.
    
[metatags]
    keywords = "translation, translate"
    description = "Good translation service"
    
;[_output_cache]
;    enabled=1

[_mail]
    func=mail2
    
blog comments powered by Disqus
Powered by Xataface
(c) 2005-2024 All rights reserved