Dashboard > FarCry 5.0 Developers Guide (Fortress) > Home > Fortress Roadmap > Config refactoring
Added by Blair McKenzie , last edited by Blair McKenzie on Feb 26, 2008  (view change)
Labels: 
(None)

The new config structure is only supported by FarCry 5.0+

Overview

In previous versions of FarCry, config structures were defined by setting up structs in /system/dmConfig and stored as WDDX in the config table. In Fortress, config definition and storage has been refactored to use a content types and leverage the non-persistent Form Components and the WDDX formtool for capturing config data.

Implementation

farConfig (the content type)

The new content type stores the config key (i.e. application.config.key) and the WDDX of the form properties. On application start these values are loaded in to the application scope. If a given config form hasn't been instantiated (i.e. the key can't be found in the database) a config item is automatically created with the default values.

It's possible to change the config key. On application load, the values will be loaded with the new key, and be editable in the webtop. The old key will be reinitialised with the default values.

Don't rename a config to an existing key - there is no validation on key uniquness at the moment.

form components

To add a new config to the application:

  1. Create a form component prefixed with "config"
  2. Add config variables to the form as properties
  3. Add the attribute key="yourconfigkey" to the form component
  4. Update the app (?updateapp=1)

Depreciated config

The following configs are included FarCry by default:

  • General
  • Plugins
  • TinyMCE (only for backwards compatibility)

All others are depreciated and aren't included in a new install.

Updating

During an upgrade all existing configs are migrated, including depreciated ones. Supported configs are converted to use the new form components and are editiable. Depreciated and custom configs are stored as vanilla WDDX structs and are not editable.

A form component can be created for unsupported configs. If this form is in place when you attempt to edit the config, a full form will be provided for editing.

The update does not remove or change the depreciated config table. You can empty the farConfig table and re-run the update to migrate the configs as many times as necessary.
Powered by a free Atlassian Confluence Open Source Project License granted to FarCry CMS. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators