Results 1 to 7 of 7

Thread: RSS Display Box Question

  1. #1
    Join Date
    Aug 2008
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy RSS Display Box Question

    Script URL: http://www.dynamicdrive.com/dynamici...rssdisplaybox/

    I've setup the RSS Display Box successfully somewhat. It's showing my feeds, etc. but it appears that it's indenting the title of each feed and I can't figure out why. I've looked through the CSS and the outputbody.php file and see nothing that would cause the indent. Here is the content of my outputbody.php file since I've seen people ask for that in other threads I've searched for trying to find this answer. Thanks in advance for any help.

    Code:
    <?
    //Function for ouputting the body of each RSS item displayed (inside loop)- DynamicDrive.com
    //For syntax pf bpdu, see: http://simplepie.org/docs/installation/from-scratch/ and http://simplepie.org/docs/reference/
    //Function by default defines 3 different body outputs (templates). Modify or add additional templates as desired
    
    
    function outputbody($item, $template=""){
    if ($template=="" || $template=="default"){ //DEFAULT TEMPLATE
    	?>
    	<DIV class="rsscontainer">
    	<div class="rsstitle"><a href="<?php echo $item->get_permalink(); ?>"><?php echo $item->get_title(); ?></a></div>
    	<div class="rssdate"><?php echo $item->get_date('d M Y g:i a'); ?></div>
    	<div class="rssdescription"><?php echo $item->get_description(); ?></div>
    	</DIV>
    	<?
    } //end default template
    else if ($template=="titles"){ //"TITLES" TEMPLATE
    	?>
    	<DIV class="rsscontainer">
    	<div class="rsstitle"><a href="<?php echo $item->get_permalink(); ?>" target="_new"><?php echo $item->get_title(); ?></a></div> 
    	<div>Category: <?php echo $item->get_category(); ?></div>
    	</DIV>
    	<?
    } //end titles template
    else if ($template=="titlesdates"){ //"TITLESDATES" TEMPLATE
    	?>
    	<DIV class="rsscontainer">
    	<span class="rsstitle"><a href="<?php echo $item->get_permalink(); ?>"><?php echo $item->get_title(); ?></a></span> 
    	<span class="rssdate"><?php echo $item->get_date('m/d/y g:i a'); ?></span>
    	</DIV>
    	<?
    } //end titlesdates template
    else if ($template=="mytemplatename"){ //"mytemplatename" TEMPLATE
    	?>
    	//DEFINE ADDITIONAL CUSTOM TEMPLATE(s) USING SAME LOGIC STRUCTURE AS ABOVE
    	//For syntax of template body, see SimplePie docs: http://simplepie.org/docs/installation/from-scratch/ and http://simplepie.org/docs/reference/
    	<?
    }
    
    
    
    
    else
    die ("No template exists with such name!");
    } //Closing function bracket
    ?>

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

    Default

    The indenting could be coming from the formatting done within the RSS feed content itself (which you have no control over). To be sure, please post a link to the page on your site that contains the problematic script so we can check it out.
    DD Admin

  3. #3
    Join Date
    Aug 2008
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well it's doing it on all the feeds and they aren't all from the same website. Three are from one site and two are from another but here they are.

    NOTE: The obituaries one might be blank if there are no new ones.

    http://www.newtoniowa.com/ndnnews.php
    http://www.newtoniowa.com/ndnobit.php
    http://www.newtoniowa.com/kcci.php
    http://www.newtoniowa.com/kccisports.php
    http://www.newtoniowa.com/kccinational.php

  4. #4
    Join Date
    Aug 2008
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Any ideas? My client keeps asking about this indent issue and I have no answer to give. I've checked everything I can think of for anything that would cause it. Again the feeds are not all from the same place.

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

    Default

    Hmm, looking at the raw output of one of your feeds: http://www.newtoniowa.com/rssbox/main.php?id=ndnnews, there is no alignment issue with the titles. This tells me there's something within the CSS of the final page that's causing those extra indents. I can't tell what it is yet, but in the meantime, you can forcibly fix this by editing rssdisplaybox.css with the following lines in red:
    Code:
    .rsscontainer .rsstitle{ /*Style for .rsstitle DIV*/
    font-weight: normal;
    text-align: left;
    position: relative;
    left: -5px;
    }
    DD Admin

  6. #6
    Join Date
    Aug 2008
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ddadmin you ROCK! That did fix the indent issue. Wish I knew what was causing the problem in the first place though. Appreciate all your help!

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

    Default

    It has to be something on your main page itself, since as mentioned, looking at your raw output, there's no indentation that I can see.
    DD Admin

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
  •