lang}/mods/portal/" */ public $language = 'portal_link_us_module'; /** @var \phpbb\config\config */ protected $config; /** @var \phpbb\template */ protected $template; /** @var \phpbb\user */ protected $user; /** * Construct a link us object * * @param \phpbb\config\config $config phpBB config * @param \phpbb\template $template phpBB template * @param \phpbb\user $user phpBB user object */ public function __construct($config, $template, $user) { $this->config = $config; $this->template = $template; $this->user = $user; } /** * {@inheritdoc} */ public function get_template_side($module_id) { //doing the easy way ;) $u_link = generate_board_url(); // Assign specific vars $this->template->assign_vars(array( 'LINK_US_TXT' => sprintf($this->user->lang['LINK_US_TXT'], $this->config['sitename']), 'U_LINK_US' => '<a href="' . $u_link . '" ' . (($this->config['site_desc']) ? 'title="' . $this->config['site_desc'] . '"' : '' ) . '>' . (($this->config['sitename']) ? $this->config['sitename'] : $u_link ) . '</a>', )); return 'link_us_side.html'; } /** * {@inheritdoc} */ public function get_template_acp($module_id) { return array( 'title' => 'LINK_US', 'vars' => array(), ); } }