0

) I'm developing a website and I want to use PHPBB auth system. I managed to get it working pretty well, following a few suggestions I found on this website, but I've got a problem. Basically all I need to do is accessing template variables such as {U_PROFILE}, {L_PROFILE}, {U_PRIVATEMSGS}, {PRIVATE_MESSAGE_INFO} and others, from outside PHPBB. Is this possible? The page where is need to echo those variables already has those lines of code:

define('IN_PHPBB', true);
define('PHPBB_ROOT_PATH', "./board/");
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
4

1 に答える 1

0

テンプレート変数は、テンプレートを使用する PHP スクリプトによって設定されます。したがって、それらは実際には PhpBB コードから分離されているわけではありません。

ただし、言及したテンプレート変数は include/page_header.php で利用できるため、そのファイルをスクリプトに組み込み、Phpbb コードで行われるのと同じ方法で独自のページを構築することもできます。

于 2010-12-12T22:24:38.260 に答える