Hello, I have created simple script for IPB that will allow you to load news from multiple boards on forums and display them.
Results will be also ordered by date.
Download url: https://github.com/Lukafurlan123/RSS...andler-for-IPB
Sample for code to display news:
Code:
<?php
$reader = new Reader();
$reader->addURL("http://forums.deviousps.com/index.php?/forum/5-news-announcements.xml/");
$reader->addURL("http://forums.deviousps.com/index.php?/forum/6-staff-updates.xml/");
$reader->constructArray();
$i = 0;
foreach($reader->displayArray() as $row) {
if($i < Configuration::NEWS_DISPLAYED) {
$description = substr(strip_tags($row['description']), 0, 360);
$description = $description . "...";
echo "
<div class=\"news\">
<div class=\"avatar\"> <img src=\"bin/img/avatar.png\" alt=\"avatar\" /> </div>
<div class=\"news-title\"> <img src=\"bin/img/comment-icon.png\"> <a href=\"#\" class=\"news-title-top\">" . $row['title'] . "</a>
<p class=\"news-title-bottom\">Posted on " . $row['origDate'] . " by <a href=# class=\"news-username\">Administrator</a></p>
<p class=\"post-body\">
" . $description . "
<a href=\"".$row['link']."\" style='text-decoration:none;'>
<div class=\"read-more\">
<p class=\"read-more-text\">Read More</p>
</div>
</a>
</div>
</div>
";
}
$i++;
}
?>
If you like this feel free to leave a like and rep