
| Autor |
Nachricht |
psprofi
phpBB2.de User

Anmeldungsdatum: 09.09.2004
Beiträge: 102
|
Verfasst am:
Mo 01 Mai, 2006 23:06 |
  |
Hi
Ich hab ein problem.
Ich habe mir eine 404Fehler Page gemacht mit text der in english und in deutsch vorhanden ist.
Aber bisher zeigt er immer nur die sprache an die als standart im Board eingestellt ist ODER die von dem Benutzer eingestellt ist.
Wie kann ich das machen das immer die sprache angezeigt wird die der benutzer eingestelllthat und wenn er gast ist die Standartsprache angezeigt wird??
hier meine php datei:
| PHP: |
<?php
/***************************************************************************
* 404.php
* -------------------
* email : psprofi[at]online.de
*
*
***************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_PROFILE);
init_userprefs($userdata);
//
// End session management
//
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_404.' . $phpEx);
ODER:
include($phpbb_root_path . 'language/lang_' . $userdata['user_lang'] . '/lang_404.' . $phpEx);
$page_title = $lang['page_title'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'body' => '404.tpl')
);
$template->assign_vars(array(
'L_404_TITLE' => $lang['404_title'],
'L_404_SCRIPT_LINE_1' => $lang['404_script_line_1'],
'L_404_SCRIPT_LINE_2' => $lang['404_script_line_2'],
'L_404_SCRIPT_LINE_3' => $lang['404_script_line_3'],
'L_404_SCRIPT_LINE_4' => $lang['404_script_line_4'],
'L_404_SCRIPT_LINE_5' => $lang['404_script_line_5'],
'L_404_SCRIPT_LINE_6' => $lang['404_script_line_6'],
'L_404_SCRIPT_LINE_7' => $lang['404_script_line_7'],
'L_404_SCRIPT_LINE_8' => $lang['404_script_line_8'],
'L_404_SCRIPT_LINE_9' => $lang['404_script_line_9'],
'L_404_SCRIPT_LINE_10' => $lang['404_script_line_10'],
'L_404_SCRIPT_LINE_11' => $lang['404_script_line_11'],
'L_404_SCRIPT_LINE_12' => $lang['404_script_line_12'],
'L_404_SCRIPT_LINE_13' => $lang['404_script_line_13'],
'L_404_SCRIPT_LINE_14' => $lang['404_script_line_14'],
'L_404_SCRIPT_LINE_15' => $lang['404_script_line_15'],
'L_404_SCRIPT_LINE_16' => $lang['404_script_line_16'],
'L_404_SCRIPT_LINE_17' => $lang['404_script_line_17'],
'L_404_SCRIPT_LINE_18' => $lang['404_script_line_18'],
'L_404_SCRIPT_LINE_19' => $lang['404_script_line_19'],
'L_404_SCRIPT_LINE_20' => $lang['404_script_line_20'],
'L_404_SCRIPT_LINE_21' => $lang['404_script_line_21'],
'L_404_SCRIPT_LINE_22' => $lang['404_script_line_22'],
'L_404_SCRIPT_LINE_23' => $lang['404_script_line_23'],
'L_404_SCRIPT_LINE_24' => $lang['404_script_line_24'],
'L_404_SCRIPT_LINE_25' => $lang['404_script_line_25'],
'L_404_SCRIPT_LINE_26' => $lang['404_script_line_26'],
'L_404_SCRIPT_LINE_27' => $lang['404_script_line_27'],
'L_404_SCRIPT_LINE_28' => $lang['404_script_line_28'],
'L_404_SCRIPT_LINE_29' => $lang['404_script_line_29'],
'L_404_SCRIPT_LINE_30' => $lang['404_script_line_30'],
'L_404_SCRIPT_LINE_31' => $lang['404_script_line_31'],
'L_404_SCRIPT_LINE_32' => $lang['404_script_line_32'],
'L_404_SCRIPT_LINE_33' => $lang['404_script_line_33'],
'L_404_SCRIPT_LINE_34' => $lang['404_script_line_34'],
'L_404_SCRIPT_LINE_35' => $lang['404_script_line_35'],
'L_404_SCRIPT_LINE_36' => $lang['404_script_line_36'],
'L_404_SCRIPT_LINE_37' => $lang['404_script_line_37'],
'L_404_SCRIPT_LINE_38' => $lang['404_script_line_38'],
'L_404_SCRIPT_LINE_39' => $lang['404_script_line_39'],
'L_404_SCRIPT_LINE_40' => $lang['404_script_line_40'],
'L_404_SCRIPT_LINE_41' => $lang['404_script_line_41'],
'L_404_SCRIPT_LINE_42' => $lang['404_script_line_42'],
'L_404_SCRIPT_LINE_43' => $lang['404_script_line_43'],
'L_404_SCRIPT_LINE_44' => $lang['404_script_line_44'],
'L_404_SCRIPT_LINE_45' => $lang['404_script_line_45'],
'L_404_SCRIPT_LINE_46' => $lang['404_script_line_46'],
'L_404_SCRIPT_LINE_47' => $lang['404_script_line_47'],
'L_404_SCRIPT_LINE_48' => $lang['404_script_line_48'],
'L_404_SCRIPT_LINE_49' => $lang['404_script_line_49'],
'L_404_SCRIPT_LINE_50' => $lang['404_script_line_50'],
)
);
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
|
Danke im vorraus |
|
|
    |
 |
Google
|
Verfasst am:
|
 |
|
|
 |
TerraTux
Support Team Member


Anmeldungsdatum: 02.08.2002
Beiträge: 1026
Wohnort: Delitzsch
|
Verfasst am:
Mi 03 Mai, 2006 18:04 |
  |
Hallo,
tu einfach...
| Code: |
if( $userdata['session_logged_in'] )
{
include($phpbb_root_path . 'language/lang_' . $userdata['user_lang'] . '/lang_404.' . $phpEx);
}
else
{
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_404.' . $phpEx);
}
|
Gruß |
_________________ software is like sex, it's better if it's free
Kein Support per PM || EMail || Messenger |
|
     |
 |
psprofi
phpBB2.de User

Anmeldungsdatum: 09.09.2004
Beiträge: 102
|
Verfasst am:
Mi 03 Mai, 2006 18:47 |
  |
danke aber ich habs so gelöst.
| Code: |
$language = ($userdata['user_lang']) ? $userdata['user_lang'] : $board_config['default_lang'];
if ( !file_exists($phpbb_root_path . 'language/lang_' . $language . '/lang_404_errorpage.'.$phpEx) )
{
$language = $board_config['default_lang'];
}
include($phpbb_root_path . 'language/lang_' . $language . '/lang_404_errorpage.'. $phpEx); |
Hab den tip ausm anderen forum |
|
|
    |
 |
|
|
|
|
|
Nächstes Thema anzeigen
Vorheriges Thema anzeigen
Du kannst keine Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum nicht antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen. Du kannst Dateien in diesem Forum posten Du kannst Dateien in diesem Forum herunterladen
|
|
|