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);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<span class="gensmall" style="text-align: center; margin: 0 0 0 5px;"><strong>{L_NO_ANNOUNCEMENTS}</strong></span>
|
||||
<!-- ELSE -->
|
||||
<div class="postbody postbody_portal" style="width: 100%">
|
||||
<h4 class="first"><span style="margin: 0 0 0 5px"><!-- IF announcements_row.S_UNREAD_INFO -->{NEWEST_POST_IMG}<!-- ELSE -->{READ_POST_IMG}<!-- ENDIF --> {announcements_row.ATTACH_ICON_IMG} <!-- IF announcements_row.S_POLL --> <strong>{L_POLL}: </strong><!-- ENDIF --><a href="{announcements_row.U_VIEW_COMMENTS}"><strong>{announcements_row.TITLE}</strong></a></span></h4>
|
||||
<h4 class="first"><span style="margin: 0 0 0 5px"><!-- IF announcements_row.S_UNREAD_INFO -->{NEWEST_POST_IMG}<!-- ELSE -->{READ_POST_IMG}<!-- ENDIF --> {announcements_row.ATTACH_ICON_IMG} <!-- IF announcements_row.S_POLL --> <strong>{L_POLL}: </strong><!-- ENDIF --><a href="{announcements_row.U_VIEW_COMMENTS}"><strong><!-- IF announcements_row.FORUM_NAME -->{announcements_row.FORUM_NAME} • <!-- ENDIF -->{announcements_row.TITLE}</strong></a></span></h4>
|
||||
<ul class="linklist">
|
||||
<li><span style="margin: 0 0 0 5px">{L_POSTED_BY}: <strong><a href="{announcements_row.U_USER_PROFILE}">{announcements_row.POSTER}</a></strong></span></li>
|
||||
<li class="rightside"><span style="margin: 0 5px 0 0;">{announcements_row.TIME}</span></li>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<li>
|
||||
<span style="float: left; margin: 0 0 0 5px;"><img src="{T_THEME_PATH}/images/arrow_right.gif" alt=""/>
|
||||
<!-- IF announcements_row.S_UNREAD_INFO -->{NEWEST_POST_IMG}<!-- ELSE -->{READ_POST_IMG}<!-- ENDIF --> {announcements_row.ATTACH_ICON_IMG} <!-- IF announcements_row.S_POLL --> <strong>{L_POLL}: </strong><!-- ENDIF -->
|
||||
<a href="{announcements_row.U_VIEW_COMMENTS}" title="{announcements_row.TITLE}"><strong style="font-size:1.1em;">{announcements_row.TITLE}</strong></a></span>
|
||||
<a href="{announcements_row.U_VIEW_COMMENTS}" title="<!-- IF announcements_row.FORUM_NAME -->{announcements_row.FORUM_NAME} • <!-- ENDIF -->{announcements_row.TITLE}"><strong style="font-size:1.1em;"><!-- IF announcements_row.FORUM_NAME -->{announcements_row.FORUM_NAME} • <!-- ENDIF -->{announcements_row.TITLE}</strong></a></span>
|
||||
<span style="float: right; margin: 0 5px 0 0;">{L_POST_BY_AUTHOR}: <strong><a href="{announcements_row.U_USER_PROFILE}">{announcements_row.POSTER}</a></strong></span>
|
||||
<br style="clear:both" />
|
||||
<span style="float: left; margin: 0 0 0 14px;">
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<span class="gensmall" style="text-align: center; margin: 0 0 0 5px;"><strong>{L_NO_NEWS}</strong></span>
|
||||
<!-- ELSE -->
|
||||
<div class="postbody postbody_portal" style="width: 100%">
|
||||
<h4 class="first"><span style="margin: 0 0 0 5px"><!-- IF news_row.S_UNREAD_INFO -->{NEWEST_POST_IMG}<!-- ELSE -->{READ_POST_IMG}<!-- ENDIF --> {news_row.ATTACH_ICON_IMG} <!-- IF news_row.S_POLL --><strong>{L_POLL}: </strong><!-- ENDIF --><a href="{news_row.U_VIEW_COMMENTS}"><strong>{news_row.TITLE}</strong></a></span></h4>
|
||||
<h4 class="first"><span style="margin: 0 0 0 5px"><!-- IF news_row.S_UNREAD_INFO -->{NEWEST_POST_IMG}<!-- ELSE -->{READ_POST_IMG}<!-- ENDIF --> {news_row.ATTACH_ICON_IMG} <!-- IF news_row.S_POLL --><strong>{L_POLL}: </strong><!-- ENDIF --><a href="{news_row.U_VIEW_COMMENTS}"><strong><!-- IF news_row.FORUM_NAME -->{news_row.FORUM_NAME} • <!-- ENDIF -->{news_row.TITLE}</strong></a></span></h4>
|
||||
<ul class="linklist">
|
||||
<li><span style="margin: 0 0 0 5px">{L_POSTED_BY}: <strong><a href="{news_row.U_USER_PROFILE}">{news_row.POSTER}</a></strong></span></li>
|
||||
<li class="rightside"><span style="margin: 0 5px 0 0;">{news_row.TIME}</span></li>
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
<dd class="posts_portal" style="border-left:0px">
|
||||
<ul class="news">
|
||||
<!-- BEGIN news_row -->
|
||||
<!-- IF news_row.S_NO_TOPICS -->
|
||||
<li>
|
||||
<span class="gensmall" style="text-align: center; margin: 0 0 0 5px;"><strong>{L_NO_NEWS}</strong></span>
|
||||
</li>
|
||||
<!-- IF news_row.S_NO_TOPICS -->
|
||||
<li>
|
||||
<span class="gensmall" style="text-align: center; margin: 0 0 0 5px;"><strong>{L_NO_NEWS}</strong></span>
|
||||
</li>
|
||||
<!-- ELSE -->
|
||||
<li>
|
||||
<span style="float: left; margin: 0 0 0 5px;"><img src="{T_THEME_PATH}/images/arrow_right.gif" alt="»"/>
|
||||
<!-- IF news_row.S_UNREAD_INFO -->{NEWEST_POST_IMG}<!-- ELSE -->{READ_POST_IMG}<!-- ENDIF --> {news_row.ATTACH_ICON_IMG} <!-- IF news_row.S_POLL --><strong>{L_POLL}: </strong><!-- ENDIF --><a href="{news_row.U_LAST_COMMENTS}" title="{L_JUMP_NEWEST}"><strong style="font-size:1.1em;">{news_row.TITLE}</strong></a></span>
|
||||
<!-- IF news_row.S_UNREAD_INFO -->{NEWEST_POST_IMG}<!-- ELSE -->{READ_POST_IMG}<!-- ENDIF --> {news_row.ATTACH_ICON_IMG} <!-- IF news_row.S_POLL --><strong>{L_POLL}: </strong><!-- ENDIF --><a href="{news_row.U_LAST_COMMENTS}" title="{L_JUMP_NEWEST}"><strong style="font-size:1.1em;"><!-- IF news_row.FORUM_NAME -->{news_row.FORUM_NAME} • <!-- ENDIF -->{news_row.TITLE}</strong></a></span>
|
||||
<span style="float: right; margin: 0 5px 0 0;">{L_LAST_POST} {L_POST_BY_AUTHOR}: <strong><a href="{news_row.U_USER_PROFILE}">{news_row.POSTER}</a></strong></span>
|
||||
<br style="clear:both" />
|
||||
<span style="float: left; margin: 0 0 0 14px;">
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<table class="tablebg" cellspacing="1" width="100%">
|
||||
<tr>
|
||||
<td class="cat">
|
||||
<!-- IF announcements_row.S_UNREAD_INFO -->{NEWEST_POST_IMG}<!-- ELSE -->{READ_POST_IMG}<!-- ENDIF --> {announcements_row.ATTACH_ICON_IMG}<!-- IF announcements_row.S_POLL --> <strong>{L_POLL}: </strong><!-- ENDIF --><a href="{announcements_row.U_VIEW_COMMENTS}"><strong>{announcements_row.TITLE}</strong></a>
|
||||
<!-- IF announcements_row.S_UNREAD_INFO -->{NEWEST_POST_IMG}<!-- ELSE -->{READ_POST_IMG}<!-- ENDIF --> {announcements_row.ATTACH_ICON_IMG}<!-- IF announcements_row.S_POLL --> <strong>{L_POLL}: </strong><!-- ENDIF --><a href="{announcements_row.U_VIEW_COMMENTS}"><strong><!-- IF announcements_row.FORUM_NAME -->{announcements_row.FORUM_NAME} • <!-- ENDIF -->{announcements_row.TITLE}</strong></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row1">
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<td>
|
||||
<span style="float: left;">
|
||||
<!-- IF announcements_row.S_UNREAD_INFO -->{NEWEST_POST_IMG}<!-- ELSE -->{READ_POST_IMG}<!-- ENDIF --> {announcements_row.ATTACH_ICON_IMG} <!-- IF announcements_row.S_POLL --> <strong style="font-size:1.1em;">{L_POLL}: </strong><!-- ENDIF -->
|
||||
<a href="{announcements_row.U_VIEW_COMMENTS}" title="{announcements_row.TITLE}"><strong style="font-size:1.1em;">{announcements_row.TITLE}</strong></a>
|
||||
<a href="{announcements_row.U_VIEW_COMMENTS}" title="<!-- IF announcements_row.FORUM_NAME -->{announcements_row.FORUM_NAME} • <!-- ENDIF -->{announcements_row.TITLE}"><strong style="font-size:1.1em;"><!-- IF announcements_row.FORUM_NAME -->{announcements_row.FORUM_NAME} • <!-- ENDIF -->{announcements_row.TITLE}</strong></a>
|
||||
</span>
|
||||
<span style="float: right;font-size:0.9em; margin: 0 5px 0 0;">
|
||||
{L_POST_BY_AUTHOR}: <strong><a href="{announcements_row.U_USER_PROFILE}">{announcements_row.POSTER}</a></strong>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<!-- ELSE -->
|
||||
<table class="tablebg" cellspacing="1" width="100%">
|
||||
<tr>
|
||||
<td class="cat"><!-- IF news_row.S_UNREAD_INFO -->{NEWEST_POST_IMG}<!-- ELSE -->{READ_POST_IMG}<!-- ENDIF --> {news_row.ATTACH_ICON_IMG} <!-- IF news_row.S_POLL --><strong>{L_POLL}: </strong><!-- ENDIF --><a href="{news_row.U_VIEW_COMMENTS}"><strong>{news_row.TITLE}</strong></a></td>
|
||||
<td class="cat"><!-- IF news_row.S_UNREAD_INFO -->{NEWEST_POST_IMG}<!-- ELSE -->{READ_POST_IMG}<!-- ENDIF --> {news_row.ATTACH_ICON_IMG} <!-- IF news_row.S_POLL --><strong>{L_POLL}: </strong><!-- ENDIF --><a href="{news_row.U_VIEW_COMMENTS}"><strong><!-- IF news_row.FORUM_NAME -->{news_row.FORUM_NAME} • <!-- ENDIF -->{news_row.TITLE}</strong></a></td>
|
||||
</tr>
|
||||
<tr class="row1">
|
||||
<td>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<tr class="row1">
|
||||
<td>
|
||||
<span style="float: left;">
|
||||
<!-- IF news_row.S_UNREAD_INFO -->{NEWEST_POST_IMG}<!-- ELSE -->{READ_POST_IMG}<!-- ENDIF --> {news_row.ATTACH_ICON_IMG} <!-- IF news_row.S_POLL --><strong>{L_POLL}: </strong><!-- ENDIF --><a href="{news_row.U_LAST_COMMENTS}" title="{L_JUMP_NEWEST}"><strong style="font-size:1.1em;">{news_row.TITLE}</strong></a>
|
||||
<!-- IF news_row.S_UNREAD_INFO -->{NEWEST_POST_IMG}<!-- ELSE -->{READ_POST_IMG}<!-- ENDIF --> {news_row.ATTACH_ICON_IMG} <!-- IF news_row.S_POLL --><strong>{L_POLL}: </strong><!-- ENDIF --><a href="{news_row.U_LAST_COMMENTS}" title="{L_JUMP_NEWEST}"><strong style="font-size:1.1em;"><!-- IF news_row.FORUM_NAME -->{news_row.FORUM_NAME} • <!-- ENDIF -->{news_row.TITLE}</strong></a>
|
||||
</span>
|
||||
<span style="float: right;font-size:0.9em; margin: 0 5px 0 0;">{L_LAST_POST} {L_POST_BY_AUTHOR}: <strong><a href="{news_row.U_USER_PROFILE}">{news_row.POSTER}</a></strong></span>
|
||||
<br style="clear:both" />
|
||||
|
||||
Reference in New Issue
Block a user