lang}/mods/portal/" */ public $language = 'portal_tl_menu_module'; /** * custom acp template * file must be in "adm/style/portal/" */ public $custom_acp_tpl = 'acp_portal_links'; /** @var bool Can include this module multiple times */ protected $multiple_includes = true; /** * constants */ const LINK_INT = 1; const LINK_EXT = 2; /** @var \phpbb\config\config */ protected $config; /** @var \phpbb\db\driver\driver_interface */ protected $db; /** @var \phpbb\request\request */ protected $request; /** @var \phpbb\template\template */ protected $template; /** @var string PHP file extension */ protected $php_ext; /** @var string phpBB root path */ protected $phpbb_root_path; /** @var \phpbb\user */ protected $user; /** @var \phpbb\log\log phpBB log */ protected $log; /** * Construct a links object * * @param \phpbb\config\config $config phpBB config * @param \phpbb\db\driver\driver_interface $db phpBB db driver * @param \phpbb\request\request $request phpBB request * @param \phpbb\template\template $template phpBB template * @param string $phpEx php file extension * @param string $phpbb_root_path phpBB root path * @param \phpbb\user $user phpBB user object * @param \phpbb\log\log phpBB log */ public function __construct($config, $db, $request, $template, $phpbb_root_path, $phpEx, $user, $log) { $this->config = $config; $this->db = $db; $this->request = $request; $this->template = $template; $this->php_ext = $phpEx; $this->phpbb_root_path = $phpbb_root_path; $this->user = $user; $this->log = $log; } /** * {@inheritdoc} */ public function get_template_side($module_id) { global $config, $template; $template->assign_vars(array( 'EXAMPLE' => $config['board3_configname2_' . $module_id], )); return 'tl_menu.html'; } public function get_template_acp($module_id) { global $phpEx, $phpbb_root_path; return array( 'title' => 'ACP_CONFIG_MODULENAME', 'vars' => array( 'legend1' => 'ACP_MODULENAME_CONFIGLEGEND', 'board3_configname_' . $module_id => array('lang' => 'MODULENAME_CONFIGNAME', 'validate' => 'string', 'type' => 'text:10:200', 'explain' => false), 'board3_configname2_' . $module_id => array('lang' => 'MODULENAME_CONFIGNAME2', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true), ), ); } /** * API functions */ public function install($module_id) { return true; } public function uninstall($module_id, $db) { return true; } }