auth = $auth; $this->config = $config; $this->request = $request; } /** * Get an array of disallowed forums * * @param bool $disallow_access Whether the array for disallowing access * should be filled * @return array Array of forums the user is not allowed to access */ public function get_disallowed_forums($disallow_access) { if ($disallow_access == true) { $disallow_access = array_unique(array_keys($this->auth->acl_getf('!f_read', true))); } else { $disallow_access = array(); } return $disallow_access; } /** * Generate select box * * @param string $key Key of select box * @param array $select_ary Array of select box options * @param array $selected_options Array of selected options * * @return string HTML code of select box * @access public */ public function generate_select_box($key, $select_ary, $selected_options) { // Build options $options = ''; return $options; } /** * Generate forum select box * * @param string $value Value of select box * @param string $key Key of select box * * @return string HTML code of select box * @access public */ public function generate_forum_select($value, $key) { $forum_list = make_forum_select(false, false, true, true, true, false, true); $selected_options = $select_ary = array(); if(isset($this->config[$key]) && strlen($this->config[$key]) > 0) { $selected_options = explode(',', $this->config[$key]); } // Build forum options foreach ($forum_list as $f_id => $f_row) { $select_ary[] = array( 'value' => $f_id, 'title' => $f_row['padding'] . $f_row['forum_name'], 'disabled' => $f_row['disabled'], ); } return $this->generate_select_box($key, $select_ary, $selected_options); } /** * Store selected forums * * @param string $key Key name * * @return null * @access public */ public function store_selected_forums($key) { // Get selected extensions $values = $this->request->variable($key, array(0 => '')); $news = implode(',', $values); $this->config->set($key, $news); } }