diff options
author | Drae <paul@starstreak.net> | 2012-07-04 23:19:59 +0100 |
---|---|---|
committer | Drae <paul@starstreak.net> | 2012-07-18 14:30:20 +0100 |
commit | 922147f05a75d5a0e00b34f0102bc014583df984 (patch) | |
tree | 29f003d8e803ec8994ecf660d03c12514084040b /phpBB/viewtopic.php | |
parent | b176b86f111a05338ed3c74026bcf19d42ec0ee3 (diff) | |
download | forums-922147f05a75d5a0e00b34f0102bc014583df984.tar forums-922147f05a75d5a0e00b34f0102bc014583df984.tar.gz forums-922147f05a75d5a0e00b34f0102bc014583df984.tar.bz2 forums-922147f05a75d5a0e00b34f0102bc014583df984.tar.xz forums-922147f05a75d5a0e00b34f0102bc014583df984.zip |
[ticket/10968] Render pagination within the template
Since phpBB 2 pagination has been rendered mostly within the source. This
limits just what designers can do with pagination. The current form is also
questionable in terms of "best practice". The aim is to move rendering
completely to the template via the use of a block element. Enabling S_
template vars also allows for control over specific aspects of the
pagination output such as next, previous, active and ellipsis.
Related to this - merging the capabilities of the topic_generate_pagination
with generate_pagination removes an element of duplication.
PHPBB3-10968
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r-- | phpBB/viewtopic.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 0d6e9afd54..98a4f123be 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -546,7 +546,7 @@ foreach($quickmod_array as $option => $qm_ary) } // If we've got a hightlight set pass it on to pagination. -$pagination = generate_pagination(append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '') . (($highlight_match) ? "&hilit=$highlight" : '')), $total_posts, $config['posts_per_page'], $start); +generate_pagination(append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '') . (($highlight_match) ? "&hilit=$highlight" : '')), $total_posts, $config['posts_per_page'], $start); // Navigation links generate_forum_nav($topic_data); @@ -598,7 +598,6 @@ $template->assign_vars(array( 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $topic_data['topic_poster'], $topic_data['topic_first_poster_name'], $topic_data['topic_first_poster_colour']), 'TOPIC_AUTHOR' => get_username_string('username', $topic_data['topic_poster'], $topic_data['topic_first_poster_name'], $topic_data['topic_first_poster_colour']), - 'PAGINATION' => $pagination, 'PAGE_NUMBER' => on_page($total_posts, $config['posts_per_page'], $start), 'TOTAL_POSTS' => $user->lang('VIEW_TOPIC_POSTS', (int) $total_posts), 'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&mode=topic_view&f=$forum_id&t=$topic_id" . (($start == 0) ? '' : "&start=$start") . ((strlen($u_sort_param)) ? "&$u_sort_param" : ''), true, $user->session_id) : '', |