This commit is contained in:
@@ -22,7 +22,6 @@ $template->assign_vars(array(
|
||||
'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'),
|
||||
'READ_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_NEWEST_POST'),
|
||||
'GOTO_PAGE_IMG' => $user->img('icon_post_target', 'GOTO_PAGE'),
|
||||
'S_DISPLAY_NEWS' => true,
|
||||
'S_DISPLAY_ANNOUNCEMENTS' => true,
|
||||
));
|
||||
|
||||
@@ -240,6 +239,7 @@ $fetch_news = phpbb_fetch_posts($portal_config['portal_global_announcements_foru
|
||||
if ($portal_config['portal_number_of_announcements'] <> 0 && $portal_config['portal_announcements_archive'])
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_TOPIC_ICONS' => $fetch_news['topic_icons'],
|
||||
'AP_PAGINATION' => $pagination,
|
||||
'TOTAL_ANNOUNCEMENTS' => ($total_announcements == 1) ? $user->lang['VIEW_LATEST_ANNOUNCEMENT'] : sprintf($user->lang['VIEW_LATEST_ANNOUNCEMENTS'], $total_announcements),
|
||||
'AP_PAGE_NUMBER' => on_page($total_announcements, $portal_config['portal_number_of_announcements'], $start))
|
||||
@@ -304,6 +304,7 @@ $fetch_news = phpbb_fetch_posts($portal_config['portal_global_announcements_foru
|
||||
if ($portal_config['portal_number_of_announcements'] <> 0 && $portal_config['portal_announcements_archive'])
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_TOPIC_ICONS' => $fetch_news['topic_icons'],
|
||||
'AP_PAGINATION' => $pagination,
|
||||
'TOTAL_ANNOUNCEMENTS' => ($total_announcements == 1) ? $user->lang['VIEW_LATEST_ANNOUNCEMENT'] : sprintf($user->lang['VIEW_LATEST_ANNOUNCEMENTS'], $total_announcements),
|
||||
'AP_PAGE_NUMBER' => on_page($total_announcements, $portal_config['portal_number_of_announcements'], $start))
|
||||
|
||||
@@ -26,7 +26,6 @@ $template->assign_vars(array(
|
||||
'GOTO_PAGE_IMG' => $user->img('icon_post_target', 'GOTO_PAGE'),
|
||||
'S_NEWEST_OR_FIRST' => ( $portal_config['portal_news_show_last'] ) ? $user->lang['JUMP_NEWEST'] : $user->lang['JUMP_FIRST'],
|
||||
'POSTED_BY_TEXT' => ( $portal_config['portal_news_show_last'] ) ? $user->lang['LAST_POST'] : $user->lang['POSTED'],
|
||||
'S_TOPIC_ICONS' => true,
|
||||
'S_DISPLAY_NEWS' => true,
|
||||
));
|
||||
|
||||
@@ -228,6 +227,7 @@ $fetch_news = phpbb_fetch_posts($portal_config['portal_news_forum'], $portal_con
|
||||
if ($portal_config['portal_number_of_news'] <> 0 && $portal_config['portal_news_archive'])
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_TOPIC_ICONS' => $fetch_news['topic_icons'],
|
||||
'NP_PAGINATION' => $pagination,
|
||||
'TOTAL_NEWS' => ($total_news == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $total_news),
|
||||
'NP_PAGE_NUMBER' => on_page($total_news, $portal_config['portal_number_of_news'], $start))
|
||||
@@ -293,6 +293,7 @@ $fetch_news = phpbb_fetch_posts($portal_config['portal_news_forum'], $portal_con
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'NP_PAGINATION' => $pagination,
|
||||
'S_TOPIC_ICONS' => $fetch_news['topic_icons'],
|
||||
'TOTAL_NEWS' => ($total_news == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $total_news),
|
||||
'NP_PAGE_NUMBER' => on_page($total_news, $portal_config['portal_number_of_news'], $start))
|
||||
);
|
||||
|
||||
@@ -82,6 +82,8 @@ function phpbb_fetch_posts($forum_from, $permissions, $number_of_posts, $text_le
|
||||
$forum_from = ( strpos($forum_from, ',') !== FALSE ) ? explode(',', $forum_from) : (($forum_from != '') ? array($forum_from) : array());
|
||||
|
||||
$str_where = '';
|
||||
|
||||
$topic_icons = array();
|
||||
|
||||
if( $permissions == TRUE )
|
||||
{
|
||||
@@ -209,7 +211,8 @@ function phpbb_fetch_posts($forum_from, $permissions, $number_of_posts, $text_le
|
||||
p.enable_magic_url,
|
||||
p.bbcode_bitfield,
|
||||
p.bbcode_uid,
|
||||
f.forum_name',
|
||||
f.forum_name,
|
||||
f.enable_icons',
|
||||
|
||||
'FROM' => array(
|
||||
TOPICS_TABLE => 't',
|
||||
@@ -314,6 +317,8 @@ function phpbb_fetch_posts($forum_from, $permissions, $number_of_posts, $text_le
|
||||
$global_f = $row['forum_id'];
|
||||
}
|
||||
|
||||
$topic_icons[] = $row['enable_icons'];
|
||||
|
||||
$posts[$i] = array_merge($posts[$i], array(
|
||||
'post_text' => ap_validate($message),
|
||||
'topic_id' => $row['topic_id'],
|
||||
@@ -345,6 +350,8 @@ function phpbb_fetch_posts($forum_from, $permissions, $number_of_posts, $text_le
|
||||
$i++;
|
||||
}
|
||||
|
||||
$posts['topic_icons'] = max($topic_icons);
|
||||
|
||||
if( $global_f < 1 )
|
||||
{
|
||||
return array();
|
||||
|
||||
Reference in New Issue
Block a user