Eksportere variabel fra PHP til template i PHPBB forum
Har fået at vide at følgende kode skulle do the trick...Jeg kan bare ikke få det til at virke - any ideas ?<?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_INDEX);
init_userprefs($userdata);
//
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
// assign template
$template->set_filenames(array(
'body' => 'profile_view_body.tpl')
);
$template->assign_vars(array(
'JOIN1' => $userdata['user_regdate']
));
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
(Herefter skulle man kunne kalde {JOIN1} i profile_view_body.tpl)
