Results 1 to 3 of 3

Thread: rssdisplaybox - Removing Thumbnails?

  1. #1
    Join Date
    Apr 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default rssdisplaybox - Removing Thumbnails?

    1) Script Title: rssdisplaybox

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ybox/index.htm

    3) Describe problem: I can't seem to figure out how to remove the thumbnail images alongside with news feeds. I've attempted several variations of strip_htmltags in many different parts of the code, but I'm clearly doing something wrong. I'm very much a novice when it comes to php, and I lack a bit of common sense as well I'm sure this will be an obvious fix to someone out there (such as replacing 'array' with something else, I don't know)....it's just completely escaping me. Any help would be greatly appreciated, thank you.

    -Justin

    My main.php starts as such:


    PHP Code:
    <?php
    //Function for ouputting the body of each RSS item displayed (inside loop)- DynamicDrive.com

    require('../php/simplepie.inc'); //Specify path to simplepie.inc on your server (by default located inside "simplepie" directory)
    $feed = new SimplePie();
    $feed->strip_htmltags(array('blink''html''marquee''font'));
    $feed->cache_location('cache'); //Specify path to cache directory on your server relative to this file
    $feed->handle_content_type();
    require(
    'outputbody.php'); //Path to custom "outputbody.php" file relative to this file

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    On this line, add the part in red.

    Code:
    $feed->strip_htmltags(array('blink', 'html', 'marquee', 'font', 'img'));
    Although, that would strip out any image tags (even those within the feed, if any).
    Hope this helps, nonetheless
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Apr 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Incredible, I swear I tried this to no avail before. Works like a charm! Thank you.

    Another question, why do I only see 3 stories, despite this code:

    HTML Code:
    <script type="text/javascript">
    //MAIN FUNCTION: rssdisplaybox("rssfeed_id", "rssbox_id", "rssbox_class")
    var cssdrivebox=new rssdisplaybox("cssdrive", "cssdriveid", "someclass")
    cssdrivebox.set_items_shown(5) //Fetch and display first x entries
    cssdrivebox.set_template("testtemplate") //Use "default" template, which outputs title + description + date
    cssdrivebox.start() //Required: start script
    </script>
    If I set it to 10, I get seven headlines.

    Any ideas? Thank you again!
    Last edited by tech_support; 04-21-2007 at 06:18 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •