1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 03:04:09 +02:00

[feature/avatars] Rewrite drivers to use full class name

* Use full driver class name as avatar_type value
* Move avatar drivers to core namespace
* Make avatars installable through extensions

PHPBB3-10018
This commit is contained in:
Igor Wiedler
2012-06-27 21:02:07 +02:00
parent 13f4bfabbe
commit df16bd1c49
9 changed files with 68 additions and 38 deletions

View File

@@ -119,4 +119,25 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
{
return true;
}
/**
* @inheritdoc
**/
public function is_enabled()
{
$driver = preg_replace('#^phpbb_avatar_driver_core_#', '', get_class($this));
return $this->config["allow_avatar_$driver"];
}
/**
* @inheritdoc
**/
public function get_template_name()
{
$driver = preg_replace('#^phpbb_avatar_driver_core_#', '', get_class($this));
$template = "ucp_avatar_options_$driver.html";
return $template;
}
}