Thread: IPB Display news on website from multiple sources

Results 1 to 3 of 3
  1. #1 IPB Display news on website from multiple sources 
    Unfortunately we’re all human. Except me


    Join Date
    Aug 2011
    Posts
    926
    Thanks given
    539
    Thanks received
    439
    Rep Power
    601
    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
    Reply With Quote  
     


  2. #2  
    So when I'm free, I'm free


    Jay Gatsby's Avatar
    Join Date
    Jun 2010
    Posts
    2,307
    Thanks given
    1,148
    Thanks received
    1,982
    Rep Power
    5000
    Quote Originally Posted by LukaFurlan View Post
    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
    Nice, would this work for IPB4?

    Good job regardless.
    Reply With Quote  
     

  3. #3  
    Unfortunately we’re all human. Except me


    Join Date
    Aug 2011
    Posts
    926
    Thanks given
    539
    Thanks received
    439
    Rep Power
    601
    It does work with ips4 yes
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. IPB News on website
    By The Plateau in forum Application Development
    Replies: 6
    Last Post: 06-05-2016, 09:11 PM
  2. [PI] Display Player Online on Website
    By Freezia in forum Help
    Replies: 9
    Last Post: 06-08-2013, 10:33 PM
  3. Replies: 9
    Last Post: 07-31-2012, 12:44 PM
  4. Replies: 3
    Last Post: 07-29-2012, 08:21 AM
  5. Players online display on Website?!! HELP!~
    By Zᴀᴄʜ in forum Help
    Replies: 0
    Last Post: 12-29-2010, 12:50 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •