Verfasst: 07.10.2005 20:51
Hi,
probier mal folgendes ...
In der portal.php den Heise Newsticker Block mit diesem hier ersetzen:
probier mal folgendes ...
In der portal.php den Heise Newsticker Block mit diesem hier ersetzen:
In der portal_body.tpl muss der Block dann so aussehen:// SWITCH HEISE NEWSTICKER START
$timecheck = microtime();
$content = implode ("", file ("http://www.heise.de/newsticker/heise.rdf"));
preg_match_all("|<item>(.*)</item>|Uism",$content, $items, PREG_PATTERN_ORDER);
$heise_newsticker = array();
$cancel_heise = FALSE;
for ($i=0;$i<count($items[1]);$i++)
{
preg_match_all("|<title>(.*)</title>(.*)<link>(.*)</link>|Uism",$items[1][$i], $regs, PREG_PATTERN_ORDER);
$heise_newsticker[] = "<p><a href='".$regs[3][0]."' target='_blank' class='genmed'>".$regs[1][0]."</a></p>";
if ( ( microtime()-$timecheck ) * 10 > 2 )
{
$i = 11;
$cancel_heise = TRUE;
}
}
if ( $cancel_heise != TRUE )
{
$template->assign_block_vars('switch_heise_newsticker_on', array());
for ($i=0;$i<count($items[1]);$i++)
{
$template->assign_block_vars('switch_heise_newsticker_on.newsticker',array(
'heise_Ticker' => $heise_newsticker[$i])
);
}
}
// SWITCH HEISE NEWSTICKER END
Die Datei portal_heise_ticker.php kann gelöscht werden.<!-- ##### HEISE NEWSTICKER START ##### -->
<!-- BEGIN switch_heise_active -->
<table width="100%" border="0" cellpadding="1" cellspacing="1" style="border-collapse: collapse" class="forumline">
<tr>
<td class="catHead" colspan="2" height="25"><span class="cattitle"><center><b>{IntroPortaltext26}:</b></center></span></td>
</tr>
<tr>
<td colspan="2" height="1" class="row3"><img src="images/spacer.gif" width="1" height="1" alt="."></td>
</tr>
<tr>
<td align="center" class="row1">
<!-- BEGIN newsticker -->
{switch_heise_newsticker_on.newsticker.heise_Ticker}
<!-- END newsticker -->
</td>
</tr>
</table><br>
<!-- END switch_heise_active -->
<!-- ##### HEISE NEWSTICKER END ##### -->