| Autor |
Nachricht |
cback
phpBB2.de User
 [KB] Manager

Anmeldungsdatum: 16.01.2004
Beiträge: 3321
Wohnort: Saarland
|
Verfasst am:
Sa 28 Aug, 2004 00:39 |
  |
So hier ein weiterer Mod und zwar ein Heise Newsfeld für Smartors EZ Portale die den CMX News Mod auf dem Portal eingebunden haben (z.B das Plus 1.5 Forum) Im Bereich wo man die Änderung an der portal_body.tpl vornehmen muss eventuell noch den Link zum Newsbildchen anpassen je nach dem wo man auf seinem Forum die Newsbilder abgelegt hat!
DEMO: http://www.community.cback.de direkt im Portal unter dem Willkommenstext.
| Code: |
#########################################################################
## Title: Heise Newsfield in Portal
## Version: 1.0.1
## Author: CBACK < > (Christian Knerr) http://www.cback.de
## Info: Dieser Mod fügt ein Heise Newsfeld im Portal mit installiertem
## CMX News Mod ein. Der Bilderlink zum Newsimage kann in der
## Codestelle für die portal_body.tpl angepasst werden. Das
## Layout des Heise Newsfeldes gleicht den Boxen des CMX NewsMods
## und ist im Portal direkt unter dem Willkommenstext sichtbar.
#########################################################################
##
## Installation Level: Easy
## Installation Time: 2 Minutes
## Files To Edit: portal.php
## portal_body.tpl
##
## Compatibility: CBACK Orion, phpBB Plus 1.5.x,
## other phpBB with Smartors Portal and CMX News for Portal
##
## Included Files: n/a
##
#########################################################################
#
#-----[ 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><br>"));
}
#
#-----[ OPEN ]---------------------------------------------------------
#
templates/fisubsilversh/portal_body.tpl
#
#-----[ FIND ]---------------------------------------------------------
#
<!-- END welcome_text -->
#
#-----[ AFTER ADD ]---------------------------------------------------------
#
<TABLE class=forumline cellSpacing=1 cellPadding=3 width="100%" border=0>
<TBODY>
<TR>
<TD class=cat colSpan=2><SPAN class=genmed> <a href="http://www.heise.de" target="_blank">Heise - News</a></SPAN></TD></TR>
<TR>
<td class="row2" colspan="2" valign="middle" height="18"><span class="gensmall"><b>Die neuesten News von heise.de</b> auf <a href="http://www.cback.de" target="_blank"><b>CBACK.DE<b/></a></span></td>
<TR>
<TD class=row1 vAlign=top><img src="images/news/www.gif" border="0" alt="Heise News" title="Heise News" /></A> </TD>
<TD class=row1 vAlign=top width="100%">
<SPAN class=gensmall><p class="genmed">
<!-- BEGIN newsticker -->
<SPAN class=gensmall>{newsticker.heise_Ticker}</span>
<!-- END newsticker -->
</p>
</SPAN></TD>
<TR>
</TR></TBODY></TABLE>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />
#
#-----[ SAVE/UPLOAD ALL FILES ]------------------------------------------
#
# EoF |
Viel Spaß |
_________________ [ Forensoftware | CBACK Software | SYNTACTION ]
Support only in Forum! - Support nur im Forum!
Zuletzt bearbeitet von cback am Di 06 Dez, 2005 21:44, insgesamt 2-mal bearbeitet |
|
     |
 |
Google
|
Verfasst am:
|
 |
|
|
 |
MrC
phpBB2.de User

Anmeldungsdatum: 16.07.2003
Beiträge: 221
Wohnort: The Netherlands
|
Verfasst am:
Sa 28 Aug, 2004 08:42 |
  |
Is there also an english site that offers this kind of news?
My board is default english. |
|
|
    |
 |
cback
phpBB2.de User
 [KB] Manager

Anmeldungsdatum: 16.01.2004
Beiträge: 3321
Wohnort: Saarland
|
Verfasst am:
Sa 28 Aug, 2004 11:15 |
  |
I don't know but you can use every rss Newsfeed you only have to change the URL of my Heise Mod:
| Code: |
//
// Heise Newsticker Add-on
//
$content = implode ("", file ("http://www.heise.de/newsticker/heise.rdf"));
|
only change the url to the rdf and you got it. |
_________________ [ Forensoftware | CBACK Software | SYNTACTION ]
Support only in Forum! - Support nur im Forum! |
|
     |
 |
MrC
phpBB2.de User

