Good evening to the community.
I have created custom pages according to the instructions i found within the community and within them i have incorporated language variables for some of the languages i have installed in phpBB. Below is the php code i am using as a php template:
Everything works fine with the language variables in the common.php file that i customize for each language. However, since this way it is quite difficult to edit each page when needed, and in an upgrade i will lose my modifications, i try to have a file for each page in the language folders with the same name and store the variables there. E.g.: The info.php page will have its own language file with the same name.
How can i achieve this? I have tried many ways and none of them worked for me.
I have created custom pages according to the instructions i found within the community and within them i have incorporated language variables for some of the languages i have installed in phpBB. Below is the php code i am using as a php template:
Code:
<?php// Define phpBB constantsdefine('IN_PHPBB', true);$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';$phpEx = substr(strrchr(__FILE__, '.'), 1);include($phpbb_root_path . 'common.' . $phpEx);// Start session management$user->session_begin();$auth->acl($user->data);$user->setup();// Define the page URL correctly$u_info = append_sid("info.$phpEx");// Assign the variable to the template$template->assign_var('U_INFO', $u_info);// Set the page titlepage_header($user->lang('MY_LINK_NAME'));// Load the template file$template->set_filenames(array( 'body' => 'info_body.html'));// Display the pagepage_footer();?>
How can i achieve this? I have tried many ways and none of them worked for me.
Statistics: Posted by loukas79 — Tue Mar 11, 2025 10:27 am