mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Mark given set of forums marked, show "Mark forums read" link on subforum display
git-svn-id: file:///svn/phpbb/trunk@4757 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
38c0873243
commit
bc79bf9652
7 changed files with 152 additions and 167 deletions
|
@ -524,119 +524,80 @@ function markread($mode, $forum_id = 0, $topic_id = 0, $marktime = false)
|
||||||
case 'mark':
|
case 'mark':
|
||||||
if ($config['load_db_lastread'])
|
if ($config['load_db_lastread'])
|
||||||
{
|
{
|
||||||
// Mark one forum as read.
|
$sql_where = (is_array($forum_id)) ? ' IN (' . implode(', ', $forum_id) . ')' : " = $forum_id";
|
||||||
// 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 . "
|
$sql = 'SELECT forum_id
|
||||||
SET mark_time = $current_time
|
FROM ' . FORUMS_TRACK_TABLE . '
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
$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 . '
|
|
||||||
WHERE user_id = ' . $user->data['user_id'] . "
|
WHERE user_id = ' . $user->data['user_id'] . "
|
||||||
AND mark_time < $current_time";
|
AND forum_id $sql_where";
|
||||||
$db->sql_query($sql);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$tracking = array();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Select all forum_id's that are not yet in the lastread table
|
|
||||||
switch (SQL_LAYER)
|
|
||||||
{
|
|
||||||
case 'oracle':
|
|
||||||
break;
|
|
||||||
|
|
||||||
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);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
$db->sql_return_on_error(true);
|
$sql_update = array();
|
||||||
if ($row = $db->sql_fetchrow($result))
|
if ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
do
|
$sql_update[] = $row['forum_id'];
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
if (sizeof($sql_update))
|
||||||
{
|
{
|
||||||
if ($config['load_db_lastread'])
|
$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);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($sql_insert = array_diff($forum_id, $sql_update))
|
||||||
|
{
|
||||||
|
foreach ($sql_insert as $forum_id)
|
||||||
{
|
{
|
||||||
$sql = '';
|
$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)
|
switch (SQL_LAYER)
|
||||||
{
|
{
|
||||||
case 'mysql':
|
case 'mysql':
|
||||||
case 'mysql4':
|
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;
|
$sql = 'VALUES ' . $sql;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'mssql':
|
case 'mssql':
|
||||||
case 'sqlite':
|
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;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$sql = 'INSERT INTO ' . FORUMS_TRACK_TABLE . ' (user_id, forum_id, mark_time)
|
$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);
|
$db->sql_query($sql);
|
||||||
$sql = '';
|
$sql = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($sql != '')
|
if ($sql)
|
||||||
{
|
{
|
||||||
$sql = 'INSERT INTO ' . FORUMS_TRACK_TABLE . " (user_id, forum_id, mark_time) $sql";
|
$sql = 'INSERT INTO ' . FORUMS_TRACK_TABLE . " (user_id, forum_id, mark_time) $sql";
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
unset($sql_update);
|
||||||
|
unset($sql_insert);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$tracking[$row['forum_id']][0] = base_convert($current_time - $config['board_startdate'], 10, 36);
|
$tracking = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? unserialize(stripslashes($_COOKIE[$config['cookie_name'] . '_track'])) : array();
|
||||||
}
|
|
||||||
}
|
|
||||||
while ($row = $db->sql_fetchrow($result));
|
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
$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)
|
||||||
{
|
{
|
||||||
|
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']);
|
setcookie($config['cookie_name'] . '_track', serialize($tracking), time() + 31536000, $config['cookie_path'], $config['cookie_domain'], $config['cookie_secure']);
|
||||||
unset($tracking);
|
unset($tracking);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'post':
|
case 'post':
|
||||||
|
|
|
@ -15,6 +15,10 @@ function display_forums($root_data = '', $display_moderators = TRUE)
|
||||||
{
|
{
|
||||||
global $config, $db, $template, $auth, $user, $phpEx, $SID, $forum_moderators;
|
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;
|
$visible_forums = 0;
|
||||||
|
|
||||||
if (!$root_data)
|
if (!$root_data)
|
||||||
|
@ -60,6 +64,16 @@ function display_forums($root_data = '', $display_moderators = TRUE)
|
||||||
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
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 (isset($right_id))
|
||||||
{
|
{
|
||||||
if ($row['left_id'] < $right_id)
|
if ($row['left_id'] < $right_id)
|
||||||
|
@ -129,6 +143,19 @@ function display_forums($root_data = '', $display_moderators = TRUE)
|
||||||
}
|
}
|
||||||
$db->sql_freeresult();
|
$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
|
// Grab moderators ... if necessary
|
||||||
if ($display_moderators)
|
if ($display_moderators)
|
||||||
{
|
{
|
||||||
|
@ -158,7 +185,7 @@ function display_forums($root_data = '', $display_moderators = TRUE)
|
||||||
'FORUM_ID' => $hold['forum_id'],
|
'FORUM_ID' => $hold['forum_id'],
|
||||||
'FORUM_NAME' => $hold['forum_name'],
|
'FORUM_NAME' => $hold['forum_name'],
|
||||||
'FORUM_DESC' => $hold['forum_desc'],
|
'FORUM_DESC' => $hold['forum_desc'],
|
||||||
'U_VIEWFORUM' => 'viewforum.' . $phpEx . $SID . '&f=' . $hold['forum_id'])
|
'U_VIEWFORUM' => "viewforum.$phpEx$SID&f=" . $hold['forum_id'])
|
||||||
);
|
);
|
||||||
unset($hold);
|
unset($hold);
|
||||||
}
|
}
|
||||||
|
@ -260,6 +287,7 @@ function display_forums($root_data = '', $display_moderators = TRUE)
|
||||||
'FORUM_IMG' => $row['forum_image'],
|
'FORUM_IMG' => $row['forum_image'],
|
||||||
'LAST_POST_IMG' => $user->img('icon_post_latest', 'VIEW_LATEST_POST'),
|
'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_FOLDER_IMG' => $user->img($folder_image, $folder_alt),
|
||||||
'FORUM_NAME' => $row['forum_name'],
|
'FORUM_NAME' => $row['forum_name'],
|
||||||
'FORUM_DESC' => $row['forum_desc'],
|
'FORUM_DESC' => $row['forum_desc'],
|
||||||
|
@ -276,12 +304,15 @@ function display_forums($root_data = '', $display_moderators = TRUE)
|
||||||
|
|
||||||
'U_LAST_POSTER' => $last_poster_url,
|
'U_LAST_POSTER' => $last_poster_url,
|
||||||
'U_LAST_POST' => $last_post_url,
|
'U_LAST_POST' => $last_post_url,
|
||||||
'U_VIEWFORUM' => ($row['forum_type'] != FORUM_LINK || $row['forum_flags'] & 1) ? 'viewforum.' . $phpEx . $SID . '&f=' . $row['forum_id'] : $row['forum_link'])
|
'U_VIEWFORUM' => ($row['forum_type'] != FORUM_LINK || $row['forum_flags'] & 1) ? "viewforum.$phpEx$SID&f=" . $row['forum_id'] : $row['forum_link'])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
|
'U_MARK_FORUMS' => "viewforum.$phpEx$SID&f=" . $root_data['forum_id'] . '&mark=forums',
|
||||||
|
|
||||||
'S_HAS_SUBFORUM' => ($visible_forums) ? true : false,
|
'S_HAS_SUBFORUM' => ($visible_forums) ? true : false,
|
||||||
|
|
||||||
'L_SUBFORUM' => ($visible_forums == 1) ? $user->lang['SUBFORUM'] : $user->lang['SUBFORUMS'])
|
'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 = '';
|
$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', '');
|
$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" />';
|
$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']));
|
$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']);
|
$tpl = str_replace($template_array['VAR'], $template_array['VAL'], $attachment_tpl['DENIED']);
|
||||||
|
|
||||||
// Replace {L_*} lang strings
|
// Replace {L_*} lang strings
|
||||||
$tpl = preg_replace('/{L_([A-Z_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $tpl);
|
$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)
|
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]);
|
$tpl = str_replace($template_array['VAR'], $template_array['VAL'], $attachment_tpl[$current_block]);
|
||||||
|
|
||||||
// Replace {L_*} lang strings
|
// Replace {L_*} lang strings
|
||||||
$tpl = preg_replace('/{L_([A-Z_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $tpl);
|
$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)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,28 +16,11 @@ $phpbb_root_path = './';
|
||||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||||
include($phpbb_root_path . 'common.'.$phpEx);
|
include($phpbb_root_path . 'common.'.$phpEx);
|
||||||
|
|
||||||
// Get posted/get info
|
|
||||||
$mark_read = (isset($_REQUEST['mark'])) ? $_REQUEST['mark'] : '';
|
|
||||||
|
|
||||||
// Start session management
|
// Start session management
|
||||||
$user->start();
|
$user->start();
|
||||||
$auth->acl($user->data);
|
$auth->acl($user->data);
|
||||||
$user->setup();
|
$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);
|
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
||||||
display_forums();
|
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
|
// Grab group details for legend display
|
||||||
$sql = 'SELECT group_name, group_colour, group_type
|
$sql = 'SELECT group_name, group_colour, group_type
|
||||||
FROM ' . GROUPS_TABLE . "
|
FROM ' . GROUPS_TABLE . '
|
||||||
WHERE group_colour <> ''
|
WHERE group_legend = 1';
|
||||||
AND group_type NOT IN (" . GROUP_HIDDEN . ', ' . GROUP_SPECIAL . ')';
|
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
$legend = '';
|
$legend = '';
|
||||||
|
@ -106,7 +88,7 @@ $template->assign_vars(array(
|
||||||
'S_LOGIN_ACTION' => "ucp.php?$SID&mode=login",
|
'S_LOGIN_ACTION' => "ucp.php?$SID&mode=login",
|
||||||
'S_DISPLAY_BIRTHDAY_LIST' => ($config['load_birthdays']) ? true : false,
|
'S_DISPLAY_BIRTHDAY_LIST' => ($config['load_birthdays']) ? true : false,
|
||||||
|
|
||||||
'U_MARK_READ' => "index.$phpEx$SID&mark=forums")
|
'U_MARK_FORUMS' => "index.$phpEx$SID&mark=forums")
|
||||||
);
|
);
|
||||||
|
|
||||||
// Output page
|
// Output page
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<table class="tablebg" cellspacing="1">
|
<table class="tablebg" cellspacing="1">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="cat" colspan="5" align="right"><a class="nav" href="{U_MARK_READ}">{L_MARK_FORUMS_READ}</a> </td>
|
<td class="cat" colspan="5" align="right"><a class="nav" href="{U_MARK_FORUMS}">{L_MARK_FORUMS_READ}</a> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2"> {L_FORUM} </th>
|
<th colspan="2"> {L_FORUM} </th>
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
<td class="cat" colspan="<!-- IF S_TOPIC_ICONS -->7<!-- ELSE -->6<!-- ENDIF -->"><table width="100%" cellspacing="0">
|
<td class="cat" colspan="<!-- IF S_TOPIC_ICONS -->7<!-- ELSE -->6<!-- ENDIF -->"><table width="100%" cellspacing="0">
|
||||||
<tr class="nav">
|
<tr class="nav">
|
||||||
<td valign="middle"> <!-- IF S_WATCH_FORUM -->{S_WATCH_FORUM}<!-- ENDIF --></td>
|
<td valign="middle"> <!-- IF S_WATCH_FORUM -->{S_WATCH_FORUM}<!-- ENDIF --></td>
|
||||||
<td align="right" valign="middle"><a href="{U_MARK_READ}">{L_MARK_TOPICS_READ}</a> </td>
|
<td align="right" valign="middle"><a href="{U_MARK_TOPICS}">{L_MARK_TOPICS_READ}</a> </td>
|
||||||
</tr>
|
</tr>
|
||||||
</table></td>
|
</table></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
|
|
||||||
<table class="tablebg" width="100%" cellspacing="1">
|
<!-- $Id$ -->
|
||||||
|
|
||||||
|
<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> </td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2" nowrap="nowrap"> {L_FORUM} </th>
|
<th colspan="2" nowrap="nowrap"> {L_FORUM} </th>
|
||||||
<th width="50" nowrap="nowrap"> {L_TOPICS} </th>
|
<th width="50" nowrap="nowrap"> {L_TOPICS} </th>
|
||||||
|
@ -38,6 +43,6 @@
|
||||||
</tr>
|
</tr>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<!-- END forumrow -->
|
<!-- END forumrow -->
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<br clear="all" />
|
<br clear="all" />
|
||||||
|
|
|
@ -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&f=$forum_id&mode=forum_view" : '',
|
'U_MCP' => ($auth->acl_gets('m_', $forum_id)) ? "mcp.$phpEx?sid=$user->session_id&f=$forum_id&mode=forum_view" : '',
|
||||||
'U_POST_NEW_TOPIC' => "posting.$phpEx$SID&mode=post&f=$forum_id",
|
'U_POST_NEW_TOPIC' => "posting.$phpEx$SID&mode=post&f=$forum_id",
|
||||||
'U_MARK_READ' => "viewforum.$phpEx$SID&f=$forum_id&mark=topics")
|
'U_MARK_TOPICS' => "viewforum.$phpEx$SID&f=$forum_id&mark=topics")
|
||||||
);
|
);
|
||||||
|
|
||||||
// Grab icons
|
// Grab icons
|
||||||
|
@ -540,7 +540,7 @@ if ($forum_data['forum_type'] == FORUM_POST)
|
||||||
'NEWEST_POST_IMG' => $newest_post_img,
|
'NEWEST_POST_IMG' => $newest_post_img,
|
||||||
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
|
'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="" />' : '',
|
'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_ROW_COUNT' => $i,
|
||||||
'S_TOPIC_TYPE_SWITCH' => ($s_type_switch == $s_type_switch_test) ? -1 : $s_type_switch_test,
|
'S_TOPIC_TYPE_SWITCH' => ($s_type_switch == $s_type_switch_test) ? -1 : $s_type_switch_test,
|
||||||
|
|
Loading…
Add table
Reference in a new issue