aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/functions.php115
-rw-r--r--phpBB/includes/functions_display.php91
-rw-r--r--phpBB/index.php24
-rw-r--r--phpBB/styles/subSilver/template/index_body.html2
-rw-r--r--phpBB/styles/subSilver/template/viewforum_body.html2
-rw-r--r--phpBB/styles/subSilver/template/viewforum_subforum.html87
-rw-r--r--phpBB/viewforum.php4
7 files changed, 155 insertions, 170 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 6d469f2a3d..3ba26e68cc 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -524,118 +524,79 @@ function markread($mode, $forum_id = 0, $topic_id = 0, $marktime = false)
case 'mark':
if ($config['load_db_lastread'])
{
- // Mark one forum as read.
- // Do this by inserting a record with -$forum_id in the 'forum_id' field.
- // User has marked this topic as read before: Update the record
- $db->sql_return_on_error(true);
-
- $sql = 'UPDATE ' . FORUMS_TRACK_TABLE . "
- SET mark_time = $current_time
- WHERE user_id = " . $user->data['user_id'] . "
- AND forum_id = $forum_id
- AND mark_time < $current_time";
- if (!$db->sql_query($sql) || !$db->sql_affectedrows())
- {
- // User is marking this forum for the first time.
- // Insert dummy topic_id to satisfy PRIMARY KEY (user_id, topic_id)
- // dummy id = -forum_id
- $sql = 'INSERT INTO ' . FORUMS_TRACK_TABLE . ' (user_id, forum_id, mark_time)
- VALUES (' . $user->data['user_id'] . ", $forum_id, $current_time)";
- $db->sql_query($sql);
- }
+ $sql_where = (is_array($forum_id)) ? ' IN (' . implode(', ', $forum_id) . ')' : " = $forum_id";
- $db->sql_return_on_error(false);
- }
- else
- {
- $tracking = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? unserialize(stripslashes($_COOKIE[$config['cookie_name'] . '_track'])) : array();
-
- unset($tracking[$forum_id]);
- $tracking[$forum_id][0] = base_convert($current_time - $config['board_startdate'], 10, 36);
-
- setcookie($config['cookie_name'] . '_track', serialize($tracking), time() + 31536000, $config['cookie_path'], $config['cookie_domain'], $config['cookie_secure']);
- unset($tracking);
- }
- break;
-
- case 'markall':
- // Mark all forums as read
-
- if ($config['load_db_lastread'])
- {
- $sql = 'UPDATE ' . FORUMS_TRACK_TABLE . '
- SET mark_time = ' . $current_time . '
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TRACK_TABLE . '
WHERE user_id = ' . $user->data['user_id'] . "
- AND mark_time < $current_time";
- $db->sql_query($sql);
- }
- else
- {
- $tracking = array();
- }
+ AND forum_id $sql_where";
+ $result = $db->sql_query($sql);
- // Select all forum_id's that are not yet in the lastread table
- switch (SQL_LAYER)
- {
- case 'oracle':
- break;
+ $sql_update = array();
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $sql_update[] = $row['forum_id'];
+ }
+ $db->sql_freeresult($result);
- default:
- $sql = ($config['load_db_lastread']) ? 'SELECT f.forum_id FROM (' . FORUMS_TABLE . ' f LEFT JOIN ' . FORUMS_TRACK_TABLE . ' ft ON (ft.user_id = ' . $user->data['user_id'] . ' AND ft.forum_id = f.forum_id)) WHERE ft.forum_id IS NULL' : 'SELECT forum_id FROM ' . FORUMS_TABLE;
- }
- $result = $db->sql_query($sql);
+ if (sizeof($sql_update))
+ {
+ $sql = 'UPDATE ' . FORUMS_TRACK_TABLE . "
+ SET mark_time = $current_time
+ WHERE user_id = " . $user->data['user_id'] . '
+ AND forum_id IN (' . implode(', ', $sql_update) . ')';
+ $db->sql_query($sql);
+ }
- $db->sql_return_on_error(true);
- if ($row = $db->sql_fetchrow($result))
- {
- do
+ if ($sql_insert = array_diff($forum_id, $sql_update))
{
- if ($config['load_db_lastread'])
+ foreach ($sql_insert as $forum_id)
{
$sql = '';
- // Some forum_id's are missing. We are not taking into account
- // the auth data, even forums the user can't see are marked as read.
switch (SQL_LAYER)
{
case 'mysql':
case 'mysql4':
- $sql .= (($sql != '') ? ', ' : '') . '(' . $user->data['user_id'] . ', ' . $row['forum_id'] . ", $current_time)";
+ $sql .= (($sql != '') ? ', ' : '') . '(' . $user->data['user_id'] . ", $forum_id, $current_time)";
$sql = 'VALUES ' . $sql;
break;
case 'mssql':
case 'sqlite':
- $sql = (($sql != '') ? ' UNION ALL ' : '') . ' SELECT ' . $user->data['user_id'] . ', ' . $row['forum_id'] . ", $current_time";
+ $sql .= (($sql != '') ? ' UNION ALL ' : '') . ' SELECT ' . $user->data['user_id'] . ", $forum_id, $current_time";
break;
default:
$sql = 'INSERT INTO ' . FORUMS_TRACK_TABLE . ' (user_id, forum_id, mark_time)
- VALUES (' . $user->data['user_id'] . ', ' . $row['forum_id'] . ", $current_time)";
+ VALUES (' . $user->data['user_id'] . ", $forum_id, $current_time)";
$db->sql_query($sql);
$sql = '';
}
- if ($sql != '')
+ if ($sql)
{
$sql = 'INSERT INTO ' . FORUMS_TRACK_TABLE . " (user_id, forum_id, mark_time) $sql";
$db->sql_query($sql);
}
}
- else
- {
- $tracking[$row['forum_id']][0] = base_convert($current_time - $config['board_startdate'], 10, 36);
- }
}
- while ($row = $db->sql_fetchrow($result));
- $db->sql_freeresult($result);
+ unset($sql_update);
+ unset($sql_insert);
+ }
+ else
+ {
+ $tracking = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? unserialize(stripslashes($_COOKIE[$config['cookie_name'] . '_track'])) : array();
- $db->sql_return_on_error(false);
+ $forum_id_ary = (!is_array($forum_id)) ? array($forum_id) : $forum_id;
- if (!$config['load_db_lastread'])
+ foreach ($forum_id_ary as $forum_id)
{
- setcookie($config['cookie_name'] . '_track', serialize($tracking), time() + 31536000, $config['cookie_path'], $config['cookie_domain'], $config['cookie_secure']);
- unset($tracking);
+ unset($tracking[$forum_id]);
+ $tracking[$forum_id][0] = base_convert($current_time - $config['board_startdate'], 10, 36);
}
+
+ setcookie($config['cookie_name'] . '_track', serialize($tracking), time() + 31536000, $config['cookie_path'], $config['cookie_domain'], $config['cookie_secure']);
+ unset($tracking);
}
break;
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index a8a0a80244..7275e26525 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -15,6 +15,10 @@ function display_forums($root_data = '', $display_moderators = TRUE)
{
global $config, $db, $template, $auth, $user, $phpEx, $SID, $forum_moderators;
+ // Get posted/get info
+ $mark_read = request_var('mark', '');
+
+ $forum_id_ary = array();
$visible_forums = 0;
if (!$root_data)
@@ -60,6 +64,16 @@ function display_forums($root_data = '', $display_moderators = TRUE)
while ($row = $db->sql_fetchrow($result))
{
+ if ($mark_read == 'forums' && $userdata['user_id'] != ANONYMOUS)
+ {
+ if ($auth->acl_get('f_list', $row['forum_id']))
+ {
+ $forum_id_ary[] = $row['forum_id'];
+ }
+
+ continue;
+ }
+
if (isset($right_id))
{
if ($row['left_id'] < $right_id)
@@ -129,6 +143,19 @@ function display_forums($root_data = '', $display_moderators = TRUE)
}
$db->sql_freeresult();
+ // Handle marking posts
+ if ($mark_read == 'forums')
+ {
+ markread('mark', $forum_id_ary);
+
+ $redirect = (!empty($_SERVER['REQUEST_URI'])) ? preg_replace('#^(.*?)&(amp;)?mark=.*$#', '\1', htmlspecialchars($_SERVER['REQUEST_URI'])) : "index.$phpEx$SID";
+ meta_refresh(3, $redirect);
+
+ $message = (strstr('viewforum', $redirect)) ? 'RETURN_FORUM' : 'RETURN_INDEX';
+ $message = $user->lang['FORUMS_MARKED'] . '<br /><br />' . sprintf($user->lang[$message], '<a href="' . $redirect . '">', '</a> ');
+ trigger_error($message);
+ }
+
// Grab moderators ... if necessary
if ($display_moderators)
{
@@ -158,7 +185,7 @@ function display_forums($root_data = '', $display_moderators = TRUE)
'FORUM_ID' => $hold['forum_id'],
'FORUM_NAME' => $hold['forum_name'],
'FORUM_DESC' => $hold['forum_desc'],
- 'U_VIEWFORUM' => 'viewforum.' . $phpEx . $SID . '&amp;f=' . $hold['forum_id'])
+ 'U_VIEWFORUM' => "viewforum.$phpEx$SID&amp;f=" . $hold['forum_id'])
);
unset($hold);
}
@@ -254,34 +281,38 @@ function display_forums($root_data = '', $display_moderators = TRUE)
$post_click_count = ($row['forum_type'] != FORUM_LINK || $row['forum_flags'] & 1) ? $row['forum_posts'] : '';
$template->assign_block_vars('forumrow', array(
- 'S_IS_CAT' => false,
- 'S_IS_LINK' => ($row['forum_type'] != FORUM_LINK) ? false : true,
-
- 'FORUM_IMG' => $row['forum_image'],
- 'LAST_POST_IMG' => $user->img('icon_post_latest', 'VIEW_LATEST_POST'),
-
- 'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt),
- 'FORUM_NAME' => $row['forum_name'],
- 'FORUM_DESC' => $row['forum_desc'],
- $l_post_click_count => $post_click_count,
- 'TOPICS' => $row['forum_topics'],
- 'LAST_POST_TIME' => $last_post_time,
- 'LAST_POSTER' => $last_poster,
- 'MODERATORS' => $moderators_list,
- 'SUBFORUMS' => $subforums_list,
-
- 'L_SUBFORUM_STR' => $l_subforums,
- 'L_MODERATOR_STR' => $l_moderator,
- 'L_FORUM_FOLDER_ALT'=> $folder_alt,
+ 'S_IS_CAT' => false,
+ 'S_IS_LINK' => ($row['forum_type'] != FORUM_LINK) ? false : true,
+
+ 'FORUM_IMG' => $row['forum_image'],
+ 'LAST_POST_IMG' => $user->img('icon_post_latest', 'VIEW_LATEST_POST'),
+
+ 'FORUM_ID' => $row['forum_id'],
+ 'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt),
+ 'FORUM_NAME' => $row['forum_name'],
+ 'FORUM_DESC' => $row['forum_desc'],
+ $l_post_click_count => $post_click_count,
+ 'TOPICS' => $row['forum_topics'],
+ 'LAST_POST_TIME' => $last_post_time,
+ 'LAST_POSTER' => $last_poster,
+ 'MODERATORS' => $moderators_list,
+ 'SUBFORUMS' => $subforums_list,
+
+ 'L_SUBFORUM_STR' => $l_subforums,
+ 'L_MODERATOR_STR' => $l_moderator,
+ 'L_FORUM_FOLDER_ALT'=> $folder_alt,
- 'U_LAST_POSTER' => $last_poster_url,
- 'U_LAST_POST' => $last_post_url,
- 'U_VIEWFORUM' => ($row['forum_type'] != FORUM_LINK || $row['forum_flags'] & 1) ? 'viewforum.' . $phpEx . $SID . '&amp;f=' . $row['forum_id'] : $row['forum_link'])
+ 'U_LAST_POSTER' => $last_poster_url,
+ 'U_LAST_POST' => $last_post_url,
+ 'U_VIEWFORUM' => ($row['forum_type'] != FORUM_LINK || $row['forum_flags'] & 1) ? "viewforum.$phpEx$SID&amp;f=" . $row['forum_id'] : $row['forum_link'])
);
}
$template->assign_vars(array(
+ 'U_MARK_FORUMS' => "viewforum.$phpEx$SID&amp;f=" . $root_data['forum_id'] . '&amp;mark=forums',
+
'S_HAS_SUBFORUM' => ($visible_forums) ? true : false,
+
'L_SUBFORUM' => ($visible_forums == 1) ? $user->lang['SUBFORUM'] : $user->lang['SUBFORUMS'])
);
}
@@ -353,11 +384,11 @@ function display_attachments($blockname, $attachment_data, &$update_count, $forc
$upload_image = '';
- if ($user->img('icon_attach', '') != '' && $extensions[$attachment['extension']]['upload_icon'] == '')
+ if ($user->img('icon_attach', '') && !$extensions[$attachment['extension']]['upload_icon'])
{
$upload_image = $user->img('icon_attach', '');
}
- else if ($extensions[$attachment['extension']]['upload_icon'] != '')
+ else if ($extensions[$attachment['extension']]['upload_icon'])
{
$upload_image = '<img src="' . $phpbb_root_path . $config['upload_icons_path'] . '/' . trim($extensions[$attachment['extension']]['upload_icon']) . '" alt="" border="0" />';
}
@@ -380,10 +411,13 @@ function display_attachments($blockname, $attachment_data, &$update_count, $forc
$template_array['VAL'] = array(sprintf($user->lang['EXTENSION_DISABLED_AFTER_POSTING'], $attachment['extension']));
$tpl = str_replace($template_array['VAR'], $template_array['VAL'], $attachment_tpl['DENIED']);
+
// Replace {L_*} lang strings
$tpl = preg_replace('/{L_([A-Z_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $tpl);
- $template->assign_block_vars('postrow.attachment', array('SHOW_ATTACHMENT' => $tpl));
+ $template->assign_block_vars('postrow.attachment', array(
+ 'SHOW_ATTACHMENT' => $tpl)
+ );
}
if (!$denied)
@@ -498,10 +532,13 @@ function display_attachments($blockname, $attachment_data, &$update_count, $forc
);
$tpl = str_replace($template_array['VAR'], $template_array['VAL'], $attachment_tpl[$current_block]);
+
// Replace {L_*} lang strings
$tpl = preg_replace('/{L_([A-Z_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $tpl);
- $template->assign_block_vars($blockname, array('DISPLAY_ATTACHMENT' => $tpl));
+ $template->assign_block_vars($blockname, array(
+ 'DISPLAY_ATTACHMENT' => $tpl)
+ );
}
}
diff --git a/phpBB/index.php b/phpBB/index.php
index 3ac1e34175..a407792e50 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -16,28 +16,11 @@ $phpbb_root_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.'.$phpEx);
-// Get posted/get info
-$mark_read = (isset($_REQUEST['mark'])) ? $_REQUEST['mark'] : '';
-
// Start session management
$user->start();
$auth->acl($user->data);
$user->setup();
-// Handle marking posts
-if ($mark_read == 'forums')
-{
- if ($userdata['user_id'] != ANONYMOUS)
- {
- markread('markall');
- }
-
- meta_refresh(3, "index.$phpEx$SID");
-
- $message = $user->lang['FORUMS_MARKED'] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . "index.$phpEx$SID" . '">', '</a> ');
- trigger_error($message);
-}
-
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
display_forums();
@@ -54,9 +37,8 @@ $l_total_topic_s = ($total_topics == 0) ? 'TOTAL_TOPICS_ZERO' : 'TOTAL_TOPICS_OT
// Grab group details for legend display
$sql = 'SELECT group_name, group_colour, group_type
- FROM ' . GROUPS_TABLE . "
- WHERE group_colour <> ''
- AND group_type NOT IN (" . GROUP_HIDDEN . ', ' . GROUP_SPECIAL . ')';
+ FROM ' . GROUPS_TABLE . '
+ WHERE group_legend = 1';
$result = $db->sql_query($sql);
$legend = '';
@@ -106,7 +88,7 @@ $template->assign_vars(array(
'S_LOGIN_ACTION' => "ucp.php?$SID&amp;mode=login",
'S_DISPLAY_BIRTHDAY_LIST' => ($config['load_birthdays']) ? true : false,
- 'U_MARK_READ' => "index.$phpEx$SID&amp;mark=forums")
+ 'U_MARK_FORUMS' => "index.$phpEx$SID&amp;mark=forums")
);
// Output page
diff --git a/phpBB/styles/subSilver/template/index_body.html b/phpBB/styles/subSilver/template/index_body.html
index f152ef69fd..78726545ef 100644
--- a/phpBB/styles/subSilver/template/index_body.html
+++ b/phpBB/styles/subSilver/template/index_body.html
@@ -4,7 +4,7 @@
<table class="tablebg" cellspacing="1">
<tr>
- <td class="cat" colspan="5" align="right"><a class="nav" href="{U_MARK_READ}">{L_MARK_FORUMS_READ}</a>&nbsp;</td>
+ <td class="cat" colspan="5" align="right"><a class="nav" href="{U_MARK_FORUMS}">{L_MARK_FORUMS_READ}</a>&nbsp;</td>
</tr>
<tr>
<th colspan="2">&nbsp;{L_FORUM}&nbsp;</th>
diff --git a/phpBB/styles/subSilver/template/viewforum_body.html b/phpBB/styles/subSilver/template/viewforum_body.html
index cc31f4cdf3..4c81b55ef2 100644
--- a/phpBB/styles/subSilver/template/viewforum_body.html
+++ b/phpBB/styles/subSilver/template/viewforum_body.html
@@ -56,7 +56,7 @@
<td class="cat" colspan="<!-- IF S_TOPIC_ICONS -->7<!-- ELSE -->6<!-- ENDIF -->"><table width="100%" cellspacing="0">
<tr class="nav">
<td valign="middle">&nbsp;<!-- IF S_WATCH_FORUM -->{S_WATCH_FORUM}<!-- ENDIF --></td>
- <td align="right" valign="middle"><a href="{U_MARK_READ}">{L_MARK_TOPICS_READ}</a>&nbsp;</td>
+ <td align="right" valign="middle"><a href="{U_MARK_TOPICS}">{L_MARK_TOPICS_READ}</a>&nbsp;</td>
</tr>
</table></td>
</tr>
diff --git a/phpBB/styles/subSilver/template/viewforum_subforum.html b/phpBB/styles/subSilver/template/viewforum_subforum.html
index dc3ce015bc..e7baeeb705 100644
--- a/phpBB/styles/subSilver/template/viewforum_subforum.html
+++ b/phpBB/styles/subSilver/template/viewforum_subforum.html
@@ -1,43 +1,48 @@
-<table class="tablebg" width="100%" cellspacing="1">
- <tr>
- <th colspan="2" nowrap="nowrap">&nbsp;{L_FORUM}&nbsp;</th>
- <th width="50" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th>
- <th width="50" nowrap="nowrap">&nbsp;{L_POSTS}&nbsp;</th>
- <th nowrap="nowrap">&nbsp;{L_LAST_POST}&nbsp;</th>
- </tr>
- <!-- BEGIN forumrow -->
- <!-- IF forumrow.S_IS_CAT -->
- <tr>
- <td class="cat" colspan="2"><a class="cattitle" href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a></td>
- <td class="catdiv" colspan="3" align="right">&nbsp;</td>
- </tr>
- <!-- ELSEIF forumrow.S_IS_LINK -->
- <tr>
- <td class="row1" width="50" height="50" align="center" valign="middle">{forumrow.FORUM_FOLDER_IMG}</td>
- <td class="row1" height="50"><a class="forumlink" href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a><br />
- <table cellspacing="5" cellpadding="0" border="0">
- <tr>
- <td><span class="gensmall">{forumrow.FORUM_DESC}</span></td>
- </tr>
- </table></td>
- <td class="row2" colspan="3" align="center" valign="middle" height="50"><!-- IF forumrow.CLICKS --><span class="gensmall">{L_REDIRECTS}: {forumrow.CLICKS}</span><!-- ENDIF --></td>
- </tr>
- <!-- ELSE -->
- <tr>
- <td class="row1" width="50" height="50" align="center" valign="middle">{forumrow.FORUM_FOLDER_IMG}</td>
- <td class="row1" width="100%" height="50" valign="top"><a class="forumlink" href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a><br />
- <table cellspacing="5" cellpadding="0" border="0">
- <tr>
- <td><span class="gensmall">{forumrow.FORUM_DESC}</span></td>
- </tr>
- </table><span class="gensmall"><!-- IF forumrow.MODERATORS --><b>{forumrow.L_MODERATOR_STR}:</b> {forumrow.MODERATORS}<br /><!-- ENDIF --><!-- IF forumrow.SUBFORUMS --><br /><b>{forumrow.L_SUBFORUM_STR}</b> {forumrow.SUBFORUMS}<!-- ENDIF --></span></td>
- <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{forumrow.TOPICS}</span></td>
- <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{forumrow.POSTS}</span></td>
- <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"><span class="gensmall"><!-- IF forumrow.LAST_POST_TIME -->{forumrow.LAST_POST_TIME}<br /><!-- IF forumrow.U_LAST_POSTER --><a href="{forumrow.U_LAST_POSTER}">{forumrow.LAST_POSTER}</a><!-- ELSE -->{forumrow.LAST_POSTER}<!-- ENDIF --> <a href="{forumrow.U_LAST_POST}">{forumrow.LAST_POST_IMG}</a><!-- ELSE -->{L_NO_POSTS}<!-- ENDIF --></span></td>
- </tr>
- <!-- ENDIF -->
- <!-- END forumrow -->
-</table>
+ <!-- $Id$ -->
-<br clear="all" />
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="cat" colspan="5" align="right"><a class="nav" href="{U_MARK_FORUMS}">{L_MARK_FORUMS_READ}</a>&nbsp;</td>
+ </tr>
+ <tr>
+ <th colspan="2" nowrap="nowrap">&nbsp;{L_FORUM}&nbsp;</th>
+ <th width="50" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th>
+ <th width="50" nowrap="nowrap">&nbsp;{L_POSTS}&nbsp;</th>
+ <th nowrap="nowrap">&nbsp;{L_LAST_POST}&nbsp;</th>
+ </tr>
+ <!-- BEGIN forumrow -->
+ <!-- IF forumrow.S_IS_CAT -->
+ <tr>
+ <td class="cat" colspan="2"><a class="cattitle" href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a></td>
+ <td class="catdiv" colspan="3" align="right">&nbsp;</td>
+ </tr>
+ <!-- ELSEIF forumrow.S_IS_LINK -->
+ <tr>
+ <td class="row1" width="50" height="50" align="center" valign="middle">{forumrow.FORUM_FOLDER_IMG}</td>
+ <td class="row1" height="50"><a class="forumlink" href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a><br />
+ <table cellspacing="5" cellpadding="0" border="0">
+ <tr>
+ <td><span class="gensmall">{forumrow.FORUM_DESC}</span></td>
+ </tr>
+ </table></td>
+ <td class="row2" colspan="3" align="center" valign="middle" height="50"><!-- IF forumrow.CLICKS --><span class="gensmall">{L_REDIRECTS}: {forumrow.CLICKS}</span><!-- ENDIF --></td>
+ </tr>
+ <!-- ELSE -->
+ <tr>
+ <td class="row1" width="50" height="50" align="center" valign="middle">{forumrow.FORUM_FOLDER_IMG}</td>
+ <td class="row1" width="100%" height="50" valign="top"><a class="forumlink" href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a><br />
+ <table cellspacing="5" cellpadding="0" border="0">
+ <tr>
+ <td><span class="gensmall">{forumrow.FORUM_DESC}</span></td>
+ </tr>
+ </table><span class="gensmall"><!-- IF forumrow.MODERATORS --><b>{forumrow.L_MODERATOR_STR}:</b> {forumrow.MODERATORS}<br /><!-- ENDIF --><!-- IF forumrow.SUBFORUMS --><br /><b>{forumrow.L_SUBFORUM_STR}</b> {forumrow.SUBFORUMS}<!-- ENDIF --></span></td>
+ <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{forumrow.TOPICS}</span></td>
+ <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{forumrow.POSTS}</span></td>
+ <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"><span class="gensmall"><!-- IF forumrow.LAST_POST_TIME -->{forumrow.LAST_POST_TIME}<br /><!-- IF forumrow.U_LAST_POSTER --><a href="{forumrow.U_LAST_POSTER}">{forumrow.LAST_POSTER}</a><!-- ELSE -->{forumrow.LAST_POSTER}<!-- ENDIF --> <a href="{forumrow.U_LAST_POST}">{forumrow.LAST_POST_IMG}</a><!-- ELSE -->{L_NO_POSTS}<!-- ENDIF --></span></td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- END forumrow -->
+ </table>
+
+ <br clear="all" />
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 4e5797de09..9d16557d28 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -278,7 +278,7 @@ if ($forum_data['forum_type'] == FORUM_POST)
'U_MCP' => ($auth->acl_gets('m_', $forum_id)) ? "mcp.$phpEx?sid=$user->session_id&amp;f=$forum_id&amp;mode=forum_view" : '',
'U_POST_NEW_TOPIC' => "posting.$phpEx$SID&amp;mode=post&amp;f=$forum_id",
- 'U_MARK_READ' => "viewforum.$phpEx$SID&amp;f=$forum_id&amp;mark=topics")
+ 'U_MARK_TOPICS' => "viewforum.$phpEx$SID&amp;f=$forum_id&amp;mark=topics")
);
// Grab icons
@@ -540,7 +540,7 @@ if ($forum_data['forum_type'] == FORUM_POST)
'NEWEST_POST_IMG' => $newest_post_img,
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? '<img src="' . $config['icons_path'] . '/' . $icons[$row['icon_id']]['img'] . '" width="' . $icons[$row['icon_id']]['width'] . '" height="' . $icons[$row['icon_id']]['height'] . '" alt="" title="" />' : '',
- 'ATTACH_ICON_IMG' => ($auth->acl_gets('f_download', 'u_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_attach', '') : '',
+ 'ATTACH_ICON_IMG' => ($auth->acl_gets('f_download', 'u_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_attach', sprintf($user->lang['TOTAL_ATTACHMENTS'], $row['topic_attachment'])) : '',
'S_ROW_COUNT' => $i,
'S_TOPIC_TYPE_SWITCH' => ($s_type_switch == $s_type_switch_test) ? -1 : $s_type_switch_test,