In the include file that has all of the component registration information, you'll also need to have the following constant defined:
( Example from BPI component):
Code: Select all
COMPONENT_CONFIGFUNCTION => "bpi_component_config_func",Then in that function you'll need it to be something like this:
Code: Select all
function bpi_component_config_func($mode="",$inargs,&$outargs,&$result)
{
$result=0;
$output="";
switch($mode)
{
case COMPONENT_CONFIGMODE_GETSETTINGSHTML:
//the web form to handle config options
break;
case COMPONENT_CONFIGMODE_SAVESETTINGS:
//config validation and save to xi_options
break;
}
return $output;
}Use XI's built-in "get_option()" and "set_option()" functions to store arbitrary config options in the postgresql database.