Update functions_display.php

This commit is contained in:
Gauvain Boiché
2020-04-02 13:46:43 +02:00
parent 37859875d1
commit c1cf05716b

View File

@@ -424,7 +424,6 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$current_hour = date('H');
$day_state = $current_hour >= 6 && $current_hour <= 18 ? 'jour' : 'nuit';
$forum_image = str_replace(".", "_$day_state.", $row['forum_image']);
echo $forum_image;
$cat_row = array(
'S_IS_CAT' => true,
@@ -433,8 +432,8 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
'FORUM_DESC' => generate_text_for_display($row['forum_desc'], $row['forum_desc_uid'], $row['forum_desc_bitfield'], $row['forum_desc_options']),
'FORUM_FOLDER_IMG' => '',
'FORUM_FOLDER_IMG_SRC' => '',
//'FORUM_IMAGE' => ($forum_image) ? '<img src="' . $phpbb_root_path . $forum_image . '" alt="' . $user->lang['FORUM_CAT'] . '" />' : '',
//'FORUM_IMAGE_SRC' => ($forum_image) ? $phpbb_root_path . $forum_image : '',
'FORUM_IMAGE' => ($forum_image) ? '<img src="' . $phpbb_root_path . $forum_image . '" alt="' . $user->lang['FORUM_CAT'] . '" />' : '',
'FORUM_IMAGE_SRC' => ($forum_image) ? $phpbb_root_path . $forum_image : '',
'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
);
@@ -605,6 +604,10 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$u_viewforum = $row['forum_link'];
}
}
$current_hour = date('H');
$day_state = $current_hour >= 6 && $current_hour <= 18 ? 'jour' : 'nuit';
$forum_image = str_replace(".", "_$day_state.", $row['forum_image']);
$forum_row = array(
'S_IS_CAT' => false,
@@ -626,8 +629,8 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
'FORUM_IMG_STYLE' => $folder_image,
'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt),
'FORUM_FOLDER_IMG_ALT' => isset($user->lang[$folder_alt]) ? $user->lang[$folder_alt] : '',
//'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang[$folder_alt] . '" />' : '',
//'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '',
'FORUM_IMAGE' => ($forum_image) ? '<img src="' . $phpbb_root_path . $forum_image . '" alt="' . $user->lang[$folder_alt] . '" />' : '',
'FORUM_IMAGE_SRC' => ($forum_image) ? $phpbb_root_path . $forum_image : '',
'LAST_POST_SUBJECT' => $last_post_subject,
'LAST_POST_SUBJECT_TRUNCATED' => $last_post_subject_truncated,
'LAST_POST_TIME' => $last_post_time,