Crop the end of RSS Title & the beginning of the Summary?

Status
Not open for further replies.

Mole

Member
I have managed to get my Facebook Status updates RSS feed on a site I'm working on,
Latest News

The Title and the Summary are currently displaying as the same thing.

What I want to do is edit the PHP file so each RSS item title is cropped after a certain number of words and the summary text then begins from where the title has stopped.

Is this possible? Thanks

Here is the PHP file:
PHP:
<?php  defined('C5_EXECUTE') or die(_("Access Denied.")); ?>

<div id="rssSummaryList<?php echo intval($bID)?>" class="rssSummaryList">

<?php  if( strlen($title)>0 ){ ?>
    <div class="rssSummaryListTitle"><?php echo $title?></div>
<?php  } ?>

<?php  
$rssObj=$controller;
$textHelper = Loader::helper("text"); 

if (!$dateFormat) {
    $dateFormat = t('F jS');
}

if( strlen($errorMsg)>0 ){
    echo $errorMsg;
}else{

    foreach($posts as $itemNumber=>$item) { 
    
        if( intval($itemNumber) >= intval($rssObj->itemsToDisplay) ) break;
        ?>
        
        <div class="rssItem">
            <div class="rssItemTitle"> 
                <a href="<?php echo  $item->get_permalink(); ?>" <?php  if($rssObj->launchInNewWindow) echo 'target="_blank"' ?> >
                    <?php echo  $item->get_title(); ?>
                </a>
            </div>
            <div class="rssItemDate"><?php echo  $item->get_date($dateFormat); ?></div>
            <div class="rssItemSummary">
                <?php 
                if( $rssObj->showSummary ){
                    echo $textHelper->shortText( strip_tags($item->get_description()) );
                }
                ?>
            </div>
        </div>
    
<?php   }  
}
?>
</div>
 
Status
Not open for further replies.
Award-winning Mac antivirus and Internet security software
Top