lang}/mods/portal/" */ public $language = array( 'vendor' => 'talonos/b3pmchat', 'file' => 'common', ); /** @var \phpbb\config\config */ protected $config; /** @var \phpbb\template\template */ protected $template; /** @var \dmzx\mchat\core\functions */ protected $functions; /** @var \dmzx\mchat\core\mchat */ protected $mchat; /** @var \phpbb\controller\helper */ protected $helper; /** @var \phpbb\user */ protected $user; /** @var string */ protected $php_ext; /** * * * @param \phpbb\config\config $config phpBB config * @param \phpbb\template\template $template phpBB template * @param \dmzx\mchat\core\functions $functions * @param \dmzx\mchat\core\mchat $mchat * @param \phpbb\controller\helper $helper * @param \phpbb\user $user * @param string $php_ext * @param \phpbb\auth\auth $auth */ public function __construct($config, $template, \dmzx\mchat\core\functions $functions, \dmzx\mchat\core\mchat $mchat, \phpbb\controller\helper $helper, \phpbb\user $user, $php_ext) { $this->config = $config; $this->template = $template; $this->functions = $functions; $this->mchat = $mchat; $this->helper = $helper; $this->user = $user; $this->php_ext = $php_ext; } public function get_template_center($module_id) { $this->mchat->page_index(); $this->template->assign_vars(array( 'S_DISPLAY_MCHAT_PORTAL_PLACEHOLDER' => ($this->config['mchat_on_portal']) ? true : false, )); return '@talonos_b3pmchat/mchat_portal.html'; } public function get_template_acp($module_id) { return array( 'title' => 'PORTAL_MCHAT_TITLE', 'explain' => true, 'vars' => array( 'legend1' => 'PORTAL_MCHAT_TITLE', 'mchat_on_portal' => array('lang' => 'PORTAL_MCHAT_TITLE', 'validate' => 'string', 'type' => 'radio:yes_no', 'explain' => true), ) ); } /** * API functions */ public function install($module_id) { $this->config->set('mchat_on_portal', 1); return true; } public function uninstall($module_id, $db) { $this->config->delete('mchat_on_portal'); return true; } }