Exemple #1
0
 /**
  * Display author contributions page.
  *
  * @return \Symfony\Component\HttpFoundation\Response
  */
 protected function contributions()
 {
     // Setup the sort tool to sort by contribution support status and name ascending
     $sort = \contribs_overlord::build_sort();
     $sort->set_url($this->author->get_url('contributions'));
     $sort->set_sort_keys(array('sc' => array('SORT_CONTRIB_NAME', 'c.contrib_limited_support, c.contrib_name', true)));
     $sort->set_defaults(24, 'sc', 'a');
     \contribs_overlord::display_contribs('author', $this->author->user_id, false, $sort);
     $this->template->assign_vars(array('S_AUTHOR_LIST' => true, 'U_CANONICAL' => $sort->build_canonical()));
     return $this->helper->render('authors/author_contributions.html', $this->get_title('AUTHOR_CONTRIBS'));
 }
 /**
  * List the contributions for the category and its children
  *
  * @param array $categories The id's of the categories from which to select.
  * @param string $sort_url The base url from which to sort.
  *
  * @return \phpbb\titania\sort
  */
 protected function list_contributions($categories, $sort_url)
 {
     $mode = $this->id ? 'category' : 'all';
     $sort = \contribs_overlord::build_sort();
     $sort->set_defaults(25);
     $branch = (int) str_replace('.', '', $this->branch);
     $data = \contribs_overlord::display_contribs($mode, $categories, $branch, $sort);
     // Canonical URL
     $data['sort']->set_url($sort_url);
     $this->template->assign_var('U_CANONICAL', $data['sort']->build_canonical());
     return $data['sort'];
 }
<?php

/**
 *
 * @package titania
 * @version $Id$
 * @copyright (c) 2008 phpBB Customisation Database Team
 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
 *
 */
/**
* @ignore
*/
if (!defined('IN_TITANIA')) {
    exit;
}
// Setup the sort tool to sort by contribution name ascending
$sort = contribs_overlord::build_sort();
$sort->set_url(titania::$author->get_url('contributions'));
$sort->set_defaults(false, 'c', 'a');
contribs_overlord::display_contribs('author', titania::$author->user_id, $sort);
phpbb::$template->assign_vars(array('S_AUTHOR_LIST' => true, 'U_CANONICAL' => $sort->build_canonical()));
titania::page_header(titania::$author->get_username_string('username') . ' - ' . phpbb::$user->lang['AUTHOR_CONTRIBS']);
titania::page_footer(true, 'authors/author_contributions.html');