nel mio portale ho inserito(nel portal.php) questo codice per visualizzare le ultime recensioni e ultime guide:
Codice: Seleziona tutto
// INIZIO - 10 giochi prossimi all'uscita
$sql1 = "SELECT topic_id, forum_id, topic_title, topic_time, topic_moved_id, topic_first_poster_name
FROM " . TOPICS_TABLE . "
WHERE topic_type = 0
AND topic_moved_id = 0
AND forum_id = 2
ORDER BY topic_time DESC LIMIT 0,10";
$result1 = $db->sql_query($sql1);
while ($row1 = $db->sql_fetchrow($result1))
{
if ($auth->acl_get('f_read', $row1['forum_id']) == 1) {
$template->assign_block_vars('topics_last', array(
'LAST_LINK' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=" . $row1['forum_id'] . "&t=" . $row1['topic_id']),
'LAST_TITOLO' => $row1['topic_title']
));
}
}
$db->sql_freeresult($result1);
// FINE QUERY 10 giochi in uscita
// INIZIO - 10 ultime guide
$sql2 = "SELECT topic_id, forum_id, topic_title, topic_time, topic_moved_id, topic_first_poster_name
FROM " . TOPICS_TABLE . "
WHERE topic_type = 0
AND topic_moved_id = 0
AND forum_id = 3
ORDER BY topic_time DESC LIMIT 0,10";
$result2 = $db->sql_query($sql2);
while ($row2 = $db->sql_fetchrow($result2))
{
if ($auth->acl_get('f_read', $row2['forum_id']) == 1) {
$template->assign_block_vars('topics_last', array(
'LAST_LIN' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=" . $row2['forum_id'] . "&t=" . $row2['topic_id']),
'LAST_TITOL' => $row2['topic_title'],
));
}
}
$db->sql_freeresult($result1);
// FINE QUERY 10 ultime guide
il risultato effettivamente viene corretto nelle liste ma c'è un problema che potete vedere dalla sorgente dell'html della pagina che è qusto il pezzo interessato della tabella dove va l'output:
Codice: Seleziona tutto
<table width="100%">
<tr>
<td class="row1"><IMG SRC="/styles/supernova/template/portal/modules/immaginitp/ginuscita.png"></br><strong>Ultime Recensioni</strong></td>
<td class="row1"><IMG SRC="/styles/supernova/template/portal/modules/immaginitp/ultimeguide.png"></br><strong>Ultime Guide</strong></td>
<td class="row1"><IMG SRC="/styles/supernova/template/portal/modules/immaginitp/ginuscita.png"></br><strong>Giochi in uscita</strong></td>
</tr>
<tr>
<td class="row1" style="width: 33%;" valign="top">
<span class="gensmall">
<a href="./viewtopic.php?f=2&t=2" title="Crysis 2">Crysis 2</a><br>
<a href="./viewtopic.php?f=2&t=1" title="Benvenuto su phpBB3">Benvenuto su phpBB3</a><br>
<a href="" title=""></a><br>
<a href="" title=""></a><br>
</span>
</td>
<td class="row1" style="width: 33%;" valign="top">
<span class="gensmall">
<a href="" title=""></a><br>
<a href="" title=""></a><br>
<a href="./viewtopic.php?f=3&t=4" title="prova 2">prova 2</a><br>
<a href="./viewtopic.php?f=3&t=3" title="prova">prova</a><br>
</span>
</td>
<td class="row1" style="width: 33%;" valign="top">
<span class="gensmall">
<a href="./viewtopic.php?f=2&t=2" title="Crysis 2">Crysis 2</a><br>
<a href="./viewtopic.php?f=2&t=1" title="Benvenuto su phpBB3">Benvenuto su phpBB3</a><br>
<a href="" title=""></a><br>
<a href="" title=""></a><br>
</span>
</td>
</tr>
</table>
praticamente per ogni lista aggiunge sti cosi vuoti:
<a href="" title=""></a><br>
<a href="" title=""></a><br>
che in pratica lo vede come 2 spazi vuoti nella lista il che da fastidio.
Cosa ho sbagliato ?
nel template è tutto ok eccolo:
Codice: Seleziona tutto
<!-- IF .latest_announcements or .latest_hot_topics or .latest_topics -->
{$C_BLOCK_H_L}{$TITLE}{$C_BLOCK_H_R}
<ul class="topiclist bg1">
<li><dl>
<dd style="border-left:0px; width:100%">
<table width="100%">
<tr>
<td class="row1"><IMG SRC="/styles/supernova/template/portal/modules/immaginitp/ginuscita.png"></br><strong>Ultime Recensioni</strong></td>
<td class="row1"><IMG SRC="/styles/supernova/template/portal/modules/immaginitp/ultimeguide.png"></br><strong>Ultime Guide</strong></td>
<td class="row1"><IMG SRC="/styles/supernova/template/portal/modules/immaginitp/ginuscita.png"></br><strong>{L_PORTAL_RECENT_TOPIC}</strong></td>
</tr>
<tr>
<td class="row1" style="width: 33%;" valign="top">
<span class="gensmall">
<!-- BEGIN topics_last -->
<a href="{topics_last.LAST_LINK}" title="{topics_last.LAST_TITOLO}">{topics_last.LAST_TITOLO}</a><br>
<!-- END topics_last -->
</span>
</td>
<td class="row1" style="width: 33%;" valign="top">
<span class="gensmall">
<!-- BEGIN topics_last -->
<a href="{topics_last.LAST_LIN}" title="{topics_last.LAST_TITOL}">{topics_last.LAST_TITOL}</a><br>
<!-- END topics_last -->
</span>
</td>
<td class="row1" style="width: 33%;" valign="top">
<span class="gensmall">
<!-- BEGIN topics_last -->
<a href="{topics_last.LAST_LINK}" title="{topics_last.LAST_TITOLO}">{topics_last.LAST_TITOLO}</a><br>
<!-- END topics_last -->
</span>
</td>
</tr>
</table>
</dd>
</dl></li>
</ul>
{$C_BLOCK_F_L}{$C_BLOCK_F_R}
<!-- ENDIF -->