ich versuche testweise eine Box zu erstellen. Ich habe in Ilch 1.1p eine Rss Box, die mir ZB zurzeit alle Worldoftanks news anzeigt.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | <?php require_once ( 'vendor/lastRSS.php' ); # Copyright by Manuel Staechele # Support www.ilch.de defined ( 'main' ) or die ( 'no direct access' ); $rss = new lastRSS(); $rss ->cp = 'ISO-8859-1' ; $rss ->cache_dir = '/tmp' ; $rss ->cache_time = 3600; // one hour $items = array_slice ( $rs [ 'items' ], 0, 10); echo '<table id="wgnews_box">' ; foreach ( $items as $item ) { echo '<tr>' ; echo '<td style="width: 20px;" class="box_font_icon"><i class="fa fa-info-circle fa-lg"></i></td>' ; echo '<td style="width: 447px;line-height:13px;border-bottom:1px solid #A5A5A5;"><a href="' . $item [ 'link' ]. '" target="_blank" class="box_font"><br>' . $item [ 'title' ]. '</a><br>' .(( strlen ( $item [ 'description' ])<55) ? $item [ 'description' ] : substr ( $item [ 'description' ],0,55). '...' ). '<br><span class="title2">' . $item [ 'pubDate' ]. '</span></td>' ; echo '</tr>' ; } echo '</table>' ; } ?> |
Nun möchte ich diese Box auch in Ilch 2.x nutzen. wie geht man da vor?
weil über selfbox, geht es nicht. Da hier PHP mit verwendet wird
verwendete ilch Version: 2.x
betroffene Homepage: sandbox.caelum-et-infernum.eu