lalala
This commit is contained in:
@@ -18,13 +18,6 @@ if (!defined('IN_PORTAL'))
|
||||
exit;
|
||||
}
|
||||
|
||||
$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_ANNOUNCEMENTS' => true,
|
||||
));
|
||||
|
||||
$announcement = request_var('announcement', -1);
|
||||
$start = request_var('ap', 0);
|
||||
$start = ($start < 0) ? 0 : $start;
|
||||
@@ -239,7 +232,6 @@ $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,7 +296,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))
|
||||
@@ -313,4 +305,12 @@ $fetch_news = phpbb_fetch_posts($portal_config['portal_global_announcements_foru
|
||||
}
|
||||
}
|
||||
|
||||
$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_ANNOUNCEMENTS' => true,
|
||||
'S_TOPIC_ICONS' => $fetch_news['topic_icons'],
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -20,15 +20,6 @@ if (!defined('IN_PORTAL'))
|
||||
exit;
|
||||
}
|
||||
|
||||
$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_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_DISPLAY_NEWS' => true,
|
||||
));
|
||||
|
||||
$news = request_var('news', -1);
|
||||
$user->add_lang('viewforum');
|
||||
$start = request_var('np', 0);
|
||||
@@ -227,7 +218,6 @@ $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,7 +283,6 @@ $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))
|
||||
);
|
||||
@@ -301,4 +290,14 @@ $fetch_news = phpbb_fetch_posts($portal_config['portal_news_forum'], $portal_con
|
||||
}
|
||||
}
|
||||
|
||||
$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_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_DISPLAY_NEWS' => true,
|
||||
'S_TOPIC_ICONS' => $fetch_news['topic_icons'],
|
||||
));
|
||||
|
||||
?>
|
||||
@@ -85,6 +85,8 @@ function phpbb_fetch_posts($forum_from, $permissions, $number_of_posts, $text_le
|
||||
|
||||
$topic_icons = array();
|
||||
|
||||
$have_icons = 0;
|
||||
|
||||
if( $permissions == TRUE )
|
||||
{
|
||||
$disallow_access = array_unique(array_keys($auth->acl_getf('!f_read', true)));
|
||||
@@ -137,7 +139,7 @@ function phpbb_fetch_posts($forum_from, $permissions, $number_of_posts, $text_le
|
||||
$topic_type = 't.topic_type = ' . POST_NORMAL;
|
||||
$str_where = ( strlen($str_where) > 0 ) ? 'AND (' . trim(substr($str_where, 0, -4)) . ')' : '';
|
||||
$user_link = ( $portal_config['portal_news_style'] ) ? 't.topic_poster = u.user_id' : (( $portal_config['portal_news_show_last'] ) ? 't.topic_last_poster_id = u.user_id' : 't.topic_poster = u.user_id' ) ;
|
||||
$post_link = ( $portal_config['portal_news_show_last'] ) ? 't.topic_last_post_id = p.post_id' : 't.topic_first_post_id = p.post_id' ;
|
||||
$post_link = ( $portal_config['portal_news_style'] ) ? 't.topic_first_post_id = p.post_id' : (( $portal_config['portal_news_show_last'] ) ? 't.topic_last_post_id = p.post_id' : 't.topic_first_post_id = p.post_id' ) ;
|
||||
$topic_order = ( $portal_config['portal_news_show_last'] ) ? 't.topic_last_post_time DESC' : 't.topic_time DESC' ;
|
||||
|
||||
|
||||
@@ -147,7 +149,7 @@ function phpbb_fetch_posts($forum_from, $permissions, $number_of_posts, $text_le
|
||||
$topic_type = '( t.topic_type <> ' . POST_ANNOUNCE . ' ) AND ( t.topic_type <> ' . POST_GLOBAL . ')';
|
||||
$str_where = ( strlen($str_where) > 0 ) ? 'AND (' . trim(substr($str_where, 0, -4)) . ')' : '';
|
||||
$user_link = ( $portal_config['portal_news_style'] ) ? 't.topic_poster = u.user_id' : (( $portal_config['portal_news_show_last'] ) ? 't.topic_last_poster_id = u.user_id' : 't.topic_poster = u.user_id' ) ;
|
||||
$post_link = ( $portal_config['portal_news_show_last'] ) ? 't.topic_last_post_id = p.post_id' : 't.topic_first_post_id = p.post_id' ;
|
||||
$post_link = ( $portal_config['portal_news_style'] ) ? 't.topic_first_post_id = p.post_id' : (( $portal_config['portal_news_show_last'] ) ? 't.topic_last_post_id = p.post_id' : 't.topic_first_post_id = p.post_id' ) ;
|
||||
$topic_order = ( $portal_config['portal_news_show_last'] ) ? 't.topic_last_post_time DESC' : 't.topic_time DESC' ;
|
||||
|
||||
break;
|
||||
@@ -318,11 +320,12 @@ function phpbb_fetch_posts($forum_from, $permissions, $number_of_posts, $text_le
|
||||
}
|
||||
|
||||
$topic_icons[] = $row['enable_icons'];
|
||||
$have_icons = ( $row['icon_id'] > 0 ) ? 1 : $have_icons;
|
||||
|
||||
$posts[$i] = array_merge($posts[$i], array(
|
||||
'post_text' => ap_validate($message),
|
||||
'topic_id' => $row['topic_id'],
|
||||
'topic_last_post_id' => $row['post_id'],
|
||||
'topic_last_post_id' => $row['topic_last_post_id'],
|
||||
'topic_type' => $row['topic_type'],
|
||||
'topic_posted' => (isset($row['topic_posted']) && $row['topic_posted']) ? true : false,
|
||||
'icon_id' => $row['icon_id'],
|
||||
@@ -350,7 +353,8 @@ function phpbb_fetch_posts($forum_from, $permissions, $number_of_posts, $text_le
|
||||
$i++;
|
||||
}
|
||||
|
||||
$posts['topic_icons'] = max($topic_icons);
|
||||
$posts['topic_icons'] = ( max($topic_icons) > 0 && $have_icons ) ? true : false;
|
||||
|
||||
$posts['topic_count'] = $i;
|
||||
|
||||
if( $global_f < 1 )
|
||||
|
||||
Reference in New Issue
Block a user