Report #44: Forum name in news/announcements title
This commit is contained in:
@@ -71,10 +71,11 @@ if($news < 0)
|
||||
$topic_tracking_info = get_complete_topic_tracking($forum_id, $topic_id, $global_announce_list = false);
|
||||
$unread_topic = (isset($topic_tracking_info[$topic_id]) && $fetch_news[$i]['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
|
||||
|
||||
$forum_id = ( $forum_id == 0 ) ? $g_forum_id : $forum_id;
|
||||
$real_forum_id = ( $forum_id == 0 ) ? $g_forum_id : $forum_id;
|
||||
|
||||
$template->assign_block_vars('announcements_row', array(
|
||||
'ATTACH_ICON_IMG' => ($fetch_news[$i]['attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
'FORUM_NAME' => ( $forum_id ) ? $fetch_news[$i]['forum_name'] : '',
|
||||
'TITLE' => $fetch_news[$i]['topic_title'],
|
||||
'POSTER' => $fetch_news[$i]['username'],
|
||||
'U_USER_PROFILE' => (($fetch_news[$i]['user_type'] == USER_NORMAL || $fetch_news[$i]['user_type'] == USER_FOUNDER) && $fetch_news[$i]['user_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $fetch_news[$i]['user_id']) : '',
|
||||
@@ -82,9 +83,9 @@ if($news < 0)
|
||||
'TEXT' => $fetch_news[$i]['post_text'],
|
||||
'REPLIES' => $fetch_news[$i]['topic_replies'],
|
||||
'TOPIC_VIEWS' => $fetch_news[$i]['topic_views'],
|
||||
'U_LAST_COMMENTS' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", (($forum_id) ? 'f=' . $forum_id . '&' : '') . 'p=' . $fetch_news[$i]['topic_last_post_id'] . '#p' . $fetch_news[$i]['topic_last_post_id']),
|
||||
'U_LAST_COMMENTS' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", (($real_forum_id) ? 'f=' . $real_forum_id . '&' : '') . 'p=' . $fetch_news[$i]['topic_last_post_id'] . '#p' . $fetch_news[$i]['topic_last_post_id']),
|
||||
'U_VIEW_COMMENTS' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $topic_id),
|
||||
'U_POST_COMMENT' => append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=reply&' . (($forum_id) ? 'f=' . $forum_id . '&' : '') . 't=' . $topic_id),
|
||||
'U_POST_COMMENT' => append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=reply&' . (($real_forum_id) ? 'f=' . $real_forum_id . '&' : '') . 't=' . $topic_id),
|
||||
'U_READ_FULL' => append_sid("{$phpbb_root_path}portal.$phpEx", 'announcement=' . $i),
|
||||
'L_READ_FULL' => $read_full,
|
||||
'OPEN' => $open_bracket,
|
||||
@@ -113,7 +114,8 @@ else
|
||||
|
||||
|
||||
$template->assign_block_vars('announcements_row', array(
|
||||
'ATTACH_ICON_IMG' => ($fetch_news[$i]['attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
'ATTACH_ICON_IMG' => ($fetch_news[$i]['attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
'FORUM_NAME' => ( $forum_id ) ? $fetch_news[$i]['forum_name'] : '',
|
||||
'TITLE' => $fetch_news[$i]['topic_title'],
|
||||
'POSTER' => $fetch_news[$i]['username'],
|
||||
'TIME' => $fetch_news[$i]['topic_time'],
|
||||
|
||||
@@ -65,6 +65,7 @@ if($news < 0)
|
||||
|
||||
$template->assign_block_vars('news_row', array(
|
||||
'ATTACH_ICON_IMG' => ($fetch_news[$i]['attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
'FORUM_NAME' => ( $forum_id ) ? $fetch_news[$i]['forum_name'] : '',
|
||||
'TITLE' => $fetch_news[$i]['topic_title'],
|
||||
'POSTER' => $fetch_news[$i]['username'],
|
||||
'U_USER_PROFILE' => (($fetch_news[$i]['user_type'] == USER_NORMAL || $fetch_news[$i]['user_type'] == USER_FOUNDER) && $fetch_news[$i]['user_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $fetch_news[$i]['user_id']) : '',
|
||||
@@ -101,7 +102,7 @@ else
|
||||
|
||||
$template->assign_block_vars('news_row', array(
|
||||
'ATTACH_ICON_IMG' => ($fetch_news[$i]['attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
//'FORUM_NAME' => $fetch_news[$i]['forum_name'],
|
||||
'FORUM_NAME' => ( $forum_id ) ? $fetch_news[$i]['forum_name'] : '',
|
||||
'TITLE' => $fetch_news[$i]['topic_title'],
|
||||
'POSTER' => $fetch_news[$i]['username'],
|
||||
'TIME' => $fetch_news[$i]['topic_time'],
|
||||
|
||||
@@ -70,11 +70,13 @@ function phpbb_fetch_posts($forum_sql, $number_of_posts, $text_length, $time, $t
|
||||
p.enable_bbcode,
|
||||
p.enable_magic_url,
|
||||
p.bbcode_bitfield,
|
||||
p.bbcode_uid
|
||||
p.bbcode_uid,
|
||||
f.forum_name
|
||||
FROM
|
||||
' . TOPICS_TABLE . ' AS t,
|
||||
' . USERS_TABLE . ' AS u,
|
||||
' . POSTS_TABLE . ' AS p
|
||||
' . POSTS_TABLE . ' AS p,
|
||||
' . FORUMS_TABLE . ' AS f
|
||||
WHERE
|
||||
' . $topic_type . '
|
||||
' . $from_forum . '
|
||||
@@ -82,7 +84,8 @@ function phpbb_fetch_posts($forum_sql, $number_of_posts, $text_length, $time, $t
|
||||
t.topic_poster = u.user_id AND
|
||||
t.topic_first_post_id = p.post_id AND
|
||||
t.topic_status <> 2 AND
|
||||
t.topic_approved = 1
|
||||
t.topic_approved = 1 AND
|
||||
t.forum_id = f.forum_id
|
||||
|
||||
ORDER BY
|
||||
t.topic_time DESC';
|
||||
@@ -138,6 +141,7 @@ function phpbb_fetch_posts($forum_sql, $number_of_posts, $text_length, $time, $t
|
||||
$posts[$i]['poll'] = ($row['poll_title']) ? true : false;
|
||||
$posts[$i]['attachment'] = ($row['topic_attachment']) ? true : false;
|
||||
$posts[$i]['topic_views'] = ($row['topic_views']);
|
||||
$posts[$i]['forum_name'] = ($row['forum_name']);
|
||||
|
||||
$message = $posts[$i]['post_text'];
|
||||
$message = str_replace("\n", '<br />', $message);
|
||||
@@ -200,11 +204,13 @@ function phpbb_fetch_posts($forum_sql, $number_of_posts, $text_length, $time, $t
|
||||
p.enable_bbcode,
|
||||
p.enable_magic_url,
|
||||
p.bbcode_bitfield,
|
||||
p.bbcode_uid
|
||||
p.bbcode_uid,
|
||||
f.forum_name
|
||||
FROM
|
||||
' . TOPICS_TABLE . ' AS t,
|
||||
' . USERS_TABLE . ' AS u,
|
||||
' . POSTS_TABLE . ' AS p
|
||||
' . POSTS_TABLE . ' AS p,
|
||||
' . FORUMS_TABLE . ' AS f
|
||||
WHERE
|
||||
' . $topic_type . '
|
||||
' . $from_forum . '
|
||||
@@ -212,7 +218,8 @@ function phpbb_fetch_posts($forum_sql, $number_of_posts, $text_length, $time, $t
|
||||
t.topic_last_poster_id = u.user_id AND
|
||||
t.topic_last_post_id = p.post_id AND
|
||||
t.topic_status <> 2 AND
|
||||
t.topic_approved = 1
|
||||
t.topic_approved = 1 AND
|
||||
t.forum_id = f.forum_id
|
||||
|
||||
ORDER BY
|
||||
t.topic_last_post_time DESC';
|
||||
@@ -269,6 +276,7 @@ function phpbb_fetch_posts($forum_sql, $number_of_posts, $text_length, $time, $t
|
||||
$posts[$i]['poll'] = ($row['poll_title']) ? true : false;
|
||||
$posts[$i]['attachment'] = ($row['topic_attachment']) ? true : false;
|
||||
$posts[$i]['topic_views'] = ($row['topic_views']);
|
||||
$posts[$i]['forum_name'] = ($row['forum_name']);
|
||||
|
||||
$message = $posts[$i]['post_text'];
|
||||
$message = str_replace("\n", '<br/> ', $message);
|
||||
|
||||
Reference in New Issue
Block a user