Recent Changes - Search:



Wiki help.

Configuring the user-options in v0.8

This page supplements the documentation in the config.sample.php file. In case of conflict, the documentation in the latest version of config.sample.php is the correct version.

When upgrading your gtd-php installation, always check for new entries in config.sample.php, and if there are any, copy the new lines into your own config.php

Database settings

Some entries are specific to the mysql installation. The hostname, database name, MySQL user name and MySQL password will probably be the same as your previous GTD-PHP installation. If you're installing anew, rather than upgrading, the MySQL information will probably have been determined when you installed MySQL.

 $config = array(
"host"   => 'localhost', : the hostname of your database server
"db"     => '',          : the name of your database
"prefix" => 'gtdphp_',   : the GTD table prefix for your installation (optional)
"user"   => '',          : username for database access
"pass"   => '',          : database password
"dbtype" => 'mysql',     : database type: currently only mysql is valid.  DO NOT CHANGE!

The new entry in this first section is the prefix. This allows you to have more than one GTD-PHP installation in a single MySQL database, and also allows you to avoid any collisions between tables for this programme, and any other.

The prefix will be used on each table: so, for example, if you use the default prefix gtdphp_, then each table in the installation will start with gtdphp_; e.g. the preferences table will be called gtdphp_preferences. We recommend that you do not use capital letters in the prefix: you can use letters, numbers, underscore(_) and hyphen(-).

There are several new entries in the "Optional Settings" section:

$config["title"]          = 'GTD-PHP'; : site name (appears at the top of each page)
$config["datemask"]       = 'Y-m-d D'; : date format - required
$config["theme"]          = 'default'; : default | menu_sidebar
$config["title_suffix"]	  = false;     : adds filename to title tag
$config["trimLength"]     = 72;        : max visible length of descriptions when listing items
$config["firstDayOfWeek"] = 0;         : 0=Sunday, 1=Monday, ... 6=Saturday

The next section contains the shortcut keys. These take the format: "link name" => "access key", e.g. "item.php?type=p" => "p" means that shortcut key p can be used to access page item.php?type=p, which creates a new project.

Behaviour settings

The next section in the config file contains behaviour settings. These are more advanced configuation options, to change how GTD-PHP behaves. Each item is documented in the config.sample.php file.


$config['storeRecurrences'] can be true or false, and affects how repeating items are handled, when they are marked complete.

Let's say I've got to pay my telephone bill every 28 days, and it's due today (12 Nov). So I set up an action "pay phone bill" to repeat every 28 days, with a deadline of 2007-11-12. And then I pay the bill today, and mark the item complete.

If you've got $config['storeRecurrences']=false, then gtd-php will amend that action, and set the new deadline to be in 28 days time - 2007-12-10.

If you've got $config['storeRecurrences']=true, then gtd-php will amend that action, and set the completion date to today - 2007-11-12. It will then copy the action to a new action, give it the new deadline of 2007-12-10, and an empty completion date.

The resulting differences in the two methods are:

if $config['storeRecurrences']=false, then the itemId number (its internal id) will always stay the same, and when you view at the parent's report, you'll see the pending occurrence under "actions", but you won't see any competed occurrence under "completed actions";

whereas if $config['storeRecurrences']=true, then the itemId number (its internal id) will change each time the action is completed, and when you view at the parent's report, you'll see the competed occurrence under "completed actions", and the pending occurrence under "actions".

Note that it always calculates the new deadline by adding on the number of days to repeat after, to the date on which the action was completed.


gtd-php now has some javascript productivity-enhancers, such as the new parent-selector. If you might want to use these, set this value to true. You can always disable them on a browser-by-browser basis from the preferences screen. If you want to disable them on all browsers, set this value to false


The internationalisation table to use for pages. For Western European languages, this will typically be ISO8859-15. Given restrictions in PHP4 on handling multi-byte character sets, gtd-php 0.8 does not support UTF-8. Standard single-byte codepages work, but bear in mind that the codepage should match your MySQL database setting, and that, at least for now, the program's prompts will only be in English.


If you select Help - Report a Bug, then your version info for gtd-php, PHP and MySQL will be automatically inserted into the description on the ticket we use to track the bugs. This information is very useful in helping us fix bugs faster. If you do not wish to send this information, set this value to true.

Customize Weekly Review

Entirely optional: add custom items to the weekly review.

Advanced Settings

The $sort array contains the SQL strings to customise the order in which results are returned from specific SQL queries. Changing these to invalid values will prevent the queries running. Do not change unless you're absolutely sure you're familiar with the SQL queries you are editing. Be aware that we may change the names of aliases and fields in future versions, in which case, customised sort strings will break the query. For examples, see the sort cookbook.

Developer Settings

The debug value is generally for the developers of the application. You will probably want this to remain 0. See the documentation on debugging for more information

Documentation Advanced Topics Configuration Version08

Edit - History - Print - Recent Changes - Search
Page last modified on October 07, 2008, at 08:15 PM