i have a wordpress blog and want to give people the same user experience for adding comments that is in stackoverflow. There are a number of comments ajax plugins out there but i can't find a working one that allows you to inline on the main page, go in and add comments without first drilling down into a seperate single post page.
Can anyone help here with either a wordpress plugin or php code to do this.
I was never able to get AJAXed Wordpress to do what me (and apparently the questioner) want to do.
I use a custom solution that makes use of a plug-in called Inline Ajax Comments. I had a heck of a time finding a download link, but here's one that still works: http://kashou.net/files/inline-ajax-comments.zip
In WordPress' theme editor, I edit index.html. After the following:
<?php the_content(''); ?>
I add (after enabling the plug-in of course):
<?php ajax_comments_link(); ?>
<?php ajax_comments_div(); ?>
I then edited the plugin PHP file itself. I commented out blocks of code as follows:
if ($comment_count == '1') {
echo('<span id="show-inline-comments-'. $id .'"> ');
/* echo('<a href="javascript:;" id="show-inline-comments-link-'. $id .'" onmouseup="ajaxShowComments('. $id .', \''. $throbberURL .'\', \''. $commentpageURL .'\'); return false;">show comment »</a>');
*/
echo('</span>');
echo('<span id="hide-inline-comments-'. $id .'" style="display: none;"> ');
/* echo('<a href="#comments-'. $id .'" onmouseup="ajaxHideComments('. $id .', \''. $throbberURL .'\', \''. $commentpageURL .'\'); return true;">« hide comment</a>');
*/
echo('</span>');
} else if ($comment_count > '1') {
echo('<span id="show-inline-comments-'. $id .'"> ');
/* echo('<a href="javascript:;" id="show-inline-comments-link-'. $id .'" onmouseup="ajaxShowComments('. $id .', \''. $throbberURL .'\', \''. $commentpageURL .'\'); return false;">show comments »</a>');
*/
echo('</span>');
echo('<span id="hide-inline-comments-'. $id .'" style="display: none;"> ');
/* echo('<a href="#comments-'. $id .'" onmouseup="ajaxHideComments('. $id .', \''. $throbberURL .'\', \''. $commentpageURL .'\'); return true;">« hide comments</a>');
*/
echo('</span>');
}
IIRC, that's all I had to do, but let me know if that doesn't work for you. I'm trying to reverse engineer my own solution since it seems to be exactly what you want to do as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With