Another solution has both your ideas: adding an if on every field of commedit so we can do it with an only panel
For deleting more than one comments you could add a checkbox in comments list and a button with delete signed.
You're going to delete these xxx comments. Yes, I'm sure or No, take me back to the panel
function ondeletebl($data=null) {
global $fpdb;
$params=array('id'=>$_POST['entry'], 'fullparse'=>true);
$qid=$fpdb->query($params);
if(!isset($_POST['commdelete']) || @count($_POST['commdelete'])==0) {
$this->smarty->assign('success', -2);
return 0;
}
$query=&$fpdb->queries[$qid];
$query->prepare();
$query->localcache[$params['id']]=entry_parse($params['id']);
$intersect=array_intersect(array_keys($_POST['commdelete']), $query->comments->list);
$query->comments=new FPDB_CommentList($_POST['entry'], $intersect);
$query->localcache[$params['id']]['comments']=$query->comments;
$query->params->comments=false;
$this->smarty->assign('warnings', 'You are going to delte xxx comments.');
return 0;
}
It works for now, but it's a bit hackish :-)
EDIT: Here's the complete work for multiple comments: http://www.mediafire.com/?5n4b195hzopt9dn but it wants also my old work because of delete links and messages.
The patch for single comments deleting is at http://www.mediafire.com/?2tnyu45bveqrejg but it seems that the link does not work now.
However it has an error on lang.admin.entry.php, I've commented wrong, so it has to be so:
$lang['admin']['entry']['commedit']['msgs'] =
array(
1 => 'Comment has been edited',
-1 => 'An error occurred while trying to edit the comment',
);
Without the /* at the beginning and */ at the end. It looks like you're new here. If you want to get involved, click one of these buttons!