this can do well with 221 look below:
open admin/functions.php find:
PHP Code:
// ###################### Start delete thread #######################
function deletethread($threadid,$countposts=1) {
global $DB_site;
// decrement users post counts
if ($threadinfo=getthreadinfo($threadid)) {
$postids="";
$attachmentids="";
$posts=$DB_site->query("SELECT userid,attachmentid,postid FROM post WHERE threadid='$threadid'");
while ($post=$DB_site->fetch_array($posts)) {
if ($countposts) {
if (!isset($userpostcount["$post[userid]"])) {
$userpostcount["$post[userid]"] = -1;
} else {
$userpostcount["$post[userid]"]--;
}
}
replace with this:
PHP Code:
// ###################### Start delete thread #######################
function deletethread($threadid,$countposts=1) {
global $DB_site;
// decrement users post counts
if ($threadinfo=getthreadinfo($threadid)) {
$postids="";
$attachmentids="";
$posts=$DB_site->query("SELECT userid,attachmentid,postid FROM post WHERE threadid='$threadid'");
while ($post=$DB_site->fetch_array($posts)) {
// if ($countposts) {
// if (!isset($userpostcount["$post[userid]"])) {
// $userpostcount["$post[userid]"] = -1;
//} else {
//$userpostcount["$post[userid]"]--;
// }
// }
and find this:
PHP Code:
// ###################### Start delete post #######################
function deletepost($postid,$countposts=1,$threadid=0) {
global $DB_site;
// decrement user post count
if ($postinfo=getpostinfo($postid)) {
if ($countposts) {
$DB_site->query("UPDATE user SET posts=posts-1 WHERE userid='$postinfo[userid]'");
}
replace with this:
PHP Code:
// ###################### Start delete post #######################
function deletepost($postid,$countposts=1,$threadid=0) {
global $DB_site;
// decrement user post count
if ($postinfo=getpostinfo($postid)) {
// if ($countposts) {
// $DB_site->query("UPDATE user SET posts=posts-1 WHERE userid='$postinfo[userid]'");
//}
i do this in my forum and it's work~~