cback hat geschrieben:Hi Holger,
vielen Dank für den Hinweis zur Änderung des Heise Systems. Ich habe die von Dir vorgeschlagene Korrektur nun im MOD eingebunden, damit alles auf dem neuesten Stand ist.
Vielen Dank für den Hinweis!
Gruß,
Christian
Nicht ganz
Code: Alles auswählen
#########################################################################
## Title: Heise Newsticker in Portal
## Author: CBACK < webmaster@cback.de > (Christian Knerr) http://www.cback.de
## Version: 1.0.2
## Info: Dieser Mod fügt einen Heise Newsticker im Portal unter den
## Willkommenstext ein.
#########################################################################
##
## Installation Level: Easy
## Installation Time: 2 Minutes
## Files To Edit: portal.php
## portal_body.tpl
##
##
## Included Files: n/a
##
#########################################################################
# Make this step only if you have a normal phpBB with EZ Portal or an phpBB Orion
#
#-----[ OPEN ]---------------------------------------------------------
#
portal.php
#
#-----[ FIND ]---------------------------------------------------------
#
//
// Generate the page
//
#
#-----[ BEFORE ADD ]---------------------------------------------------------
#
//
// Heise Newsticker Add-on
//
$content = implode ("", file ("http://www.heise.de/newsticker/heise.rdf"));
preg_match_all("|<item>(.*)</item>|Uism",$content, $items, PREG_PATTERN_ORDER);
for ($i=0;$i<count($items[1]);$i++)
{
preg_match_all("|<title>(.*)</title>(.*)<link>(.*)</link>|Uism",$items[1][$i], $regs, PREG_PATTERN_ORDER);
$template->assign_block_vars('newsticker',array(
'heise_Ticker' => "<a href='".utf8_decode($regs[3][0])."' target='_blank' class='mainmenu'><b>".utf8_decode($regs[1][0])."</b></a> • "));
}
# Make this step only if you have a phpBB Plus 1.5.x Forum!
#
#-----[ OPEN ]---------------------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]---------------------------------------------------------
#
// Format Timezone. We are unable to use array_pop here, because of PHP3 compatibility
#
#-----[ BEFORE ADD ]---------------------------------------------------------
#
//
// Heise Newsticker Add-on
//
$content = implode ("", file ("http://www.heise.de/newsticker/heise.rdf"));
preg_match_all("|<item>(.*)</item>|Uism",$content, $items, PREG_PATTERN_ORDER);
for ($i=0;$i<count($items[1]);$i++)
{
preg_match_all("|<title>(.*)</title>(.*)<link>(.*)</link>|Uism",$items[1][$i], $regs, PREG_PATTERN_ORDER);
$template->assign_block_vars('newsticker',array(
'heise_Ticker' => "<a href='".$regs[3][0]."' target='_blank' class='mainmenu'><b>".$regs[1][0]."</b></a> • "));
}
Das muss so aussehen damit es Funktioniert:
Code: Alles auswählen
#########################################################################
## Title: Heise Newsticker in Portal
## Author: CBACK < webmaster@cback.de > (Christian Knerr) http://www.cback.de
## Version: 1.0.2
## Info: Dieser Mod fügt einen Heise Newsticker im Portal unter den
## Willkommenstext ein.
#########################################################################
##
## Installation Level: Easy
## Installation Time: 2 Minutes
## Files To Edit: portal.php
## portal_body.tpl
##
##
## Included Files: n/a
##
#########################################################################
# Make this step only if you have a normal phpBB with EZ Portal or an phpBB Orion
#
#-----[ OPEN ]---------------------------------------------------------
#
portal.php
#
#-----[ FIND ]---------------------------------------------------------
#
//
// Generate the page
//
#
#-----[ BEFORE ADD ]---------------------------------------------------------
#
//
// Heise Newsticker Add-on
//
$content = implode ("", file ("http://www.heise.de/newsticker/heise.rdf"));
preg_match_all("|<item>(.*)</item>|Uism",$content, $items, PREG_PATTERN_ORDER);
for ($i=0;$i<count($items[1]);$i++)
{
preg_match_all("|<title>(.*)</title>(.*)<link>(.*)</link>|Uism",$items[1][$i], $regs, PREG_PATTERN_ORDER);
$template->assign_block_vars('newsticker',array(
'heise_Ticker' => "<a href='".utf8_decode($regs[3][0])."' target='_blank' class='mainmenu'><b>".utf8_decode($regs[1][0])."</b></a> • "));
}
# Make this step only if you have a phpBB Plus 1.5.x Forum!
#
#-----[ OPEN ]---------------------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]---------------------------------------------------------
#
// Format Timezone. We are unable to use array_pop here, because of PHP3 compatibility
#
#-----[ BEFORE ADD ]---------------------------------------------------------
#
//
// Heise Newsticker Add-on
//
$content = implode ("", file ("http://www.heise.de/newsticker/heise.rdf"));
preg_match_all("|<item>(.*)</item>|Uism",$content, $items, PREG_PATTERN_ORDER);
for ($i=0;$i<count($items[1]);$i++)
{
preg_match_all("|<title>(.*)</title>(.*)<link>(.*)</link>|Uism",$items[1][$i], $regs, PREG_PATTERN_ORDER);
$template->assign_block_vars('newsticker',array(
'heise_Ticker' => "<a href='".utf8_decode($regs[3][0])."' target='_blank' class='mainmenu'><b>".utf8_decode($regs[1][0])."</b></a> • "));
}
Gruß,
Danny