you should add 'AND thread.visible = 1' to the sql query, because posts still visible even the threads are soft deleted.
Code:
SELECT post.postid, post.pagetext, post.userid, post.username, post.visible,
post.dateline AS date, thread.forumid, thread.title as thread_title, thread.threadid,
forum.forumid, forum.title as forum_title
FROM " . TABLE_PREFIX . "post as post
LEFT JOIN " . TABLE_PREFIX . "thread as thread on (post.threadid = thread.threadid)
LEFT JOIN " . TABLE_PREFIX . "forum as forum on (thread.forumid = forum.forumid)
WHERE post.visible = 1 AND thread.visible = 1 AND $platest_and AND $platest_and_1
ORDER BY postid DESC
LIMIT $limit
thanks