Hey all, i've hit a snag when trying to run my own php scripts using phpbb.
I'm using the standard phpbb hack to add your own pages, which is:
upload.php (in the root directory with the rest of the php pages):
And then having upload.tpl (in templates/mytemplate). The problem is this: I can't run any php code contained in upload.tpl. HTML works fine.
I've tried removing the php tags, that doesn't work.
TheArbiter told me to add this line to my .htaccess which theoretically should mean .tpl files can run php:
AddType application/x-httpd-php .htm .html .shtml .tpl
But that hasn't worked either. Upon closer inspection of my cPanel I saw this in the MIME types:
application/x-httpd-php .php .php4 .php3 .phtml
Could that be preventing me from running .tpl as php? Any help or input would be greatly appreciated.
Thanks for reading this unneccessarily long post.
I'm using the standard phpbb hack to add your own pages, which is:
upload.php (in the root directory with the rest of the php pages):
Code:
<?php
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_INDEX);
init_userprefs($userdata);
//
// End session management
//
//
// Output the basic page
//
$page_title = $lang['uniquetitle1'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'body' => 'upload.tpl')
);
make_jumpbox('viewforum.'.$phpEx);
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
And then having upload.tpl (in templates/mytemplate). The problem is this: I can't run any php code contained in upload.tpl. HTML works fine.
I've tried removing the php tags, that doesn't work.
TheArbiter told me to add this line to my .htaccess which theoretically should mean .tpl files can run php:
AddType application/x-httpd-php .htm .html .shtml .tpl
But that hasn't worked either. Upon closer inspection of my cPanel I saw this in the MIME types:
application/x-httpd-php .php .php4 .php3 .phtml
Could that be preventing me from running .tpl as php? Any help or input would be greatly appreciated.
Thanks for reading this unneccessarily long post.








