on_page
unterstützt keine Parameter und die fehlende Anzeige war warscheinlich ein Sprach Datei Problem.Daher die Lösung
Öffne
viewonline.php
Finde
Code: Alles auswählen
$template->assign_block_vars('user_row', array(
Code: Alles auswählen
// Errorpages in Viewonline
if (strpos($row['session_page'], 'mode=400') !== false)
{
$location = $user->lang['ERROR_VIEWONLINE_400'];
$location_url = append_sid("{$phpbb_root_path}error.$phpEx");
}
else if (strpos($row['session_page'], 'mode=401') !== false)
{
$location = $user->lang['ERROR_VIEWONLINE_401'];
$location_url = append_sid("{$phpbb_root_path}error.$phpEx");
}
else if (strpos($row['session_page'], 'mode=403') !== false)
{
$location = $user->lang['ERROR_VIEWONLINE_403'];
$location_url = append_sid("{$phpbb_root_path}error.$phpEx");
}
else if (strpos($row['session_page'], 'mode=404') !== false)
{
$location = $user->lang['ERROR_VIEWONLINE_404'];
$location_url = append_sid("{$phpbb_root_path}error.$phpEx");
}
else if (strpos($row['session_page'], 'mode=500') !== false)
{
$location = $user->lang['ERROR_VIEWONLINE_500'];
$location_url = append_sid("{$phpbb_root_path}error.$phpEx");
}
// Errorpages in Viewonline
Dieser Code ist getestet.
Die folgende Variante geht natürlich auch, wobei hier
$row['session_page']
als Switch initiiert wird, obwohl kein echter Bezug zum Case existiert. Daher halte ich die erste Variante für performanterCode: Alles auswählen
switch ($row['session_page'])
{
case strpos($row['session_page'], 'mode=400') !== false :
$location = $user->lang['ERROR_VIEWONLINE_400'];
$location_url = append_sid("{$phpbb_root_path}error.$phpEx");
break;
// etc.
}
Also statt
Code: Alles auswählen
append_sid("{$phpbb_root_path}error.$phpEx");
Code: Alles auswählen
append_sid("{$phpbb_root_path}error400.$phpEx");