2 sam2kb Aug 14, 2008 17:09

I think that it should work :)
Ok, I've done almost the same thing with my RSS2 feed and it seems to work.
Actual changes made:
Your first change (line 108) made as suggested.
if( $feed_content == 'excerpt' )
becomes
if( $feed_content == 'excerpt' && !empty($Item->excerpt) )
On your second change I did it slightly differently. Mine was a few lines further down from 145 (think I'd made changes to this skin before). I'm sure your way would work fine too, I just wanted to make it more explicit for what I want it to do.
elseif( $feed_content == 'normal'
|| $feed_content == 'full' )
becomes
elseif( $feed_content == 'normal'
|| $feed_content == 'full'
|| ($feed_content == 'excerpt' && empty($Item->excerpt)) )
Also changed the setting in Blog Settings -> Features to Excerpt (now that it falls back instead of posting empty excerpts that's fine).
Result is at: http://www.everythingulster.com/blog/index.php?tempskin=_rss2
OK, sorry, that's not exactly what I wanted.
Because of the way the code's written (not a mistake/bug, just a consequence): if there's no excerpt that solution gives the full post, not the "standard" or "normal" or whatever its called where it stops at the "Read More" link.
To solve that find the 2 lines just below the second change that say:
if( $feed_content == 'normal' )
and change them both to
if( $feed_content == 'normal' || ($feed_content == 'excerpt' && empty($Item->excerpt)))
Your feed returned a error 500 right now!
<?php
$feed_content = ( empty( $Item->excerpt ) ? 'normal' : 'excerpt' );
?>
¥
Walter wrote:
Your feed returned a error 500 right now!
Works fine for me :\
¥åßßå wrote:
<?php $feed_content = ( empty( $Item->excerpt ) ? 'normal' : 'excerpt' ); ?>
¥
That would've made sense too, obviously! Where's the "D'oh!" smiley when you need it? Thanks!
No worries ;)
¥
You can edit rss or atom skin and add something like this
For example in rss2 skin edit the followig on line 108
and you should also edit lines 145,150 to just else
It's not tested, but should work ;)