Merge PR #971 branch 'nickvergessen/ticket/11018' into develop

* nickvergessen/ticket/11018:
  [ticket/11014] Fix old pagination assignment
  [ticket/11018] Fix several paginations in ACP
  [ticket/11014] Fix IF statements for new template pagination
  [ticket/11014] Fix text for previous/next links in Subsilver2
  [ticket/11023] Fix additional whitespaces that were added by PHPBB3-10968
  [ticket/11018] Always display previous/next links if we can display one
  [ticket/11014] Restore template vars for next/previous links
  [ticket/11018] Swap prev/next links on pagination to the old order
  [ticket/11067] Copy prosilver CSS to adm, so the pagination looks the same
  [ticket/11018] Fix minor issues with CSS in prosilver
  [ticket/11018] Attempt to fix li.pagination alignment issue
This commit is contained in:
Oleg Pudeyev 2012-10-22 17:44:34 -04:00
commit 6bf60ac5cb
31 changed files with 173 additions and 102 deletions

View file

@ -381,11 +381,10 @@
<div class="pagination"> <div class="pagination">
<!-- IF .pagination or TOTAL_FILES --> <!-- IF .pagination or TOTAL_FILES -->
{L_NUMBER_FILES}: {TOTAL_FILES} &bull; {L_TOTAL_SIZE}: {TOTAL_SIZE} {L_NUMBER_FILES}: {TOTAL_FILES} &bull; {L_TOTAL_SIZE}: {TOTAL_SIZE}
<!-- IF .pagination --> <!-- IF .pagination -->
&bull; &bull; <!-- INCLUDE pagination.html -->
<!-- INCLUDE pagination.html --> <!-- ELSE -->
<!-- ELSE --> &bull; {S_ON_PAGE}
{S_ON_PAGE}
<!-- ENDIF --> <!-- ENDIF -->
<!-- ENDIF --> <!-- ENDIF -->
</div> </div>
@ -427,7 +426,12 @@
<hr /> <hr />
<div class="pagination"> <div class="pagination">
{L_NUMBER_FILES}: {TOTAL_FILES} &bull; {L_TOTAL_SIZE}: {TOTAL_SIZE}<!-- IF S_ON_PAGE --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {S_ON_PAGE}<!-- ENDIF --><!-- ENDIF --> {L_NUMBER_FILES}: {TOTAL_FILES} &bull; {L_TOTAL_SIZE}: {TOTAL_SIZE}
<!-- IF .pagination -->
&bull; <!-- INCLUDE pagination.html -->
<!-- ELSE -->
&bull; {S_ON_PAGE}
<!-- ENDIF -->
</div> </div>
<!-- ENDIF --> <!-- ENDIF -->

View file

@ -10,11 +10,11 @@
<div class="clearfix"></div> <div class="clearfix"></div>
<div class="pagination">
<!-- IF .pagination --> <!-- IF .pagination -->
<div class="pagination">
<!-- INCLUDE pagination.html --> <!-- INCLUDE pagination.html -->
<!-- ENDIF -->
</div> </div>
<!-- ENDIF -->
<table cellspacing="1"> <table cellspacing="1">
<thead> <thead>
@ -53,15 +53,15 @@
</table> </table>
<fieldset class="display-options"> <fieldset class="display-options">
{L_DISPLAY_LOG}: &nbsp;{S_LIMIT_DAYS}&nbsp;{L_SORT_BY}: {S_SORT_KEY} {S_SORT_DIR}<!-- IF PAGINATION -->&nbsp;Users per page: <input class="inputbox autowidth" type="text" name="users_per_page" id="users_per_page" size="3" value="{USERS_PER_PAGE}" /><!-- ENDIF --> {L_DISPLAY_LOG}: &nbsp;{S_LIMIT_DAYS}&nbsp;{L_SORT_BY}: {S_SORT_KEY} {S_SORT_DIR}<!-- IF .pagination -->&nbsp;Users per page: <input class="inputbox autowidth" type="text" name="users_per_page" id="users_per_page" size="3" value="{USERS_PER_PAGE}" /><!-- ENDIF -->
<input class="button2" type="submit" value="{L_GO}" name="sort" /> <input class="button2" type="submit" value="{L_GO}" name="sort" />
</fieldset> </fieldset>
<hr /> <hr />
<!-- IF PAGINATION --> <!-- IF .pagination -->
<div class="pagination"> <div class="pagination">
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span> <!-- INCLUDE pagination.html -->
</div> </div>
<!-- ENDIF --> <!-- ENDIF -->

View file

