PDA

View Full Version : RSS Display Box: Mashup and Hiding Images



bistromath
09-10-2008, 11:18 PM
1) Script Title: RSS Display Box

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

3) Describe problem: I've run across a couple of problems, hopefully someone can point me in the right direction. I want the Display Box to display the rss description, but not the images that come with it. I know there's a way to hide the images that come with a feed, but I can't manage to do this and keep the verbal description. Also, I'm trying to get my box to display a mashup of two different feeds (from two different sources) at the same time, but now I'm not so sure that I can do that.

Any help would be appreciated as always.

ddadmin
09-11-2008, 05:59 PM
Regarding hiding any images within the displayed contents, the easiest way would be to use CSS. When you invoke a RSS feed, such as:


<script type="text/javascript">
var showbbc=new rssdisplaybox("bbc", "bbcid", "someclass")
showbbc.set_items_shown(10) //show 10 entries from feed
showbbc.start() //Required: start script
</script>

The two calues in red are the ID and CSS class name of the content container. You can use CSS to hide any images inside that container:


<style type="text/css">
.someclass img{
display:none;
}
</style>


Also, I'm trying to get my box to display a mashup of two different feeds (from two different sources) at the same time, but now I'm not so sure that I can do that.

There's no easy way to do this right now unfortunately. gAjax RSS feed Displayer (http://www.dynamicdrive.com/dynamicindex18/gajaxrssdisplayer.htm) supports this.

bistromath
09-11-2008, 11:17 PM
Thanks for the response, and the link. The reason I wanted to get rid of the images is because each article that has an image also has the description cut off.

So I got rid of the images, but the articles that had them still don't show up correctly, so it must be something else. Articles that don't come with images display fine. I fixed the issue with display: inline; in most browsers, but it didn't take in IE. Has anyone else had this issue?

ddadmin
09-12-2008, 01:34 AM
Try viewing the .rss or .xml file directly in your browser (just enter the full URL to it in the browser) to see the full HTML for each description of each feed. That might give you some clues as to why even disabling images still throws off its formatting.

bistromath
09-12-2008, 03:44 AM
I viewed the .xml file like you said, and still couldn't find what's causing the issue. In case this might help, here is the feed:

http://www.msnbc.msn.com/id/4602460/device/rss/rss.xml

I'm addressing the description text in the css by using the p tag in the div that the text appears in, although I've tried using .someclass and the ID as well, no luck. I had a bit of progress though; I disabled a overflow:hidden; and it stopped the text from getting prematurely cut off. Now it just scampers all the way off the page. I just can't seem to get the text to wrap in IE7. I have a IE7 specific style sheet set up, can I use that somehow?

Also, I was checking out the gAjax feed displayer, and it looks good, but I don't see any examples with pagination. Can I get pagination for this reader as well?

bistromath
09-13-2008, 12:48 AM
I got it figured out, there was a funky text indent that the previous developer implemented, hidden in the wrong section of the six mile long style sheet. Thanks for the patience.