Recentemente um user no fórum me perguntou como criar aquele box de " últimos tópicos" que tem na home page do site.Bom não é nada complexo,bastaa você seguir os passos:
1-instale seu fórum phpbb
2-Depois baixe esse script,abra o arquivo recent.php no seu editor php(txt) preferido e configure da seguinte maneira,localize:
<?php
// ############ Edit below ########################################
$topic_length = '30'; // length of topic title
$topic_limit = '5'; // limit of displayed topics
$special_forums = '0'; // specify forums ('0' = no; '1' = yes)
$forum_ids = "; // IDs of forums; separate them with a comma$config_path = '/forum/'; // path to config.php
$root_path = '/forum/'; // link path
// ############ Edit above ########################################
observe:
No pontoxp esta assim:
<?php
// ############ Edit below ########################################
$topic_length = '100'; // length of topic title
$topic_limit = '9'; // limit of displayed topics
$special_forums = '0'; // specify forums ('0' = no; '1' = yes)
$forum_ids = "; // IDs of forums; separate them with a comma$config_path = '/'; // path to config.php
$root_path = 'http://www.pontoxp.com/forum/'; // link path
// ############ Edit above ########################################
observe na linha $config_path ,deixe '/' para caso do diretório do fórum estiver numa pasta na raiz do site,ex: www.pontoxp.com/forum
Localize:
// ############## output ##############
echo '<table width="100%" cellpadding="1" cellspacing="1" border="0" align="center">
<tr>
<th colspan="2">'. $topic_limit .' last topics</th>
</tr>';
// ############## output ##############
Para ficar como lista,subistitua tudo isso deixando assim:
// ############## output ##############
echo '<ul>';
// ############## output ##############
Lá no fim do arquivo localize:
// ############## output ##############
echo '<tr>
<td valign="top" nowrap="nowrap">'. $topic_type .'<a href="'. $topic_url .'">'. $topic_title .'</a></td>
</tr>
<tr>
<td><a href="'. $forum_url .'">'. $line[$i]['forum_name'] .'</a>: '. $last_url .' '. $last_time .'</td>
</tr>';
// ############## output ##############
subistitua por isso:
// ############## output ##############
echo '<li><a href="'. $topic_url .'" title="Publicado por '. $last_author .', na sala '. $line[$i]['forum_name'] .', '. $last_time .'">'. $topic_title .'</a></li>';// ############## output ##############
e novamente no fim do arquivo,provavelmente na penúltima linha onde está:
echo '</table>';
,subistitua por
echo '</ul>';
Logo depois, salve,e envie o arquivo recent.php para a pasta onde esta instalado seu fórum, ex: www.pontoxp.com/forum/
depois de enviado,use o include para incluir o post no seu site:
<?php include("seu-site.com/forum/recent.php"); ?>
Espero que tenham gostado,qualquer duvida pode postar nos comentários mesmo.