1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[feature/avatars] Create setting for enabling avatar in manager

PHPBB3-10018
This commit is contained in:
Marc Alexander
2012-11-30 23:11:44 +01:00
parent 33b98dc5ba
commit 081440f6c4
7 changed files with 31 additions and 69 deletions

View File

@@ -201,4 +201,20 @@ class phpbb_avatar_manager
return $this->config["allow_avatar_{$config_name}"];
}
/**
* Get the settings array for enabling/disabling an avatar driver
*
* @param string $driver Avatar driver object
*
* @return array Array of configuration options as consumed by acp_board
*/
public function get_avatar_settings($driver)
{
$config_name = preg_replace('#^phpbb_avatar_driver_#', '', get_class($driver));
return array(
'allow_avatar_' . $config_name => array('lang' => 'ALLOW_' . strtoupper($config_name), 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
);
}
}