Hola,
a mi me da el mismo error que a khima:
Fatal error: Cannot redeclare class template in /home/khimamu/public_html/foro/includes/template.php on line 30
Explico lo que he hecho y haber si alguien puede decirme donde esta el error

:
He creado un archivo
ultimos.php en el directorio del foro que contiene:
<?
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);
$auth_ary = auth(AUTH_READ, AUTH_LIST_ALL, $userdata);
while ( list($auth_forum_id, $auth_level) = each($auth_ary) )
{
if (!$auth_level['auth_read'] )
{
$auth_view_forums = ($auth_view_forums . " p.forum_id<>" . $auth_forum_id . " and ");
$auth_view_forums1 = ($auth_view_forums1 . " forum_id<>" . $auth_forum_id . " and ");
}
}
$auth_view_forums="WHERE " . $auth_view_forums;
?>
<style>
/* This is the outline round the main forum tables */
th {
color: #FFA34F; font-size: 11px; font-weight : bold;
background-color: #006699; height: 25px;
background-image: url(images/cellpic3.gif);
}
.forumline { background-color: #FFFFFF; border: 2px #006699 solid; }
td.row1 { background-color: #EFEFEF;font-size: 9px; }
td.row2 { background-color: #DEE3E7; font-size: 10px; }
td.row2 { background-color: #DEE3E7; font-size: 10px; }
td.row3 { background-color: #D1D7DC; }
font,th,td,p { font-family: Verdana, Arial, Helvetica, sans-serif;}
a:link,a:active,a:visited { text-decoration: none;color : #006699; }
a:hover { text-decoration: none; color : #DD6900; }
.actual{border:2px solid #000000;background-color: #FFFFFF;font-size: 10px; }
.noactual{border:2px solid #FFFFFF;background-color: #EFEFEF;font-size: 10px; }
</style>
<table align="center" class="forumline">
<tr>
<th colspan="2">
Título - Foro
</th>
<th>
Abierto por
</th>
<th>
Último mensaje
</th>
<th>
Respuestas
</th>
</tr>
<?
$sql=mysql_query("SELECT t.topic_last_post_id, t.topic_title, t.topic_id, t.topic_time, t.topic_replies, u.username,u.user_id, f.forum_name, f.forum_id, p.post_id, p.post_time FROM ".POSTS_TABLE." p, ".TOPICS_TABLE." t, ".USERS_TABLE." u, ".FORUMS_TABLE." f $auth_view_forums t.topic_poster=u.user_id AND p.topic_id=t.topic_id AND t.forum_id=f.forum_id ORDER BY p.post_time DESC LIMIT 0,5");
while ($assoc=mysql_fetch_assoc($sql))
{
$sql1=mysql_query("SELECT u.username FROM ".POSTS_TABLE." p, ".USERS_TABLE." u WHERE p.post_id=".$assoc['topic_last_post_id']." AND p.poster_id=u.user_id");
$ultimo_usuario=mysql_fetch_assoc($sql1);
$ultimo_usuario=$ultimo_usuario['username'];
$fecha_ultimo=getdate($assoc['post_time']);
$fecha_ultimo=$fecha_ultimo["mday"]."-".$fecha_ultimo["mon"]."-".$fecha_ultimo["year"];
$fecha_abierto=getdate($assoc['topic_time']);
$fecha_abierto=$fecha_abierto["mday"]."-".$fecha_abierto["mon"]."-".$fecha_abierto["year"];
?>
<tr>
<td class="row1" align="center">
<a href="<?=$phpbb_root_path?>viewtopic.php?p=<?=$ass oc['post_id']?>&highlight=#<?=$assoc['post_id']?>">
<?=( ( strlen ( $assoc["topic_title"] ) > 20 ) ? ( substr ( $assoc["topic_title"] , 0 , 20 ) . "..." ) : $assoc["topic_title"] )?>
</a>
</td>
<td class="row1" align="center">
<a href="<?=$phpbb_root_path?>viewforum.php?f=<?=$ass oc["forum_id"]?>">
<?=$assoc["forum_name"]?>
</a>
</td>
<td class="row1" align="center">
<a href="<?=$phpbb_root_path?>profile.php?mode=viewpr ofile&u=<?=$assoc["username"]?>">
<?=$assoc["username"]?>
</a>
el <?=$fecha_abierto?>
</td>
<td class="row1" align="center">
<a href="<?=$phpbb_root_path?>profile.php?mode=viewpr ofile&u=<?=$ultimo_usuario?>">
<?=$ultimo_usuario?>
</a>
el <?=$fecha_ultimo?>
<td class="row1" align="center">
<?=$assoc["topic_replies"]?>
</td>
</tr>
<?}?>
</table>
Luego, en
indes.php he añadido donde decía joseman en un post anterior:
include($phpbb_root_path . 'ultimos.'.$phpEx);
No se muy bien porque puede ser el error, porque lo de template suele referirse a cosas de la forma en que se visualiza, no? lo de subsilver y demás.
Tampoco se si puede ser por lo que decía joseman de que en algunos casos no era necesario poner el código de identificación del principio.
Si alguno me enseña la luz

le estaría muy agradecido.
Saludos y gracias