DokuWiki Installer


This page assists in the first time installation and configuration of Dokuwiki. More info on this installer is available on it's own documentation page.

DokuWiki uses ordinary files for the storage of wiki pages and other information associated with those pages (e.g. images, search indexes, old revisions, etc). In order to operate successfully DokuWiki must have write access to the directories that hold those files. This installer is not capable of setting up directory permissions. That normally needs to be done directly on a command shell or if you are using hosting, through FTP or your hosting control panel (e.g. cPanel).

This installer will setup your DokuWiki configuration for ACL, which in turn allows administrator login and access to DokuWiki's admin menu for installing plugins, managing users, managing access to wiki pages and alteration of configuration settings. It isn't required for DokuWiki to operate, however it will make Dokuwiki easier to administer.

Experienced users or users with special setup requirements should use these links for details concerning installation instructions and configuration settings.

For security reasons this script will only work with a new and unmodified Dokuwiki installation. You should either re-extract the files from the downloaded package or consult the complete Dokuwiki installation instructions

driven by DokuWiki powered by PHP
Enumeration Custom Fields with Dynamic Possible Values [Mantis Bug Tracker Wiki]

User Tools

Site Tools


Enumeration Custom Fields with Dynamic Possible Values


Starting with Mantis 1.1.0rc1, it is possible to define enumeration custom fields that have a dynamic set of possible values. The possible values are constructed via a custom function. The implementation of the custom function can depend on the context (current project, current user, current user's access level).

Usually when an enumeration custom field is defined, the possible values are defined as “A|B|C” (without the quotes). For dynamic possible values, an identifier is specified that specifies to Mantis which custom function to use. The ones that are already defined are “=categories”, “=versions”, “=future_versions”, “=released_versions” (again without the quotes).

How to do it?

If the user selects “=versions”, the actual method that is used is custom_function_*_enum_versions(). The reason why the “enum_” is not included is to have a fixed prefix for all custom functions used for this purpose and protect against users using custom functions that were not intended for this purpose. For example, you don't want the user to use custom_function_*_issue_delete_notify() which may be overridden by the web master to delete associated data in other databases.

Following is a sample custom function that is used to populate a field with the categories belonging to the currently selected project:

# --------------------
# custom_function_api.php
# Construct an enumeration for all categories for the current project.
# The enumeration will be empty if current project is ALL PROJECTS.
# Enumerations format is: "abc|lmn|xyz"
# To use this in a custom field name "=categories" in the possible values field.
function custom_function_override_enum_categories() {
    $t_categories = category_get_all_rows( helper_get_current_project() );
    $t_enum = array();
    foreach( $t_categories as $t_category ) {
        $t_enum[] = $t_category['category'];
    $t_possible_values = implode( '|', $t_enum );
    return $t_possible_values;

Notice the following:

  • The custom function doesn't take any parameters.
  • The custom function returns the possible values in the format (A|B|C).
  • The custom function uses the current project.
  • The custom function builds on top of the already existing APIs.

To define your own function for custom field (name = “mine”), you will have to define it with the following signature:

# --------------------
# To use this in a custom field name = "mine" in the possible values field.
function custom_function_override_enum_mine() {
    $t_enum = array();
    $t_possible_values = implode( '|', $t_enum );
    return $t_possible_values;

Notice “override” in the function name. This is because this method is defined by the Mantis adminstrator/webmaster and not part of the Mantis source. It is OK to override a method that doesn't exist.

As usual, when you upgrade Mantis to future releases, your custom functions will not be overwritten. The difference between the “default” implementation and the “override” implementation is explained in more details in the manual.

mantisbt/dynamic_enum_custom_fields.txt · Last modified: 2009/04/21 03:36 by ckchan