Anmeldungsdatum: 16.07.2003
Beiträge: 221
Wohnort: The Netherlands
|
Verfasst am:
Sa 28 Aug, 2004 17:19 |
  |
somehow it doesn't work
i see a table under the welcome with the www image, but no news
for test i use the heise url |
|
|
    |
 |
cback
phpBB2.de User
 [KB] Manager

Anmeldungsdatum: 16.01.2004
Beiträge: 3321
Wohnort: Saarland
|
Verfasst am:
Sa 28 Aug, 2004 18:07 |
  |
have you changed anything on the code? You have to do both changes in portal.php and portal_body.tpl
Testet with Plus 1.5 and phpBB 2.0.10 with EZ Portal and CMX |
_________________ [ Forensoftware | CBACK Software | SYNTACTION ]
Support only in Forum! - Support nur im Forum! |
|
     |
 |
MrC
phpBB2.de User

Anmeldungsdatum: 16.07.2003
Beiträge: 221
Wohnort: The Netherlands
|
Verfasst am:
Sa 28 Aug, 2004 19:13 |
  |
Didn't change anything to the code, did portal.php aswell portal_body.tpl
Using plus 1.52 |
|
|
    |
 |
cback
phpBB2.de User
 [KB] Manager

Anmeldungsdatum: 16.01.2004
Beiträge: 3321
Wohnort: Saarland
|
Verfasst am:
Sa 28 Aug, 2004 19:17 |
  |
|
     |
 |
MrC
phpBB2.de User

Anmeldungsdatum: 16.07.2003
Beiträge: 221
Wohnort: The Netherlands
|
Verfasst am:
Sa 28 Aug, 2004 19:33 |
  |
|
    |
 |
cback
phpBB2.de User
 [KB] Manager

Anmeldungsdatum: 16.01.2004
Beiträge: 3321
Wohnort: Saarland
|
Verfasst am:
Sa 28 Aug, 2004 21:49 |
  |
Hmm doesn't work this link can you please attach the portal.php and the portal_body.tpl that I can see where the mod is. Thx. |
_________________ [ Forensoftware | CBACK Software | SYNTACTION ]
Support only in Forum! - Support nur im Forum! |
|
     |
 |
MrC
phpBB2.de User

Anmeldungsdatum: 16.07.2003
Beiträge: 221
Wohnort: The Netherlands
|
Verfasst am:
Sa 28 Aug, 2004 22:08 |
  |
|
    |
 |
cback
phpBB2.de User
 [KB] Manager

Anmeldungsdatum: 16.01.2004
Beiträge: 3321
Wohnort: Saarland
|
Verfasst am:
Sa 28 Aug, 2004 22:25 |
  |
Ok try these files!
And if you'r board runs local please ensure that this board can connects to the internet. The "Heise" Ticker gets his informations from the web and if you're offline there is no rss-news-field  |
_________________ [ Forensoftware | CBACK Software | SYNTACTION ]
Support only in Forum! - Support nur im Forum! |
|
     |
 |
MrC
phpBB2.de User

Anmeldungsdatum: 16.07.2003
Beiträge: 221
Wohnort: The Netherlands
|
Verfasst am:
Sa 28 Aug, 2004 22:40 |
  |
|
    |
 |
cback
phpBB2.de User
 [KB] Manager

Anmeldungsdatum: 16.01.2004
Beiträge: 3321
Wohnort: Saarland
|
Verfasst am:
Sa 28 Aug, 2004 22:57 |
  |
Try this:
Open: portal.php
find:
$content = implode
replace with
$heisemod = implode
find:
$content, $items
replace with:
$heisemod, $items |
_________________ [ Forensoftware | CBACK Software | SYNTACTION ]
Support only in Forum! - Support nur im Forum! |
|
     |
 |
MrC
phpBB2.de User

Anmeldungsdatum: 16.07.2003
Beiträge: 221
Wohnort: The Netherlands
|
Verfasst am:
So 29 Aug, 2004 09:26 |
  |
still nothing  |
|
|
    |
 |
cback
phpBB2.de User
 [KB] Manager

Anmeldungsdatum: 16.01.2004
Beiträge: 3321
Wohnort: Saarland
|
Verfasst am:
So 29 Aug, 2004 10:49 |
  |
OK delete the Mod-Part from the portal.php, open includes/page_header.php
find;[b]
| Code: |
// Format Timezone. We are unable to use array_pop here, because of PHP3 compatibility |
[b]before add
| Code: |
//
// 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> • "));
} |
|
_________________ [ Forensoftware | CBACK Software | SYNTACTION ]
Support only in Forum! - Support nur im Forum! |
|
     |
 |
|
|
|
|