Recent Topics

1 Feb 06, 2009 13:23    

Hi

When 'no feed' is selected for a particular blog, b2evo correctly provides no feeds if the rss or atom urls are accessed. However, the skins are unaware that 'no feed' has been selected and still displays the auto discovery links. Below is the solution from the support forum:

In your skin replace:

<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php $Blog->disp( 'rss2_url', 'raw' ) ?>" />
<link rel="alternate" type="application/atom+xml" title="Atom" href="<?php $Blog->disp( 'atom_url', 'raw' ) ?>" />

with :

<?php $feed_content = $Blog->get_setting('feed_content'); 
	if( $feed_content != 'none' ) { ?>
		<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php $Blog->disp( 'rss2_url', 'raw' ) ?>" />
		<link rel="alternate" type="application/atom+xml" title="Atom" href="<?php $Blog->disp( 'atom_url', 'raw' ) ?>" />
	<?php } ?>

Cheers
Lee

2 Feb 07, 2009 15:44

Fixed in 3.x thanks ;)

¥

3 Feb 07, 2009 16:11

Wow, excellent :D

Thanks

4 Feb 09, 2009 19:52

Might make more sense to have a method in the Blog class like "get_feed_headlines()" and just use that in the skins (with "echo"/"implode").
The logic, if (and which) lines should get returned, would be done there.
This would also provide a more central place to add other feed formats later.

5 Feb 11, 2009 11:31

Makes sense to me ;)

¥


Form is loading...