PDA

View Full Version : rssdisplaybox - Removing Thumbnails?



zhariken
04-20-2007, 03:25 PM
1) Script Title: rssdisplaybox

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex18/rssdisplaybox/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
//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

thetestingsite
04-21-2007, 04:02 AM
On this line, add the part in red.



$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

zhariken
04-21-2007, 05:14 AM
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:


<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! :)