@ -12,11 +12,11 @@
{L_SEARCH_KEYWORDS}: <input type="text" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" /> {L_SEARCH_KEYWORDS}: <input type="text" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" />
</fieldset> </fieldset>
<div class="pagination" style="float: right; margin: 15px 0 2px 0">
<!-- IF .pagination --> <!-- IF .pagination -->
<div class="pagination" style="float: right; margin: 15px 0 2px 0">
<!-- INCLUDE pagination.html --> <!-- INCLUDE pagination.html -->
<!-- ENDIF -->
</div> </div>
<!-- ENDIF -->
<div class="clearfix">&nbsp;</div> <div class="clearfix">&nbsp;</div>
<div><br style="clear: both;" /></div> <div><br style="clear: both;" /></div>
@ -54,9 +54,9 @@
</tbody> </tbody>
</table> </table>
<!-- IF PAGINATION --> <!-- IF .pagination -->
<div class="pagination"> <div class="pagination">
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span> <!-- INCLUDE pagination.html -->
</div> </div>
<!-- ENDIF --> <!-- ENDIF -->

View file

@ -1148,55 +1148,79 @@ input.disabled {
width: auto; width: auto;
text-align: right; text-align: right;
margin-top: 5px; margin-top: 5px;
font-size: 0.85em; float: right;
padding-bottom: 2px;
} }
.rtl .pagination { .rtl .pagination {
text-align: left; text-align: left;
float: left;
} }
.pagination strong, li.pagination {
.pagination b { margin-top: 0;
font-weight: normal;
}
.pagination span.page-sep {
display:none;
}
.pagination span strong {
padding: 0 2px;
margin: 0 2px;
font-weight: normal;
font-size: 0.85em;
color: #FFFFFF;
background: #4692BF;
border: 1px solid #4692BF;
}
.pagination span a, .pagination span a:link, .pagination span a:visited, .pagination span a:active {
font-weight: normal;
font-size: 0.85em;
text-decoration: none;
color: #5C758C;
margin: 0 2px;
padding: 0 2px;
background: #ECEDEE;
border: 1px solid #B4BAC0;
}
.pagination span a:hover {
border-color: #368AD2;
background: #368AD2;
color: #FFFFFF;
text-decoration: none;
} }
.pagination img { .pagination img {
vertical-align: middle; vertical-align: middle;
} }
.pagination ul {
display: inline-block;
*display: inline; /* IE7 inline-block hack */
*zoom: 1;
margin-left: 0;
margin-bottom: 0;
}
li.pagination ul {
margin-top: -2px;
vertical-align: middle;
}
.pagination ul li, dl .pagination ul li, dl.icon .pagination ul li {
display: inline;
padding: 0;
font-size: 100%;
line-height: normal;
}
.pagination li a, .pagnation li span, li .pagination li a, li .pagnation li span, .pagination li.active span, .pagination li.ellipsis span {
font-weight: normal;
text-decoration: none;
padding: 0 2px;
border: 1px solid transparent;
font-size: 0.9em;
line-height: 1.5em;
}
.pagination li a, .pagination li a:link, .pagination li a:visited {
color: #5C758C;
background-color: #ECEDEE;
border-color: #B4BAC0;
}
.pagination li.ellipsis span {
background-color: transparent;
color: #000000;
}
.pagination li.active span {
color: #FFFFFF;
background-color: #4692BF;
border-color: #4692BF;
}
.pagination li a:hover, .pagination .active a:hover {
color: #FFFFFF;
background-color: #368AD2;
border-color: #368AD2;
}
.pagination li a:active, .pagination li.active a:active {
color: #5C758C;
background-color: #ECEDEE;
border-color: #B4BAC0;
}
/* Action Highlighting /* Action Highlighting
---------------------------------------- */ ---------------------------------------- */
@ -1727,4 +1751,4 @@ fieldset.permissions .padding {
.requirements_not_met dt label, .requirements_not_met dd p { .requirements_not_met dt label, .requirements_not_met dd p {
color: #FFFFFF; color: #FFFFFF;
font-size: 1.4em; font-size: 1.4em;
} }

View file

@ -1163,7 +1163,7 @@ class acp_attachments
$template->assign_vars(array( $template->assign_vars(array(
'S_ACTION_OPTIONS' => ($auth->acl_get('a_board')) ? true : false, 'S_ACTION_OPTIONS' => ($auth->acl_get('a_board')) ? true : false,
'U_ACTION' => $this->u_action,) 'U_ACTION' => $this->u_action,)
); );
} }
// Make sure $start is set to the last page if it exceeds the amount // Make sure $start is set to the last page if it exceeds the amount
@ -1224,7 +1224,7 @@ class acp_attachments
$base_url = $this->u_action . "&amp;$u_sort_param"; $base_url = $this->u_action . "&amp;$u_sort_param";
phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $num_files, $attachments_per_page, $start); phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $num_files, $attachments_per_page, $start);
$template->assign_vars(array( $template->assign_vars(array(
'TOTAL_FILES' => $num_files, 'TOTAL_FILES' => $num_files,
'TOTAL_SIZE' => get_formatted_filesize($total_size), 'TOTAL_SIZE' => get_formatted_filesize($total_size),

View file

@ -683,8 +683,8 @@ class acp_groups
} }
$base_url = $this->u_action . "&amp;action=$action&amp;g=$group_id"; $base_url = $this->u_action . "&amp;action=$action&amp;g=$group_id";
phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $total_members, $config['topics_per_page'], $start); phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $total_members, $config['topics_per_page'], $start);
$template->assign_vars(array( $template->assign_vars(array(
'S_LIST' => true, 'S_LIST' => true,
'S_GROUP_SPECIAL' => ($group_row['group_type'] == GROUP_SPECIAL) ? true : false, 'S_GROUP_SPECIAL' => ($group_row['group_type'] == GROUP_SPECIAL) ? true : false,

View file

@ -927,8 +927,8 @@ class acp_icons
} }
} }
$db->sql_freeresult($result); $db->sql_freeresult($result);
phpbb_generate_template_pagination($template, $this->u_action, 'pagination', 'start', $item_count, $config['smilies_per_page'], $pagination_start); phpbb_generate_template_pagination($template, $this->u_action, 'pagination', 'start', $item_count, $config['smilies_per_page'], $pagination_start);
} }
/** /**

View file

@ -289,8 +289,8 @@ class acp_inactive
} }
$base_url = $this->u_action . "&amp;$u_sort_param&amp;users_per_page=$per_page"; $base_url = $this->u_action . "&amp;$u_sort_param&amp;users_per_page=$per_page";
phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $inactive_count, $per_page, $start); phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $inactive_count, $per_page, $start);
$template->assign_vars(array( $template->assign_vars(array(
'S_INACTIVE_USERS' => true, 'S_INACTIVE_USERS' => true,
'S_INACTIVE_OPTIONS' => build_select($option_ary), 'S_INACTIVE_OPTIONS' => build_select($option_ary),
@ -299,7 +299,6 @@ class acp_inactive
'S_SORT_KEY' => $s_sort_key, 'S_SORT_KEY' => $s_sort_key,
'S_SORT_DIR' => $s_sort_dir, 'S_SORT_DIR' => $s_sort_dir,
'S_ON_PAGE' => phpbb_on_page($template, $user, $base_url, $inactive_count, $per_page, $start), 'S_ON_PAGE' => phpbb_on_page($template, $user, $base_url, $inactive_count, $per_page, $start),
'USERS_PER_PAGE' => $per_page, 'USERS_PER_PAGE' => $per_page,
'U_ACTION' => $this->u_action . "&amp;$u_sort_param&amp;users_per_page=$per_page&amp;start=$start", 'U_ACTION' => $this->u_action . "&amp;$u_sort_param&amp;users_per_page=$per_page&amp;start=$start",

View file

@ -131,7 +131,7 @@ class acp_logs
$base_url = $this->u_action . "&amp;$u_sort_param$keywords_param"; $base_url = $this->u_action . "&amp;$u_sort_param$keywords_param";
phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $log_count, $config['topics_per_page'], $start); phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $log_count, $config['topics_per_page'], $start);
$template->assign_vars(array( $template->assign_vars(array(
'L_TITLE' => $l_title, 'L_TITLE' => $l_title,
'L_EXPLAIN' => $l_title_explain, 'L_EXPLAIN' => $l_title_explain,

View file

@ -1159,7 +1159,7 @@ class acp_users
$base_url = $this->u_action . "&amp;u=$user_id&amp;$u_sort_param"; $base_url = $this->u_action . "&amp;u=$user_id&amp;$u_sort_param";
phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $log_count, $config['topics_per_page'], $start); phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $log_count, $config['topics_per_page'], $start);
$template->assign_vars(array( $template->assign_vars(array(
'S_FEEDBACK' => true, 'S_FEEDBACK' => true,
'S_ON_PAGE' => phpbb_on_page($template, $user, $base_url, $log_count, $config['topics_per_page'], $start), 'S_ON_PAGE' => phpbb_on_page($template, $user, $base_url, $log_count, $config['topics_per_page'], $start),
@ -2075,7 +2075,7 @@ class acp_users
$base_url = $this->u_action . "&amp;u=$user_id&amp;sk=$sort_key&amp;sd=$sort_dir"; $base_url = $this->u_action . "&amp;u=$user_id&amp;sk=$sort_key&amp;sd=$sort_dir";
phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $num_attachments, $config['topics_per_page'], $start); phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $num_attachments, $config['topics_per_page'], $start);
$template->assign_vars(array( $template->assign_vars(array(
'S_ATTACHMENTS' => true, 'S_ATTACHMENTS' => true,
'S_ON_PAGE' => phpbb_on_page($template, $user, $base_url, $num_attachments, $config['topics_per_page'], $start), 'S_ON_PAGE' => phpbb_on_page($template, $user, $base_url, $num_attachments, $config['topics_per_page'], $start),

View file

@ -2171,14 +2171,14 @@ function phpbb_generate_template_pagination($template, $base_url, $block_var_nam
$end_page = ($total_pages > 5) ? max(min($total_pages, $on_page + 3), 5) : $total_pages; $end_page = ($total_pages > 5) ? max(min($total_pages, $on_page + 3), 5) : $total_pages;
} }
if ($on_page != $total_pages) if ($on_page != 1)
{ {
$template->assign_block_vars($block_var_name, array( $template->assign_block_vars($block_var_name, array(
'PAGE_NUMBER' => '', 'PAGE_NUMBER' => '',
'PAGE_URL' => $base_url . $url_delim . $start_name . '=' . ($on_page * $per_page), 'PAGE_URL' => $base_url . $url_delim . $start_name . '=' . (($on_page - 2) * $per_page),
'S_IS_CURRENT' => false, 'S_IS_CURRENT' => false,
'S_IS_PREV' => false, 'S_IS_PREV' => true,
'S_IS_NEXT' => true, 'S_IS_NEXT' => false,
'S_IS_ELLIPSIS' => false, 'S_IS_ELLIPSIS' => false,
)); ));
} }
@ -2225,17 +2225,56 @@ function phpbb_generate_template_pagination($template, $base_url, $block_var_nam
} }
while ($at_page <= $total_pages); while ($at_page <= $total_pages);
if ($on_page != 1) if ($on_page != $total_pages)
{ {
$template->assign_block_vars($block_var_name, array( $template->assign_block_vars($block_var_name, array(
'PAGE_NUMBER' => '', 'PAGE_NUMBER' => '',
'PAGE_URL' => $base_url . $url_delim . $start_name . '=' . (($on_page - 2) * $per_page), 'PAGE_URL' => $base_url . $url_delim . $start_name . '=' . ($on_page * $per_page),
'S_IS_CURRENT' => false, 'S_IS_CURRENT' => false,
'S_IS_PREV' => true, 'S_IS_PREV' => false,
'S_IS_NEXT' => false, 'S_IS_NEXT' => true,
'S_IS_ELLIPSIS' => false, 'S_IS_ELLIPSIS' => false,
)); ));
} }
// If the block_var_name is a nested block, we will use the last (most
// inner) block as a prefix for the template variables. If the last block
// name is pagination, the prefix is empty. If the rest of the
// block_var_name is not empty, we will modify the last row of that block
// and add our pagination items.
$tpl_block_name = $tpl_prefix = '';
if (strrpos($block_var_name, '.') !== false)
{
$tpl_block_name = substr($block_var_name, 0, strrpos($block_var_name, '.'));
$tpl_prefix = strtoupper(substr($block_var_name, strrpos($block_var_name, '.') + 1));
}
else
{
$tpl_prefix = strtoupper($block_var_name);
}
$tpl_prefix = ($tpl_prefix == 'PAGINATION') ? '' : $tpl_prefix . '_';
$previous_page = ($on_page != 1) ? $base_url . $url_delim . $start_name . '=' . (($on_page - 2) * $per_page) : '';
$template_array = array(
$tpl_prefix . 'BASE_URL' => $base_url,
'A_' . $tpl_prefix . 'BASE_URL' => addslashes($base_url),
$tpl_prefix . 'PER_PAGE' => $per_page,
$tpl_prefix . 'PREVIOUS_PAGE' => $previous_page,
$tpl_prefix . 'PREV_PAGE' => $previous_page,
$tpl_prefix . 'NEXT_PAGE' => ($on_page != $total_pages) ? $base_url . $url_delim . $start_name . '=' . ($on_page * $per_page) : '',
$tpl_prefix . 'TOTAL_PAGES' => $total_pages,
$tpl_prefix . 'CURRENT_PAGE' => $on_page,
);
if ($tpl_block_name)
{
$template->alter_block_array($tpl_block_name, $template_array, true, 'change');
}
else
{
$template->assign_vars($template_array);
}
} }
/** /**
@ -2260,7 +2299,6 @@ function phpbb_on_page($template, $user, $base_url, $num_items, $per_page, $star
$template->assign_vars(array( $template->assign_vars(array(
'PER_PAGE' => $per_page, 'PER_PAGE' => $per_page,
'ON_PAGE' => $on_page, 'ON_PAGE' => $on_page,
'A_BASE_URL' => addslashes($base_url), 'A_BASE_URL' => addslashes($base_url),
)); ));

View file

@ -103,7 +103,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
$base_url = $url . "&amp;i=$id&amp;action=$action&amp;mode=$mode&amp;sd=$sort_dir&amp;sk=$sort_key&amp;st=$sort_days" . (($merge_select) ? $selected_ids : ''); $base_url = $url . "&amp;i=$id&amp;action=$action&amp;mode=$mode&amp;sd=$sort_dir&amp;sk=$sort_key&amp;st=$sort_days" . (($merge_select) ? $selected_ids : '');
phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $forum_topics, $topics_per_page, $start); phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $forum_topics, $topics_per_page, $start);
$template->assign_vars(array( $template->assign_vars(array(
'ACTION' => $action, 'ACTION' => $action,
'FORUM_NAME' => $forum_info['forum_name'], 'FORUM_NAME' => $forum_info['forum_name'],

View file

@ -172,8 +172,8 @@ class mcp_logs
$start = view_log('mod', $log_data, $log_count, $config['topics_per_page'], $start, $forum_list, $topic_id, 0, $sql_where, $sql_sort, $keywords); $start = view_log('mod', $log_data, $log_count, $config['topics_per_page'], $start, $forum_list, $topic_id, 0, $sql_where, $sql_sort, $keywords);
$base_url = $this->u_action . "&amp;$u_sort_param$keywords_param"; $base_url = $this->u_action . "&amp;$u_sort_param$keywords_param";
phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $log_count, $config['topics_per_page'], $start); phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $log_count, $config['topics_per_page'], $start);
$template->assign_vars(array( $template->assign_vars(array(
'PAGE_NUMBER' => phpbb_on_page($template, $user, $base_url, $log_count, $config['topics_per_page'], $start), 'PAGE_NUMBER' => phpbb_on_page($template, $user, $base_url, $log_count, $config['topics_per_page'], $start),
'TOTAL' => $user->lang('TOTAL_LOGS', (int) $log_count), 'TOTAL' => $user->lang('TOTAL_LOGS', (int) $log_count),

View file

@ -217,7 +217,7 @@ class mcp_notes
$base_url = $this->u_action . "&amp;$u_sort_param$keywords_param"; $base_url = $this->u_action . "&amp;$u_sort_param$keywords_param";
phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $log_count, $config['topics_per_page'], $start); phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $log_count, $config['topics_per_page'], $start);
$template->assign_vars(array( $template->assign_vars(array(
'U_POST_ACTION' => $this->u_action, 'U_POST_ACTION' => $this->u_action,
'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false, 'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false,

View file

@ -297,10 +297,10 @@ class mcp_pm_reports
} }
} }
} }
$base_url = $this->u_action . "&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir"; $base_url = $this->u_action . "&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir";
phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $total, $config['topics_per_page'], $start); phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $total, $config['topics_per_page'], $start);
// Now display the page // Now display the page
$template->assign_vars(array( $template->assign_vars(array(
'L_EXPLAIN' => ($mode == 'pm_reports') ? $user->lang['MCP_PM_REPORTS_OPEN_EXPLAIN'] : $user->lang['MCP_PM_REPORTS_CLOSED_EXPLAIN'], 'L_EXPLAIN' => ($mode == 'pm_reports') ? $user->lang['MCP_PM_REPORTS_OPEN_EXPLAIN'] : $user->lang['MCP_PM_REPORTS_CLOSED_EXPLAIN'],

View file

@ -421,7 +421,7 @@ class mcp_queue
$base_url = $this->u_action . "&amp;f=$forum_id&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir"; $base_url = $this->u_action . "&amp;f=$forum_id&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir";
phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $total, $config['topics_per_page'], $start); phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $total, $config['topics_per_page'], $start);
// Now display the page // Now display the page
$template->assign_vars(array( $template->assign_vars(array(
'L_DISPLAY_ITEMS' => ($mode == 'unapproved_posts') ? $user->lang['DISPLAY_POSTS'] : $user->lang['DISPLAY_TOPICS'], 'L_DISPLAY_ITEMS' => ($mode == 'unapproved_posts') ? $user->lang['DISPLAY_POSTS'] : $user->lang['DISPLAY_TOPICS'],

View file

@ -413,7 +413,7 @@ class mcp_reports
$base_url = $this->u_action . "&amp;f=$forum_id&amp;t=$topic_id&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir"; $base_url = $this->u_action . "&amp;f=$forum_id&amp;t=$topic_id&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir";
phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $total, $config['topics_per_page'], $start); phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $total, $config['topics_per_page'], $start);
// Now display the page // Now display the page
$template->assign_vars(array( $template->assign_vars(array(
'L_EXPLAIN' => ($mode == 'reports') ? $user->lang['MCP_REPORTS_OPEN_EXPLAIN'] : $user->lang['MCP_REPORTS_CLOSED_EXPLAIN'], 'L_EXPLAIN' => ($mode == 'reports') ? $user->lang['MCP_REPORTS_OPEN_EXPLAIN'] : $user->lang['MCP_REPORTS_CLOSED_EXPLAIN'],

View file

@ -311,7 +311,7 @@ function mcp_topic_view($id, $mode, $action)
{ {
phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $total, $posts_per_page, $start); phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $total, $posts_per_page, $start);
} }
$template->assign_vars(array( $template->assign_vars(array(
'TOPIC_TITLE' => $topic_info['topic_title'], 'TOPIC_TITLE' => $topic_info['topic_title'],
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_info['forum_id'] . '&amp;t=' . $topic_info['topic_id']), 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_info['forum_id'] . '&amp;t=' . $topic_info['topic_id']),

View file

@ -177,7 +177,7 @@ class mcp_warn
$base_url = append_sid("{$phpbb_root_path}mcp.$phpEx", "i=warn&amp;mode=list&amp;st=$st&amp;sk=$sk&amp;sd=$sd"); $base_url = append_sid("{$phpbb_root_path}mcp.$phpEx", "i=warn&amp;mode=list&amp;st=$st&amp;sk=$sk&amp;sd=$sd");
phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $user_count, $config['topics_per_page'], $start); phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $user_count, $config['topics_per_page'], $start);
$template->assign_vars(array( $template->assign_vars(array(
'U_POST_ACTION' => $this->u_action, 'U_POST_ACTION' => $this->u_action,
'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false, 'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false,

View file

@ -171,8 +171,8 @@ class ucp_attachments
$db->sql_freeresult($result); $db->sql_freeresult($result);
$base_url = $this->u_action . "&amp;sk=$sort_key&amp;sd=$sort_dir"; $base_url = $this->u_action . "&amp;sk=$sort_key&amp;sd=$sort_dir";
phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $num_attachments, $config['topics_per_page'], $start); phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $num_attachments, $config['topics_per_page'], $start);
$template->assign_vars(array( $template->assign_vars(array(
'PAGE_NUMBER' => phpbb_on_page($template, $user, $base_url, $num_attachments, $config['topics_per_page'], $start), 'PAGE_NUMBER' => phpbb_on_page($template, $user, $base_url, $num_attachments, $config['topics_per_page'], $start),
'TOTAL_ATTACHMENTS' => $num_attachments, 'TOTAL_ATTACHMENTS' => $num_attachments,

View file

@ -453,7 +453,7 @@ function get_pm_from($folder_id, $folder, $user_id)
$base_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&amp;mode=view&amp;action=view_folder&amp;f=$folder_id&amp;$u_sort_param"); $base_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&amp;mode=view&amp;action=view_folder&amp;f=$folder_id&amp;$u_sort_param");
phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $pm_count, $config['topics_per_page'], $start); phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $pm_count, $config['topics_per_page'], $start);
$template->assign_vars(array( $template->assign_vars(array(
'PAGE_NUMBER' => phpbb_on_page($template, $user, $base_url, $pm_count, $config['topics_per_page'], $start), 'PAGE_NUMBER' => phpbb_on_page($template, $user, $base_url, $pm_count, $config['topics_per_page'], $start),
'TOTAL_MESSAGES' => $user->lang('VIEW_PM_MESSAGES', (int) $pm_count), 'TOTAL_MESSAGES' => $user->lang('VIEW_PM_MESSAGES', (int) $pm_count),

View file

@ -1593,7 +1593,7 @@ switch ($mode)
} }
phpbb_generate_template_pagination($template, $pagination_url, 'pagination', 'start', $total_users, $config['topics_per_page'], $start); phpbb_generate_template_pagination($template, $pagination_url, 'pagination', 'start', $total_users, $config['topics_per_page'], $start);
// Generate page // Generate page
$template->assign_vars(array( $template->assign_vars(array(
'PAGE_NUMBER' => phpbb_on_page($template, $user, $pagination_url, $total_users, $config['topics_per_page'], $start), 'PAGE_NUMBER' => phpbb_on_page($template, $user, $pagination_url, $total_users, $config['topics_per_page'], $start),

View file

@ -614,7 +614,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
} }
phpbb_generate_template_pagination($template, $u_search, 'pagination', 'start', $total_match_count, $per_page, $start); phpbb_generate_template_pagination($template, $u_search, 'pagination', 'start', $total_match_count, $per_page, $start);
$template->assign_vars(array( $template->assign_vars(array(
'SEARCH_TITLE' => $l_search_title, 'SEARCH_TITLE' => $l_search_title,
'SEARCH_MATCHES' => $l_search_matches, 'SEARCH_MATCHES' => $l_search_matches,
@ -1013,7 +1013,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id), 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id),
'U_VIEW_POST' => (!empty($row['post_id'])) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=" . $row['topic_id'] . '&amp;p=' . $row['post_id'] . (($u_hilit) ? '&amp;hilit=' . $u_hilit : '')) . '#p' . $row['post_id'] : '') 'U_VIEW_POST' => (!empty($row['post_id'])) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=" . $row['topic_id'] . '&amp;p=' . $row['post_id'] . (($u_hilit) ? '&amp;hilit=' . $u_hilit : '')) . '#p' . $row['post_id'] : '')
)); ));
if ($show_results == 'topics') if ($show_results == 'topics')
{ {
phpbb_generate_template_pagination($template, $view_topic_url, 'searchresults.pagination', 'start', $replies + 1, $config['posts_per_page'], 1, true, true); phpbb_generate_template_pagination($template, $view_topic_url, 'searchresults.pagination', 'start', $replies + 1, $config['posts_per_page'], 1, true, true);

View file

@ -245,7 +245,7 @@
<!-- IF S_QUICK_REPLY --> <!-- IF S_QUICK_REPLY -->
<!-- INCLUDE quickreply_editor.html --> <!-- INCLUDE quickreply_editor.html -->
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF S_NUM_POSTS > 1 or PREVIOUS_PAGE --> <!-- IF S_NUM_POSTS > 1 or PREVIOUS_PAGE or NEXT_PAGE -->
<form id="viewtopic" method="post" action="{S_TOPIC_ACTION}"> <form id="viewtopic" method="post" action="{S_TOPIC_ACTION}">
<fieldset class="display-options" style="margin-top: 0; "> <fieldset class="display-options" style="margin-top: 0; ">

View file

@ -151,9 +151,9 @@ dl.details dd {
border-color: #B4BAC0; border-color: #B4BAC0;
} }
.pagination li.ellipsis span { .pagination li.ellipsis span {
background-color: transparent; background-color: transparent;
color: #000 color: #000000;
} }
.pagination li.active span { .pagination li.active span {
@ -165,7 +165,7 @@ dl.details dd {
.pagination li a:hover, .pagination .active a:hover { .pagination li a:hover, .pagination .active a:hover {
border-color: #368AD2; border-color: #368AD2;
background-color: #368AD2; background-color: #368AD2;
color: #FFF; color: #FFFFFF;
} }
.pagination li a:active, .pagination li.active a:active { .pagination li a:active, .pagination li.active a:active {

View file

@ -510,9 +510,16 @@ li.pagination {
margin-bottom: 0; margin-bottom: 0;
} }
.pagination ul li, dl .pagination ul li, dl.icon .pagination ul li { li.pagination ul {
margin-top: -2px;
vertical-align: middle;
}
.pagination ul li, dl .pagination ul li, dl.icon .pagination ul li {
display: inline; display: inline;
padding: 0; padding: 0;
font-size: 100%;
line-height: normal;
} }
.pagination li a, .pagnation li span, li .pagination li a, li .pagnation li span, .pagination li.active span, .pagination li.ellipsis span { .pagination li a, .pagnation li span, li .pagination li a, li .pagnation li span, .pagination li.active span, .pagination li.ellipsis span {

View file

@ -3,7 +3,7 @@
</tr> </tr>
</table> </table>
<!-- IF PAGINATION --> <!-- IF .pagination -->
<table width="80%" align="{S_CONTENT_FLOW_END}" cellspacing="1"> <table width="80%" align="{S_CONTENT_FLOW_END}" cellspacing="1">
<tr> <tr>
<td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td> <td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>

View file

@ -1,10 +1,10 @@
<!-- IF .pagination --> <!-- IF .pagination -->
<b><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{L_GOTO_PAGE}</a> <b><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{L_GOTO_PAGE}</a>
<!-- BEGIN pagination --> <!-- BEGIN pagination -->
<!-- IF pagination.S_IS_PREV --><a href="{pagination.PAGE_URL}">{pagination.PAGE_NUMBER}</a> <!-- IF pagination.S_IS_PREV --><a href="{pagination.PAGE_URL}">{L_PREVIOUS}</a>
<!-- ELSEIF pagination.S_IS_CURRENT --><strong>{pagination.PAGE_NUMBER}</strong> <!-- ELSEIF pagination.S_IS_CURRENT --><strong>{pagination.PAGE_NUMBER}</strong>
<!-- ELSEIF pagination.S_IS_ELLIPSIS --> {L_ELLIPSIS} <!-- ELSEIF pagination.S_IS_ELLIPSIS --> {L_ELLIPSIS}
<!-- ELSEIF pagination.S_IS_NEXT --><a href="{pagination.PAGE_URL}">{pagination.PAGE_NUMBER}</a> <!-- ELSEIF pagination.S_IS_NEXT --><a href="{pagination.PAGE_URL}">{L_NEXT}</a>
<!-- ELSE --><a href="{pagination.PAGE_URL}">{pagination.PAGE_NUMBER}</a> <!-- ELSE --><a href="{pagination.PAGE_URL}">{pagination.PAGE_NUMBER}</a>
<!-- ENDIF --> <!-- ENDIF -->
<!-- END pagination --> <!-- END pagination -->

View file

@ -185,7 +185,7 @@
</table> </table>
<div class="pagination" style="float: {S_CONTENT_FLOW_BEGIN};"> <div class="pagination" style="float: {S_CONTENT_FLOW_BEGIN};">
<!-- IF PAGINATION --> <!-- IF .pagination -->
<!-- INCLUDE pagination.html --> <!-- INCLUDE pagination.html -->
<!-- ELSE --> <!-- ELSE -->
{S_ON_PAGE} {S_ON_PAGE}

View file

@ -4,7 +4,7 @@
<h4>{TOTAL_GUEST_USERS_ONLINE}<!-- IF S_SWITCH_GUEST_DISPLAY --> [ <a href="{U_SWITCH_GUEST_DISPLAY}">{L_SWITCH_GUEST_DISPLAY}</a> ]<!-- ENDIF --></h4> <h4>{TOTAL_GUEST_USERS_ONLINE}<!-- IF S_SWITCH_GUEST_DISPLAY --> [ <a href="{U_SWITCH_GUEST_DISPLAY}">{L_SWITCH_GUEST_DISPLAY}</a> ]<!-- ENDIF --></h4>
<br /> <br />
<!-- IF PAGINATION --> <!-- IF .pagination -->
<table width="100%" cellspacing="1"> <table width="100%" cellspacing="1">
<tr> <tr>
<td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td> <td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
@ -35,7 +35,7 @@
<!-- ENDIF --> <!-- ENDIF -->
</table> </table>
<!-- IF PAGINATION --> <!-- IF .pagination -->
<table width="100%" cellspacing="1"> <table width="100%" cellspacing="1">
<tr> <tr>
<td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td> <td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>

View file

@ -422,7 +422,6 @@ $template->assign_vars(array(
'TOTAL_REGISTERED_USERS_ONLINE' => $user->lang('REG_USERS_ONLINE', (int) $logged_visible_online, $user->lang('HIDDEN_USERS_ONLINE', (int) $logged_hidden_online)), 'TOTAL_REGISTERED_USERS_ONLINE' => $user->lang('REG_USERS_ONLINE', (int) $logged_visible_online, $user->lang('HIDDEN_USERS_ONLINE', (int) $logged_hidden_online)),
'TOTAL_GUEST_USERS_ONLINE' => $user->lang('GUEST_USERS_ONLINE', (int) $guest_counter), 'TOTAL_GUEST_USERS_ONLINE' => $user->lang('GUEST_USERS_ONLINE', (int) $guest_counter),
'LEGEND' => $legend, 'LEGEND' => $legend,
'PAGINATION' => $pagination,
'PAGE_NUMBER' => phpbb_on_page($template, $user, $base_url, $counter, $config['topics_per_page'], $start), 'PAGE_NUMBER' => phpbb_on_page($template, $user, $base_url, $counter, $config['topics_per_page'], $start),
'U_SORT_USERNAME' => append_sid("{$phpbb_root_path}viewonline.$phpEx", 'sk=a&amp;sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a') . '&amp;sg=' . ((int) $show_guests)), 'U_SORT_USERNAME' => append_sid("{$phpbb_root_path}viewonline.$phpEx", 'sk=a&amp;sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a') . '&amp;sg=' . ((int) $show_guests)),