phpBB

Development Wiki

Build cfg template

From phpBB Development Wiki

Revision as of 23:44, 8 September 2008 by Highway of life (Talk | contribs)

Function: build_cfg_template();

Description

This function is used in the ACP to build configuration pages and cuts down on all the INPUT fields and allows you to create a simple array of all the fields you need to set, along with limits, validation, etc...

The main area to look at is the $display_vars['vars'] part of the array.

$display_vars['vars'][$config_key] => configuration_settings_array()

This last array is the key to the configuration settings.

Parameters

Key Description Valid Type
lang Text label
validate Expected data type
  • bool
  • int
  • lang
  • string
  • wpath
type Type of field
  • dimension
  • custom
  • password
  • radio
  • select
  • string
  • text
  • textarea
  • false
explain Show explain text
  • false
  • true
method A function inside your acp class to create screen output, generally used for optional elements <OPTION name=foo>FOO_LABEL</OPTION>
function A function not inside your acp class to create screen output, generally used for optional elements <OPTION name=foo>FOO_LABEL</OPTION>
params Input parameters to use with the function or method
append Any text that follows the form field

Examples