public function top_rating() { if (!$this->config['top_rating_integrate'] || !$this->config['top_rating_type'] && !isset($this->user->data['user_type'])) { return; } if ($this->config['top_rating_integrate'] == 1) { $this->template->assign_var('TOP_COUNT', $this->config['top_per_page']); $this->rating->view_top(array(), $this->config['top_per_page']); } else { if ($this->config['top_rating_integrate'] == 2) { $this->rating->view_cat(); } } if ($this->config['top_rating_anounce']) { $this->rating->view_announce(); } $this->template->assign_vars(array('U_MARK_FORUMS' => '', 'L_NO_FORUMS' => $this->config['top_rating_desc'])); }
public function rating() { if (!$this->config['top_rating_type'] && !isset($this->user->data['user_type'])) { trigger_error($this->user->lang['NOT_VIEW_RATING']); } $this->rating->view_cat(); $params = array('i' => '-bb3top-rating-ucp-ucp_rating', 'mode' => 'main', 'action' => 'add'); $add_new = append_sid($this->phpbb_root_path . 'ucp.' . $this->php_ext, $params); $this->template->assign_vars(array('DESCRIPTION' => $this->config['top_rating_desc'], 'U_ADD_PLATFORM' => $add_new, 'U_FOUM_ANNOUNCE' => append_sid("{$this->phpbb_root_path}viewforum.{$this->php_ext}", 'f=' . $this->config['top_rating_anounce']), 'S_ADD_PLATFORM' => $this->config['top_rating_type'] == 1 ? false : true)); $this->template->assign_block_vars('navlinks', array('FORUM_NAME' => $this->user->lang['RATING'], 'U_VIEW_FORUM' => $this->helper->route("bb3top_rating_category"))); $this->rating->view_top(); if ($this->config['top_rating_anounce']) { $this->rating->view_announce(); } $page_title = $this->config['top_rating_name'] ? $this->config['top_rating_name'] : $this->user->lang['RATING']; page_header($page_title); $this->template->set_filenames(array('body' => '@bb3top_rating/rating_body.html')); page_footer(); }