Seite 1 von 1

Problem - .php in .tpl auführen

Verfasst: 16.09.2006 21:36
von Dead_Fishbone
Also ich habe mir gedacht, ich könnte in mein Forum CuteNews einbauen, indem ich einfach eine neue news.php im Forum Root erstelle, die so aussieht:

Code: Alles auswählen

<?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_RULES);
init_userprefs($userdata);
//
// End session management
//

//
// Lets build a page ...
//
$page_title = $l_title;
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

$template->set_filenames(array(
	'body' => 'news_body.tpl')
);

$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
Und dann noch das Template dazu:

Code: Alles auswählen

<center>

<table width="85%" cellspacing="2" cellpadding="2" border="0" align="center">
	<tr>
		<td align="left"><span class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a></span></td>
	</tr>
</table>

<table class="forumline" width="85%" cellspacing="1" cellpadding="3" border="0">
	<tr>
		<th class="thHead" height="25" valign="middle">Forum News</th>
	</tr>
	<tr>
		<td class="row1" align="center"><table width="80%" cellspacing="2" cellpadding="2" border="0" align="center">
			<tr>
				<td><span class="genmed">&nbsp;<br />

<?PHP
 include("../cutenews/show_news.php");
?> 

<br />&nbsp;<br /></span></td>
			</tr>
		</table></td>
	</tr>
</table>

</center>
Nur passiert nun bei der "news.php" so gut wie gar nix. Ist es überhaupt möglich ein PHP Script in einer Template Datei auszuführen? :-?

Hier der Link zur jetzigen "news.php" Datei:
http://www.tibursio.dommox.com/deadman/forum/news.php