2 daniel Aug 15, 2007 14:10

Would be great... because for now, I don´t know how to add params to feeds...
Well feeds are exactly the same as skins, just handled a tad different in the core.
If you can wait until I have a chance to code the "unsubscribe", I should be able to show you a pre-release email notification one ;)
¥
Yeah, that would let me put my time to other things. ;)
No worries, it gives me a reason to finish coding it :p
¥
I thought this would be easy, but it was not.
The url would be of the form:
/xmlsrv/rss2.comments.php?blog=5&p=1698
Right? No. This would display a RSS feed with the post content, not the post comments. Because in skins/_rss2/_lastcomments.php it reads (line 34):
$CommentList = & new CommentList( $blog, "'comment'", array('published'), '', '', 'DESC', '', 20 );
Easily fixable, I just have to add the post ID to the CommentList constructor (or whatever its name), i.e.:
$CommentList = & new CommentList( $blog, "'comment'", array('published'), $p, '', 'DESC', '', 20 );
I tried with:
global $p;
$CommentList = & new CommentList( $blog, "'comment'", array('published'), $p, '', 'DESC', '', 20 );
That doesn't work either.
It seems to me, the problem is around line 274 of inc/_blog_main.inc.php:
if( (!empty($p)) || (!empty($title)) || (!empty($preview)) )
{ // We are going to display a single post
$disp = 'single';
}
Where it is assumed that if $p (post_ID) is especified, we want to see the post content. It is not allowed to especify a post ID and display the comments.
Am I on the right track? Or perhaps I better wait for next version?
What we do to bypass that problem is add a $disp param, if there is a unknown disp lets say 'custom_comments' then the mainlist would not be loaded, then the plugin will create it's own mainlist for our skin just containing comments of the post id which is $p.
I've implemented this to the 2.0 version. Just need to set the funcion for the skin!
hmmm... is there a possibility for version 1.9.2 as well?
Ooops, I've been that busy I forgot to post a link to the [url=http://www.waffleson.co.uk/2007/08/16/omg_we_almost_have_a_new_plugin]pre_release version[/url] :-S
¥
Austriaco wrote:
I thought this would be easy, but it was not...........
I just had a play with this :-
crack open skins/_rss2/_main.php and make the following change
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
$disp = ( param( 'disp', 'string', '', false, true ) == 'comments' ? 'comments' : 'single' );
Then redo your change to /skins/_rss2/_lastcomments.php
$CommentList = & new CommentList( $blog, "'comment'", array('published'), $p, '', 'DESC', '', 20 );
¥
OK, a cleaned up version of post comments RSS is in 2.0.0.
YES... I´m interessted in this as well... have read now some best practise articles around the net how to make your blog better... and this was one of them... I searched through this forum... and sadly only found this request... there is currently no solution for this today?
Best Regards,
Daniel