well, if you add the code from my first post here to the entry.php in P2, it does an ajax delete, that is, the page stays the same, and the post disappears and appears in the trash in the backend, but it appends that ugly trash string to the URL. I haven’t found how to do this with comments yet, I expect it has something to do with line 190 in functions.php
<span class="meta"><?php comment_time(); ?> <?php _e( 'on', 'p2' ); ?> <?php comment_date(); ?> <span class="actions"><a href="#comment-<?php comment_ID( ); ?>"><?php _e( 'Permalink', 'p2' ); ?></a><?php echo comment_reply_link(array( 'depth' => $depth, 'max_depth' => $args['max_depth'], 'before' => ' | ' )); ?><?php edit_comment_link( __( 'Edit' , 'p2' ), ' | ','' ); ?></span><br /></span>
or maybe line 319
<span class="meta">
$date_time
<span class="actions"><a href="$permalink">$permalink_text</a> $reply_link $edit_link</span>
</span>
Either way, the ajax that controls the comment editing function could be copied/pasted/and altered to allow for deletion,…it think. That appears to be around line 645 in p2.js
case "comment" :
var thisCommentEditArea;
$(element).hover( removeYellow, removeYellow );
if (inlineEditComments != 0 && isUserLoggedIn) {
thisCommentEditArea = $(element).find('div.comment-edit').eq(0);
$(element).find('a.comment-edit-link:first').click( function() {
thisCommentEditArea.trigger('edit');
return false;
});
thisCommentEditArea.editable(ajaxUrl, {event: 'edit', loadurl: ajaxUrl + '&action=get_comment&_inline_edit=' + nonce,
id: 'comment_ID', name: 'comment_content', type : 'autogrow', cssclass: 'textedit', rows: '3',
indicator : '<img src="' + templateDir +'/i/indicator.gif">', loadtext: eetxt.loading, cancel: eetxt.cancel,
submit : eetxt.save, tooltip : '', width: '90%', onblur: 'ignore',
submitdata: {action:'save_comment',_inline_edit: nonce}});
but I’m not well-versed enough to know exactly how to alter this to allow for true front-end ajax deletion. Perhaps someone with more knowledge can give us some direction. Until then, it’s going to be a lot of trial and error for me until i can get it to work. When I do, I’ll be sure to post my solution, though it probably won’t be the best. ?? Keep me posted as to whether you find an acceptable solution. Thanks.