Ich bin am "weiter basteln" des F1 Mods. Für Grafiken ist ja u.a. der Tag alt vorgeschrieben. Diesen möchte ich mit der Variable $drivernation füllen. Das ganze sieht so aus:
Code: Alles auswählen
while ($row = $db->sql_fetchrow($result))
{
$driverimg = $row['driver_img'];
$driverflag = $row['driver_flag'];
$drivernation = $row['driver_nation'];
$current_user_id = $row['driver_id'];
$driverimg = ( $driverimg == '') ? '<img src="' . $phpbb_root_path . 'images/formel/' . $formel_config['no_driver_img'] . '" width="' . $formel_config['driver_img_width'] . '" height="' . $formel_config['driver_img_height'] . '" alt="" border="0" />' : '<img src="' . $phpbb_root_path . 'images/formel/' . $driverimg . '" width="' . $formel_config['driver_img_width'] . '" height="' . $formel_config['driver_img_height'] . '" alt="" border="0" />';
$driverflag = ( $driverflag == '') ? '<img src="' . $phpbb_root_path . 'images/flags/' . $formel_config['no_flag_img'] . '" width="' . $formel_config['flag_img_width'] . '" height="' . $formel_config['flag_img_height'] . '" alt="" border="0" />' : '<img src="' . $phpbb_root_path . 'images/flags/' . $driverflag . '" width="' . $formel_config['flag_img_width'] . '" height="' . $formel_config['flag_img_height'] . '" alt="$drivernation" title="$drivernation" border="0" />';
$pointssql = "SELECT SUM(wm_points) AS total_points FROM " . FORMEL_WM_TABLE . " WHERE wm_driver = $current_user_id";
if (!$user_points = $db->sql_query($pointssql))
{
message_die(GENERAL_ERROR, 'Could not get drivers information', '', __LINE__, __FILE__, $sql);
}
$driver_points = $db->sql_fetchrow($user_points);
$points = ( $driver_points['total_points'] != '' ) ? $driver_points['total_points'] : 0;
$db->sql_freeresult($user_points);
if ( $formel_config['show_gfx'] == 1 )
{
$template->assign_block_vars('driverrow_gfx', array(
'DRIVERNAME' => $row['driver_name'],
'DRIVERID' => $row['driver_id'],
'DRIVERIMG' => $driverimg,
'DRIVERFLAG' => $driverflag,
'DRIVERNATION' => $drivernation,
'DRIVERTEAM' => $teams[$row['driver_team']],
'DRIVERPOINTS_PENALTY' => $row['driver_penalty'],
'DRIVERNR' => $row['driver_nr'],
'DRIVERPOINTS' => $points - $row['driver_penalty'])
);
}
else
{
$template->assign_block_vars('driverrow', array(
'DRIVERNAME' => $row['driver_name'],
'DRIVERID' => $row['driver_id'],
'DRIVERIMG' => $driverimg,
'DRIVERFLAG' => $driverflag,
'DRIVERNATION' => $drivernation,
'DRIVERTEAM' => $teams[$row['driver_team']],
'DRIVERPOINTS_PENALTY' => $row['driver_penalty'],
'DRIVERNR' => $row['driver_nr'],
'DRIVERPOINTS' => $points - $row['driver_penalty'])
);
}
}
$db->sql_freeresult($result);
Code: Alles auswählen
$driverflag = ( $driverflag == '') ? '<img src="' . $phpbb_root_path . 'images/flags/' . $formel_config['no_flag_img'] . '" width="' . $formel_config['flag_img_width'] . '" height="' . $formel_config['flag_img_height'] . '" alt="" border="0" />' : '<img src="' . $phpbb_root_path . 'images/flags/' . $driverflag . '" width="' . $formel_config['flag_img_width'] . '" height="' . $formel_config['flag_img_height'] . '" alt="$drivernation" title="$drivernation" border="0" />';
Code: Alles auswählen
'DRIVERNATION' => $drivernation,
Was mache ich falsch?
Bye