#37761 by Stian
Sun 05 Oct 2014, 01:23
How to fetch news from a vapus board (Hosted forums). Or any other phpbb based forum.

Edit latestnews.php. Remove everything including and below this line:
(This is the format for the evo-ot theme, poster and such can be added, also the date format can be tweaked and replies added if you want).
Code: Select allfunction replaceSmile($text, $smile)

and replace by:
Code: Select all        include ("simplepie.php");
        $feed = new SimplePie();

        foreach($feed->get_items() as $thread)
            $stat = explode("<p>", $thread->get_description());
            $stat2 = $stat[sizeof($stat)-1];
            $stat2 = str_replace(array("</p>", "Statistics: Posted by"), array("", ""), $stat2);
            $stat2 = explode(" &mdash; ", $stat2)[1];
            $news .= '<h2><a target="_blank" href="'.$thread->get_permalink().'">' . explode(" &bull; ", $thread->get_title())[1] . '</a></h2><div class="date">' . $stat2 . '</div>';
            $news .= '<div class="news">' . $stat[0] . '</div>';
            $news .= '<div class="bottomnews"></div>';
        $main_content .= $news;

And put simplepie.php (this is modified to be geisor compatible) into the pages directory.

All done. :)