Results 1 to 6 of 6

Thread: Script stretching out feeds.

  1. #1
    Join Date
    May 2011
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Script stretching out feeds.

    1) Script Title:
    RSS Display Boxes
    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...ybox/index.htm
    3) Describe problem:

    Hello, all. I'll probably sound stupid for post this but here it goes.. I'm having an issues with getting a feed I'm pulling to format properly. It gets very spread out vs example on the script page above. Is this issue with my blog/rss feed or is this something I could fix using rssdisplaybox? The link below shows what is happening.

    http://www.neotoonami.com/demo.htm

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    You can take a peek at the output of each of your retrieved RSS feed by navigating to:

    http://www.neotoonami.com/rssbox/main.php?id=rssid

    replacing rssid with the ID of the RSS feed in question. To view the first feed's output then, navigate to:

    http://www.neotoonami.com/rssbox/main.php?id=cssdrive

    As you can see if you view source, there are some <p> tags in the description elements. I suspect that's what's causing the spacing between entries.
    DD Admin

  3. #3
    Join Date
    May 2011
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Sorry, for such taking such a long time to reply. Thank you for all your help. Last question is it possible to take out the <p> tags with the script or would that be done on the feed/sever side? (I'm currently exploring that option as well).

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    I would say it's probably more elegant to do this on the server side, such as by going into outputbody.php and massaging the output of the descriptions to your liking:

    Code:
    <?php echo $item->get_description(); ?>
    DD Admin

  5. The Following User Says Thank You to ddadmin For This Useful Post:

    Sharks (05-29-2011)

  6. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I had taken a look at this one earlier and thought it would be best to actually get the feed itself to be in the desired format:

    Quote Originally Posted by Sharks View Post
    . . . done on the feed/sever side?
    So assuming you have control over the feed server, yes to that.

    However, adding this style:

    Code:
    .rsscontainer p {
    margin: 0px;
    }
    to the stylesheet will eliminate much of the extra blank lines.

    ddadmin's idea could work too. I think strip_tags:

    http://us2.php.net/manual/en/function.strip-tags.php

    might do the trick. It lets you allow certain other tags you want to remain (I think div would be the only one you'd need to allow, not sure though). Something like:

    PHP Code:
    <?php echo strip_tags($item->get_description(), '<div>'); ?>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Sharks (05-29-2011)

  8. #6
    Join Date
    May 2011
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Cool thank you for all your help guys. I will definitely be happy to use your guys scripts anytime.

    For my issue I actually resolved in a semi-round about fashion.. I was pulling a .rss2 feed from wordpress which was causing the said <p> tags to appear because wordpress is dumb like that. I then pulled just a .rss feed this worked minus font/color was wrong. This however was a easy fix by applying some css formatting to the output of dynamic box.

    So sorry for taking so much of your time I hope my resolution helps more people out there who are fighting with wordpress lol.

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
  •