Recent Topics

1 Feb 10, 2009 00:51    

My b2evolution Version: 2.x

I'm running version 2.4.6, I am testing a blog that will be used exclusively as a podcast channel. The RSS feeds work correctly in iTunes, but the <description> field contains the URL of the MP3 file the first part of the text (before the rest of the text in the post).

The result is that in iTunes, only the URL is visible in the description field instead of meaningful text.

I've looked at the code in the _rss2 and _atom themes to see how the RSS text is build. It looks like the content is coming from a statement:

$content = $Item->get_excerpt( 'entityencoded' );

but I'm not sure, and I don't know what side-effects changing this method might have.

There are several function calls involved, and I'm not at all familiar with the how any of it interacts. Any advice on how to proceed with rearranging the content of the description field?

2 Feb 10, 2009 09:10

Crack open /skins/_rss2/_index.main.php and meander down to line 163 (ish) and see if the comments help ;)

			<description><?php
				// URL link, if the post has one: (TODO: move below the text, because in summaries or podcasts it blows to have this on top)
				$Item->url_link( array(
						'before'        => '<p>',
						'after'         => '</p>',
						'format'        => 'entityencoded',
						'podcast'       => false,
					) );

¥

3 Feb 10, 2009 14:49

Thanks - that's what I was looking for. I was looking in the wrong part of the code - in the wrong file.

I added an if() statement to suppress adding the link to the top of the description for RSS feeds (both _atom and _rss2). It now does what I want.


if( $Item->ptyp_ID != 2000 ){
   $Item->url_link( array(
       'before'        Arrow '<p>',
       'after'         Arrow '</p>',
       'format'        Arrow 'entityencoded',
       'podcast'       Arrow false,
    ) ); 
}

bkg


Form is loading...