mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-12 11:44:08 +02:00
- Add pagination for icons and smilies in the ACP and smilies in the smiley popup
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9763 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -181,6 +181,7 @@ class acp_board
|
||||
'bump_interval' => array('lang' => 'BUMP_INTERVAL', 'validate' => 'int:0', 'type' => 'custom', 'method' => 'bump_interval', 'explain' => true),
|
||||
'topics_per_page' => array('lang' => 'TOPICS_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:4', 'explain' => false),
|
||||
'posts_per_page' => array('lang' => 'POSTS_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:4', 'explain' => false),
|
||||
'smilies_per_page' => array('lang' => 'SMILIES_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:4', 'explain' => false),
|
||||
'hot_threshold' => array('lang' => 'HOT_THRESHOLD', 'validate' => 'int:0', 'type' => 'text:3:4', 'explain' => true),
|
||||
'max_poll_options' => array('lang' => 'MAX_POLL_OPTIONS', 'validate' => 'int:2:127', 'type' => 'text:4:4', 'explain' => false),
|
||||
'max_post_chars' => array('lang' => 'CHAR_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:6', 'explain' => true),
|
||||
|
@@ -173,7 +173,7 @@ class acp_icons
|
||||
FROM $table
|
||||
ORDER BY {$fields}_order " . (($icon_id || $action == 'add') ? 'DESC' : 'ASC');
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
|
||||
$data = array();
|
||||
$after = false;
|
||||
$display = 0;
|
||||
@@ -835,12 +835,20 @@ class acp_icons
|
||||
);
|
||||
|
||||
$spacer = false;
|
||||
|
||||
$sql = "SELECT COUNT(*) AS count
|
||||
FROM $table";
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
$item_count = $row['count'];
|
||||
|
||||
$sql = "SELECT *
|
||||
FROM $table
|
||||
ORDER BY {$fields}_order ASC";
|
||||
$result = $db->sql_query($sql);
|
||||
$result = $db->sql_query_limit($sql, $config['smilies_per_page'], request_var('start', 0));
|
||||
|
||||
$pagination_start = request_var('start', 0);
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$alt_text = ($mode == 'smilies') ? $row['code'] : '';
|
||||
@@ -855,9 +863,9 @@ class acp_icons
|
||||
'EMOTION' => (isset($row['emotion'])) ? $row['emotion'] : '',
|
||||
'U_EDIT' => $this->u_action . '&action=edit&id=' . $row[$fields . '_id'],
|
||||
'U_DELETE' => $this->u_action . '&action=delete&id=' . $row[$fields . '_id'],
|
||||
'U_MOVE_UP' => $this->u_action . '&action=move_up&id=' . $row[$fields . '_id'],
|
||||
'U_MOVE_DOWN' => $this->u_action . '&action=move_down&id=' . $row[$fields . '_id'])
|
||||
);
|
||||
'U_MOVE_UP' => $this->u_action . '&action=move_up&id=' . $row[$fields . '_id'] . '&start=' . $pagination_start,
|
||||
'U_MOVE_DOWN' => $this->u_action . '&action=move_down&id=' . $row[$fields . '_id'] . '&start=' . $pagination_start,
|
||||
));
|
||||
|
||||
if (!$spacer && !$row['display_on_posting'])
|
||||
{
|
||||
@@ -865,6 +873,8 @@ class acp_icons
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
$template->assign_var('PAGINATION', generate_pagination(
|
||||
$this->u_action, $item_count, $config['smilies_per_page'], $pagination_start, true));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user