/** * Display attention item list. * * @return \Symfony\Component\HttpFoundation\Response */ public function display_list() { $this->user->add_lang('mcp'); if (!$this->check_auth()) { return $this->helper->needs_auth(); } $type = $this->request->variable('type', ''); $closed = $this->request->variable('closed', false); $open = $this->request->variable('open', false) || !$closed; switch ($type) { case 'reported': $type = TITANIA_ATTENTION_REPORTED; break; case 'unapproved': $type = TITANIA_ATTENTION_UNAPPROVED; break; default: $type = false; break; } $options = array('attention_type' => $type, 'display_closed' => $closed, 'only_closed' => !$open && $closed); \attention_overlord::display_attention_list($options); $this->template->assign_vars(array('S_ACTION' => $this->helper->route('phpbb.titania.manage.attention'), 'S_OPEN_CHECKED' => $open, 'S_CLOSED_CHECKED' => $closed)); // Subscriptions $this->subscriptions->handle_subscriptions(TITANIA_ATTENTION, 0, $this->helper->route('phpbb.titania.manage.attention')); $this->display->assign_global_vars(); $this->generate_navigation('attention'); return $this->helper->render('manage/attention.html', $this->user->lang['ATTENTION']); }
/** * Display queue. * * @return \Symfony\Component\HttpFoundation\Response */ public function display_queue($queue_type) { $this->set_type($this->types->type_from_url($queue_type)); if (!$this->type->acl_get('view')) { return $this->helper->needs_auth(); } $tag = $this->request->variable('tag', 0); // Subscriptions if (!$tag) { $this->subscriptions->handle_subscriptions(TITANIA_QUEUE, $this->type->id, $this->helper->get_current_url(), 'SUBSCRIBE_QUEUE'); } else { $this->subscriptions->handle_subscriptions(TITANIA_QUEUE_TAG, $tag, $this->helper->get_current_url(), 'SUBSCRIBE_CATEGORY'); } \queue_overlord::display_queue($this->type->id, $tag); \queue_overlord::display_categories($this->type->id, $tag); $this->display->assign_global_vars(); $this->generate_navigation('queue'); // Add to Breadcrumbs $this->display->generate_breadcrumbs(array($this->type->lang => $this->get_queue_url($this->type->id))); return $this->helper->render('manage/queue.html', 'VALIDATION_QUEUE'); }
/** * Details page. * * @return \Symfony\Component\HttpFoundation\Response */ protected function details() { $this->contrib->get_download(); $this->contrib->get_revisions(); $this->contrib->get_screenshots(); $this->contrib->get_rating(); $this->contrib->assign_details(); if (!$this->user->data['is_bot']) { $this->contrib->increase_view_counter(); } // Set tracking $this->tracking->track(TITANIA_CONTRIB, $this->contrib->contrib_id); // Subscriptions $this->subscriptions->handle_subscriptions(TITANIA_CONTRIB, $this->contrib->contrib_id, $this->contrib->get_url(), 'SUBSCRIBE_CONTRIB'); // Canonical URL $this->template->assign_var('U_CANONICAL', $this->contrib->get_url()); return $this->helper->render('contributions/contribution_details.html', $this->contrib->contrib_name . ' - ' . $this->user->lang['CONTRIB_DETAILS']); }
/** * Display support page. * * @param string $contrib_type Contrib type URL identifier. * @param string $contrib Contrib name clean. * * @return \Symfony\Component\HttpFoundation\Response */ public function display_support($contrib_type, $contrib) { $this->load_contrib($contrib_type, $contrib); if (!$this->check_auth()) { return $this->helper->needs_auth(); } $this->user->add_lang('viewforum'); // Subscriptions $this->subscriptions->handle_subscriptions(TITANIA_SUPPORT, $this->contrib->contrib_id, $this->contrib->get_url('support'), 'SUBSCRIBE_SUPPORT'); // Mark all topics read if ($this->request->variable('mark', '') == 'topics') { $this->tracking->track(TITANIA_SUPPORT, $this->contrib->contrib_id); } $can_post_topic = $this->ext_config->support_in_titania && $this->auth->acl_get('u_titania_topic'); $data = \topics_overlord::display_forums_complete('support', $this->contrib); $data['sort']->set_url($this->contrib->get_url('support')); $this->template->assign_vars(array('U_POST_TOPIC' => $can_post_topic ? $this->contrib->get_url('posting') : '', 'U_MARK_TOPICS' => $this->contrib->get_url('support', array('mark' => 'topics')), 'U_CANONICAL' => $data['sort']->build_canonical(), 'S_DISPLAY_SEARCHBOX' => true, 'S_SEARCHBOX_ACTION' => $this->helper->route('phpbb.titania.search.results'), 'SEARCH_HIDDEN_FIELDS' => build_hidden_fields(array('type' => TITANIA_SUPPORT, 'contrib' => $this->contrib->contrib_id)))); $this->assign_vars(); return $this->helper->render('contributions/contribution_support.html', $this->contrib->contrib_name . ' - ' . $this->user->lang['CONTRIB_SUPPORT']); }