Cycle jour/nuit pour les images
This commit is contained in:
@@ -421,6 +421,10 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$current_hour = date('H');
|
||||||
|
$day_state = $current_hour >= 6 && $current_hour <= 18 ? 'jour' : 'nuit';
|
||||||
|
$forum_image = str_replace(".", "_$day_state.", $row['forum_image']);
|
||||||
|
|
||||||
$cat_row = array(
|
$cat_row = array(
|
||||||
'S_IS_CAT' => true,
|
'S_IS_CAT' => true,
|
||||||
'FORUM_ID' => $row['forum_id'],
|
'FORUM_ID' => $row['forum_id'],
|
||||||
@@ -428,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_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' => '',
|
||||||
'FORUM_FOLDER_IMG_SRC' => '',
|
'FORUM_FOLDER_IMG_SRC' => '',
|
||||||
'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang['FORUM_CAT'] . '" />' : '',
|
'FORUM_IMAGE' => ($forum_image) ? '<img src="' . $phpbb_root_path . $forum_image . '" alt="' . $user->lang['FORUM_CAT'] . '" />' : '',
|
||||||
'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '',
|
'FORUM_IMAGE_SRC' => ($forum_image) ? $phpbb_root_path . $forum_image : '',
|
||||||
'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
|
'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user