diff --git a/root/portal/block/announcements.php b/root/portal/block/announcements.php index 16f6a439..bbba0ec9 100644 --- a/root/portal/block/announcements.php +++ b/root/portal/block/announcements.php @@ -9,14 +9,14 @@ */ if (!defined('IN_PHPBB')) { - exit; + exit; } if (!defined('IN_PORTAL')) { - exit; + exit; } - + // Get cleaned up list... return only those forums not having the f_read permission $forum_ary = $auth->acl_getf('!f_read', true); $forum_ary = array_unique(array_keys($forum_ary)); @@ -83,6 +83,7 @@ if($news < 0) 'TEXT' => $fetch_news[$i]['post_text'], 'REPLIES' => $fetch_news[$i]['topic_replies'], 'TOPIC_VIEWS' => $fetch_news[$i]['topic_views'], + 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $fetch_news[$i]['forum_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&' . (($real_forum_id) ? 'f=' . $real_forum_id . '&' : '') . 't=' . $topic_id), @@ -92,7 +93,7 @@ if($news < 0) 'CLOSE' => $close_bracket, 'S_NOT_LAST' => ($i < count($fetch_news) - 1) ? true : false, 'S_POLL' => $fetch_news[$i]['poll'], - // 'MINI_POST_IMG' => $user->img('icon_post_target', 'POST'), +// 'MINI_POST_IMG' => $user->img('icon_post_target', 'POST'), 'S_UNREAD_INFO' => $unread_topic, )); } @@ -112,25 +113,25 @@ else $close_bracket = ' ]'; $read_full = $user->lang['BACK']; - $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'], - '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_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), - 'S_POLL' => $fetch_news[$i]['poll'], - 'S_UNREAD_INFO' => $unread_topic, - 'U_READ_FULL' => append_sid("{$phpbb_root_path}portal.$phpEx", ''), - 'L_READ_FULL' => $read_full, - 'OPEN' => $open_bracket, - 'CLOSE' => $close_bracket, + 'TITLE' => $fetch_news[$i]['topic_title'], + 'POSTER' => $fetch_news[$i]['username'], + 'TIME' => $fetch_news[$i]['topic_time'], + 'TEXT' => $fetch_news[$i]['post_text'], + 'REPLIES' => $fetch_news[$i]['topic_replies'], + 'TOPIC_VIEWS' => $fetch_news[$i]['topic_views'], + 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $fetch_news[$i]['forum_id']), + '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_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), + 'S_POLL' => $fetch_news[$i]['poll'], + 'S_UNREAD_INFO' => $unread_topic, + 'U_READ_FULL' => append_sid("{$phpbb_root_path}portal.$phpEx", ''), + 'L_READ_FULL' => $read_full, + 'OPEN' => $open_bracket, + 'CLOSE' => $close_bracket, )); } diff --git a/root/portal/block/news.php b/root/portal/block/news.php index 03e7988f..381f0a68 100644 --- a/root/portal/block/news.php +++ b/root/portal/block/news.php @@ -66,22 +66,23 @@ 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']) : '', - 'TIME' => $fetch_news[$i]['topic_time'], - 'TEXT' => $fetch_news[$i]['post_text'], - 'REPLIES' => $fetch_news[$i]['topic_replies'], + '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']) : '', + 'TIME' => $fetch_news[$i]['topic_time'], + 'TEXT' => $fetch_news[$i]['post_text'], + 'REPLIES' => $fetch_news[$i]['topic_replies'], 'TOPIC_VIEWS' => $fetch_news[$i]['topic_views'], + 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $fetch_news[$i]['forum_id']), 'U_LAST_COMMENTS' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $fetch_news[$i]['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", 'f=' . $fetch_news[$i]['forum_id'] . '&t=' . $fetch_news[$i]['topic_id']), 'U_POST_COMMENT' => append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=reply&f=' . $fetch_news[$i]['forum_id'] . '&t=' . $fetch_news[$i]['topic_id']), 'U_READ_FULL' => append_sid("{$phpbb_root_path}portal.$phpEx", 'news=' . $i), - 'L_READ_FULL' => $read_full, - 'OPEN' => $open_bracket, + 'L_READ_FULL' => $read_full, + 'OPEN' => $open_bracket, 'CLOSE' => $close_bracket, - 'S_NOT_LAST' => ($i < count($fetch_news) - 1) ? true : false, - 'S_POLL' => $fetch_news[$i]['poll'], + 'S_NOT_LAST' => ($i < count($fetch_news) - 1) ? true : false, + 'S_POLL' => $fetch_news[$i]['poll'], 'S_UNREAD_INFO' => $unread_topic, )); } @@ -103,22 +104,22 @@ 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' => ( $forum_id ) ? $fetch_news[$i]['forum_name'] : '', - 'TITLE' => $fetch_news[$i]['topic_title'], - 'POSTER' => $fetch_news[$i]['username'], - 'TIME' => $fetch_news[$i]['topic_time'], - 'TEXT' => $fetch_news[$i]['post_text'], - 'REPLIES' => $fetch_news[$i]['topic_replies'], + 'TITLE' => $fetch_news[$i]['topic_title'], + 'POSTER' => $fetch_news[$i]['username'], + 'TIME' => $fetch_news[$i]['topic_time'], + 'TEXT' => $fetch_news[$i]['post_text'], + 'REPLIES' => $fetch_news[$i]['topic_replies'], 'TOPIC_VIEWS' => $fetch_news[$i]['topic_views'], - //'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $fetch_news[$i]['forum_id'], + 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $fetch_news[$i]['forum_id']), 'U_LAST_COMMENTS' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $fetch_news[$i]['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", 'f=' . $fetch_news[$i]['forum_id'] . '&t=' . $fetch_news[$i]['topic_id']), 'U_POST_COMMENT' => append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=reply&f=' . $fetch_news[$i]['forum_id'] . '&t=' . $fetch_news[$i]['topic_id']), - 'S_POLL' => $fetch_news[$i]['poll'], + 'S_POLL' => $fetch_news[$i]['poll'], 'S_UNREAD_INFO' => $unread_topic, - 'U_READ_FULL' => append_sid("{$phpbb_root_path}portal.$phpEx", ''), - 'L_READ_FULL' => $read_full, - 'OPEN' => $open_bracket, - 'CLOSE' => $close_bracket, + 'U_READ_FULL' => append_sid("{$phpbb_root_path}portal.$phpEx", ''), + 'L_READ_FULL' => $read_full, + 'OPEN' => $open_bracket, + 'CLOSE' => $close_bracket, )); } diff --git a/root/styles/prosilver/template/portal/block/announcements.html b/root/styles/prosilver/template/portal/block/announcements.html index 8b413f98..2e6ffe3a 100644 --- a/root/styles/prosilver/template/portal/block/announcements.html +++ b/root/styles/prosilver/template/portal/block/announcements.html @@ -12,9 +12,9 @@ {L_NO_ANNOUNCEMENTS}
{NEWEST_POST_IMG}{READ_POST_IMG} {announcements_row.ATTACH_ICON_IMG} {L_POLL}:
- {announcements_row.FORUM_NAME} • {announcements_row.TITLE}
+ {announcements_row.TITLE}
{L_POST_BY_AUTHOR}: {announcements_row.POSTER}
- {NEWEST_POST_IMG}{READ_POST_IMG} {news_row.ATTACH_ICON_IMG} {L_POLL}: {news_row.FORUM_NAME} • {news_row.TITLE}
+
+ {NEWEST_POST_IMG}{READ_POST_IMG} {news_row.ATTACH_ICON_IMG} {L_POLL}: {news_row.TITLE}
{L_LAST_POST} {L_POST_BY_AUTHOR}: {news_row.POSTER}