Habe mal wieder ein Problem. Unzwar binde ich einige Teile in meinem Board über switch ein.
Soweit klappt auch alles aber wie mache ich es das nur gerade der HTML Block angezeigt wird der aufrerufen worden ist?
Hier mal mein Code
Code: Alles auswählen
switch ($mode) {
case 'spon_site':
include("{$phpbb_root_path}includes/functions_sporn.$phpEx");
$sql = 'SELECT *
FROM '.SPORN_TABLE.' ORDER BY sporn';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$template->assign_block_vars('gan', array(
'gan' => $row['gan'],
));
}
break;
default:
$sql = 'SELECT *
FROM '.SPORN_TABLE.' ORDER BY sporn';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$template->assign_block_vars('sporn', array(
'sporn' => $row['sporn'],
));
}
Code: Alles auswählen
[color=red]########## case 'spon_site': [/color]
<table class="table1" cellspacing="1">
<thead>
<tr>
<th class="trank"><strong>{L_GAN}</strong></th>
</tr>
</thead>
<tbody>
<tr class="bg1">
<!-- BEGIN gan -->
<td>{gan.sporn}</td>
<!-- END topsite -->
</tr>
</tbody>
</table>
[color=red]######## case 'spon_site': ###########[/color]
[color=red]############## default #################[/color]
<table class="table1" cellspacing="1">
<thead>
<tr>
<th class="trank"><strong>{L_SPORN}</strong></th>
</tr>
</thead>
<tbody>
<tr class="bg1">
<!-- BEGIN sporn -->
<td>{sporn.sporn}</td>
<!-- END topsite -->
</tr>
</tbody>
</table>
[color=red] ############## default #################[/color]
Wie bekomme ich das hin?