Seite 1 von 1

Gestern / Heute Mod Problem

Verfasst: 06.12.2005 14:46
von ~Alonso~
Also ich würde gern den
Today At/Yesterday At Mod einbauen nun habe ich folgendes Problem

Code: Alles auswählen

#
#-----[ OPEN ]------------------------------
# 
index.php 

#
#-----[ FIND ]-----------------------------------
# 
$last_post = $last_post_time . '<br />';

#
#-----[ REPLACE WITH ]-----------------------------------
# 

								// OLD
								// $last_post = $last_post_time . '<br />';
								//
                                // MOD - TODAY AT - BEGIN
								//
								if ( $board_config['time_today'] < $forum_data[$j]['post_time'])
								{ 
									$last_post = sprintf($lang['Today_at'], create_date($board_config['default_timeformat'], $forum_data[$j]['post_time'], $board_config['board_timezone'])) . '<br />'; 
								}
								else if ( $board_config['time_yesterday'] < $forum_data[$j]['post_time'])
								{ 
									$last_post = sprintf($lang['Yesterday_at'], create_date($board_config['default_timeformat'], $forum_data[$j]['post_time'], $board_config['board_timezone'])) . '<br />'; 
								}
								else
								{ 
									$last_post = $last_post_time . '<br />'; 
								} 
                                // MOD - TODAY AT - END
Das soll ich machen aber ich habe noch einen Mod weis aber nicht mehr wie der heißt damit der letzte Thread Name auch auf der Indes erscheint und das sieht so aus.

Code: Alles auswählen

		$last_post .= $last_post_time . '&nbsp;<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '"></a><br>' . $lang['by'] . '&nbsp;';

Wie kann ich das jetzt ändern damit es nacher auch geht :-(

Verfasst: 06.12.2005 20:36
von ~Alonso~
Keiner eine Idee müsste doch nur zusammen gefrimmelt werden ich probiers wie verrückt aber es klappt einfach nicht.

kann leider nicht wirklich PHP :-(

Verfasst: 06.12.2005 20:40
von ATARI
find:

Code: Alles auswählen

$last_post .= $last_post_time . '&nbsp;<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '"></a><br>' . $lang['by'] . '&nbsp;';
replace with:

Code: Alles auswählen

if ( $board_config['time_today'] < $forum_data[$j]['post_time'])
{
$last_post .= sprintf($lang['Today_at'], create_date($board_config['default_timeformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']));
}
else if ( $board_config['time_yesterday'] < $forum_data[$j]['post_time'])
{
$last_post .= sprintf($lang['Yesterday_at'], create_date($board_config['default_timeformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']));
}
else
{
$last_post .= $last_post_time;
}
$last_post .= '&nbsp;<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '"></a><br>' . $lang['by'] . '&nbsp;';

Verfasst: 06.12.2005 20:54
von ~Alonso~
Fettes Thank´s ;-)

Es klappt hervorragend