mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
- fix moving up/down for smilies and icons
- display number of total topics in viewforum for forums having active topics set to to true git-svn-id: file:///svn/phpbb/trunk@5770 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
fecdf14358
commit
fc167b2e42
5 changed files with 25 additions and 11 deletions
|
@ -311,11 +311,13 @@
|
||||||
<!-- IF forums.FORUM_DESCRIPTION --><br /><span>{forums.FORUM_DESCRIPTION}</span><!-- ENDIF -->
|
<!-- IF forums.FORUM_DESCRIPTION --><br /><span>{forums.FORUM_DESCRIPTION}</span><!-- ENDIF -->
|
||||||
<!-- IF forums.S_FORUM_POST --><br /><br /><span>{L_TOPICS}: <b>{forums.FORUM_TOPICS}</b> / {L_POSTS}: <b>{forums.FORUM_POSTS}</b></span><!-- ENDIF -->
|
<!-- IF forums.S_FORUM_POST --><br /><br /><span>{L_TOPICS}: <b>{forums.FORUM_TOPICS}</b> / {L_POSTS}: <b>{forums.FORUM_POSTS}</b></span><!-- ENDIF -->
|
||||||
</td>
|
</td>
|
||||||
<td style="width: 15%; text-align: right; white-space: nowrap;"><!-- IF not forums.S_FIRST_ROW --><a href="{forums.U_MOVE_UP}"><img src="images/icon_up.gif" alt="{L_MOVE_UP}" title="{L_MOVE_UP}" width="16" height="16" /></a> <!-- ENDIF -->
|
<td style="width: 15%; text-align: right; white-space: nowrap;">
|
||||||
|
<!-- IF not forums.S_FIRST_ROW --><a href="{forums.U_MOVE_UP}"><img src="images/icon_up.gif" alt="{L_MOVE_UP}" title="{L_MOVE_UP}" width="16" height="16" /></a> <!-- ENDIF -->
|
||||||
<!-- IF not forums.S_LAST_ROW --><a href="{forums.U_MOVE_DOWN}"><img src="images/icon_down.gif" alt="{L_MOVE_DOWN}" title="{L_MOVE_DOWN}" width="16" height="16" /></a> <!-- ENDIF -->
|
<!-- IF not forums.S_LAST_ROW --><a href="{forums.U_MOVE_DOWN}"><img src="images/icon_down.gif" alt="{L_MOVE_DOWN}" title="{L_MOVE_DOWN}" width="16" height="16" /></a> <!-- ENDIF -->
|
||||||
<a href="{forums.U_EDIT}"><img src="images/icon_edit.gif" alt="{L_EDIT}" title="{L_EDIT}" width="16" height="16" /></a>
|
<a href="{forums.U_EDIT}"><img src="images/icon_edit.gif" alt="{L_EDIT}" title="{L_EDIT}" width="16" height="16" /></a>
|
||||||
<!-- IF not forums.S_LINK --><a href="{forums.U_SYNC}"><img src="images/icon_sync.gif" alt="{L_RESYNC}" title="{L_RESYNC}" width="16" height="16" /></a> <!-- ENDIF -->
|
<!-- IF not forums.S_LINK --><a href="{forums.U_SYNC}"><img src="images/icon_sync.gif" alt="{L_RESYNC}" title="{L_RESYNC}" width="16" height="16" /></a> <!-- ENDIF -->
|
||||||
<a href="{forums.U_DELETE}"><img src="images/icon_delete.gif" alt="{L_DELETE}" title="{L_DELETE}" width="16" height="16" /></a></td>
|
<a href="{forums.U_DELETE}"><img src="images/icon_delete.gif" alt="{L_DELETE}" title="{L_DELETE}" width="16" height="16" /></a>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- END forums -->
|
<!-- END forums -->
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -128,8 +128,7 @@
|
||||||
<th>{L_CODE}</th>
|
<th>{L_CODE}</th>
|
||||||
<th>{L_EMOTION}</th>
|
<th>{L_EMOTION}</th>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<th>{L_ACTION}</th>
|
<th>{L_OPTIONS}</th>
|
||||||
<th>{L_REORDER}</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -145,8 +144,12 @@
|
||||||
<td style="text-align: center;">{items.CODE}</td>
|
<td style="text-align: center;">{items.CODE}</td>
|
||||||
<td style="text-align: center;">{items.EMOTION}</td>
|
<td style="text-align: center;">{items.EMOTION}</td>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<td style="text-align: center;"><a href="{items.U_EDIT}">{L_EDIT}</a> | <a href="{items.U_DELETE}">{L_DELETE}</a></td>
|
<td style="width: 15%; text-align: right; white-space: nowrap;">
|
||||||
<td style="text-align: center;"><a href="{items.U_MOVE_UP}">{L_MOVE_UP}</a> <br /> <a href="{items.MOVE_DOWN}">{L_MOVE_DOWN}</a></td>
|
<!-- IF not items.S_FIRST_ROW --><a href="{items.U_MOVE_UP}"><img src="images/icon_up.gif" alt="{L_MOVE_UP}" title="{L_MOVE_UP}" width="16" height="16" /></a> <!-- ENDIF -->
|
||||||
|
<!-- IF not items.S_LAST_ROW --><a href="{items.U_MOVE_DOWN}"><img src="images/icon_down.gif" alt="{L_MOVE_DOWN}" title="{L_MOVE_DOWN}" width="16" height="16" /></a> <!-- ENDIF -->
|
||||||
|
<a href="{items.U_EDIT}"><img src="images/icon_edit.gif" alt="{L_EDIT}" title="{L_EDIT}" width="16" height="16" /></a>
|
||||||
|
<a href="{items.U_DELETE}"><img src="images/icon_delete.gif" alt="{L_DELETE}" title="{L_DELETE}" width="16" height="16" /></a>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- END items -->
|
<!-- END items -->
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -447,7 +447,6 @@ class acp_icons
|
||||||
|
|
||||||
'L_TITLE' => $user->lang['ACP_' . $lang],
|
'L_TITLE' => $user->lang['ACP_' . $lang],
|
||||||
'L_EXPLAIN' => $user->lang['ACP_' . $lang . '_EXPLAIN'],
|
'L_EXPLAIN' => $user->lang['ACP_' . $lang . '_EXPLAIN'],
|
||||||
'L_IMPORT' => $user->lang[$lang . '_IMPORT'],
|
|
||||||
'L_NO_PAK_OPTIONS' => $user->lang['NO_' . $lang . '_PAK'],
|
'L_NO_PAK_OPTIONS' => $user->lang['NO_' . $lang . '_PAK'],
|
||||||
'L_CURRENT' => $user->lang['CURRENT_' . $lang],
|
'L_CURRENT' => $user->lang['CURRENT_' . $lang],
|
||||||
'L_CURRENT_EXPLAIN' => $user->lang['CURRENT_' . $lang . '_EXPLAIN'],
|
'L_CURRENT_EXPLAIN' => $user->lang['CURRENT_' . $lang . '_EXPLAIN'],
|
||||||
|
@ -547,7 +546,7 @@ class acp_icons
|
||||||
case 'move_up':
|
case 'move_up':
|
||||||
case 'move_down':
|
case 'move_down':
|
||||||
|
|
||||||
$image_order = intval($_GET['order']);
|
$image_order = request_var('order', 0);
|
||||||
$order_total = $image_order * 2 + (($action == 'move_up') ? -1 : 1);
|
$order_total = $image_order * 2 + (($action == 'move_up') ? -1 : 1);
|
||||||
|
|
||||||
$sql = 'UPDATE ' . $table . '
|
$sql = 'UPDATE ' . $table . '
|
||||||
|
@ -564,7 +563,7 @@ class acp_icons
|
||||||
// By default, check that image_order is valid and fix it if necessary
|
// By default, check that image_order is valid and fix it if necessary
|
||||||
$sql = "SELECT {$fields}_id AS order_id, {$fields}_order AS fields_order
|
$sql = "SELECT {$fields}_id AS order_id, {$fields}_order AS fields_order
|
||||||
FROM $table
|
FROM $table
|
||||||
ORDER BY {$fields}_order";
|
ORDER BY display_on_posting DESC, {$fields}_order";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
if ($row = $db->sql_fetchrow($result))
|
if ($row = $db->sql_fetchrow($result))
|
||||||
|
@ -608,7 +607,7 @@ class acp_icons
|
||||||
|
|
||||||
$sql = "SELECT *
|
$sql = "SELECT *
|
||||||
FROM $table
|
FROM $table
|
||||||
ORDER BY display_on_posting DESC, {$fields}_order ASC";
|
ORDER BY {$fields}_order ASC";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
|
|
@ -127,6 +127,16 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||||
// Display active topics from this forum?
|
// Display active topics from this forum?
|
||||||
if ($show_active && $row['forum_type'] == FORUM_POST && $auth->acl_get('f_read', $forum_id) && ($row['forum_flags'] & 16))
|
if ($show_active && $row['forum_type'] == FORUM_POST && $auth->acl_get('f_read', $forum_id) && ($row['forum_flags'] & 16))
|
||||||
{
|
{
|
||||||
|
if (!isset($active_forum_ary['forum_topics']))
|
||||||
|
{
|
||||||
|
$active_forum_ary['forum_topics'] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($active_forum_ary['forum_posts']))
|
||||||
|
{
|
||||||
|
$active_forum_ary['forum_posts'] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
$active_forum_ary['forum_id'][] = $forum_id;
|
$active_forum_ary['forum_id'][] = $forum_id;
|
||||||
$active_forum_ary['enable_icons'][] = $row['enable_icons'];
|
$active_forum_ary['enable_icons'][] = $row['enable_icons'];
|
||||||
$active_forum_ary['forum_topics'] += ($auth->acl_get('m_approve', $forum_id)) ? $row['forum_topics_real'] : $row['forum_topics'];
|
$active_forum_ary['forum_topics'] += ($auth->acl_get('m_approve', $forum_id)) ? $row['forum_topics_real'] : $row['forum_topics'];
|
||||||
|
|
|
@ -219,7 +219,7 @@ if ($forum_data['forum_type'] == FORUM_POST || (($forum_data['forum_flags'] & 16
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'PAGINATION' => generate_pagination("{$phpbb_root_path}viewforum.$phpEx$SID&f=$forum_id&$u_sort_param", $topics_count, $config['topics_per_page'], $start),
|
'PAGINATION' => generate_pagination("{$phpbb_root_path}viewforum.$phpEx$SID&f=$forum_id&$u_sort_param", $topics_count, $config['topics_per_page'], $start),
|
||||||
'PAGE_NUMBER' => on_page($topics_count, $config['topics_per_page'], $start),
|
'PAGE_NUMBER' => on_page($topics_count, $config['topics_per_page'], $start),
|
||||||
'TOTAL_TOPICS' => ($forum_data['forum_flags'] & 16) ? false : (($topics_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $topics_count)),
|
'TOTAL_TOPICS' => ($forum_data['forum_flags'] & 16 && $forum_data['forum_type'] == FORUM_CAT) ? false : (($topics_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $topics_count)),
|
||||||
'MODERATORS' => (!empty($moderators[$forum_id])) ? implode(', ', $moderators[$forum_id]) : '',
|
'MODERATORS' => (!empty($moderators[$forum_id])) ? implode(', ', $moderators[$forum_id]) : '',
|
||||||
|
|
||||||
'POST_IMG' => ($forum_data['forum_status'] == ITEM_LOCKED) ? $user->img('btn_locked', $post_alt) : $user->img('btn_post', $post_alt),
|
'POST_IMG' => ($forum_data['forum_status'] == ITEM_LOCKED) ? $user->img('btn_locked', $post_alt) : $user->img('btn_post', $post_alt),
|
||||||
|
|
Loading…
Add table
Reference in a new issue