
Für alle, die das auch interessiert, hier eine kleine Anleitung am Beispiel meiner aboutme.php:
Die aboutme.php sieht nun so aus: (die rotmarkierte Zeilen sind durch das Einbinden der lang_aboutme.php hinzugekommen)
Die lang_aboutme.php müsste dann so aussehen:<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_ABOUTME);
init_userprefs($userdata);
// LOAD ABOUTME LANGUAGE FILE START
if( isset($HTTP_GET_VARS['mode']) )
{
switch( $HTTP_GET_VARS['mode'] )
{
default:
$lang_file = 'lang_aboutme';
$l_title = $lang['aboutme'];
break;
}
}
else
{
$lang_file = 'lang_aboutme';
$l_title = $lang['aboutme'];
}
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/' . $lang_file . '.' . $phpEx);
// LOAD ABOUTME LANGUAGE FILE END
$page_title = "Persönliche Seite von Peggy";
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
// TEMPLATE VARS START
$template->assign_vars(array(
'L_NAME' => $lang['Name'],
'L_LOCATION' => $lang['Location'],
'L_LIFE' => $lang['Life'],
'L_HOBBY' => $lang['Hobby'],)
);
// TEMPLATE VARS END
$template->set_filenames(array(
'body' => 'aboutme_body.tpl')
);
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
In der aboutme_body.tpl müsste dann an den entsprechenden Stellen im HTML-Code dieses hier eingefügt werden:<?php
$lang['Name'] = 'Lieschen Müller';
$lang['Location'] = 'Berlin';
$lang['Life'] = 'Mein bisheriges Leben verlief so ... bla bla';
$lang['Hobby'] = 'Meine Hobbies sind Stricken, Kampfsport, etc.';
?>
Das wars auch schon. Hihi{L_NAME}
{L_LOCATION}
{L_LIFE}
{L_HOBBY}
