View Full Version : Post trimming does not decrease post count... v2.2.0
SharkY-GA
11-11-2001, 02:41 AM
I know tubedog made it for 2.0.x but could someone do this for v2.2.x?
tubedogs:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=12420
I just cant find it...
almightyone
11-15-2001, 02:22 AM
^bump^
Barret
11-15-2001, 02:12 PM
I don`t think anyone knows how to do this yet.
If you ask me, this should have been an option on the board "Vbb" to
delete posts with prune or not to.
Unfortunately, it was not. :(
squawell
11-15-2001, 02:34 PM
ok~~i already do it!!
find admin/functions
$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]"]--;
}
}
to this
$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]"]--;
//}
//}
i already test on vbb220 and it's work!!
Barret
11-17-2001, 12:00 AM
Well thank you so very much man!
That did the trick for sure!
Great work and thanks again!!
squawell
11-17-2001, 01:16 AM
Originally posted by Barret
Well thank you so very much man!
That did the trick for sure!
Great work and thanks again!!
ur welcome~
i'm happy it work to u
almightyone
11-17-2001, 02:37 AM
well i juts did this hack and it doesnt reduce on thread deletion but if i delete an individual post in a thread it drops count i posted a thread then a reply i deleted the reply it lowered by 1 i deleted the thread it didnt :confused:
squawell
11-17-2001, 04:16 AM
that should be two parts~~
i only fixed one part make it can work on 203 and 220
another part u find out early post u'll find
SharkY-GA
11-17-2001, 10:19 AM
Originally posted by almightyone
well i juts did this hack and it doesnt reduce on thread deletion but if i delete an individual post in a thread it drops count i posted a thread then a reply i deleted the reply it lowered by 1 i deleted the thread it didnt :confused:
This is because their seperate peices of code... I have this done... I will post it tommorow...
CoolaShacka
12-06-2001, 12:18 PM
Originally posted by SharkY-GA (11-17-01 01:19 PM)
This is because their seperate peices of code... I have this done... I will post it tommorow...
*gg* ;)
KuraFire
12-06-2001, 06:25 PM
I thought the prune posts option that comes with vB itself did the trick already??
JTMON
12-06-2001, 09:50 PM
Up until 2.2.0 you could do a mass prune and it wouldn't drop the postcount. Now it does, as does deletion of single posts/threads
KuraFire
12-07-2001, 12:05 PM
Originally posted by JTMON
Up until 2.2.0 you could do a mass prune and it wouldn't drop the postcount. Now it does, as does deletion of single posts/threads
That is quite sucky. Why did they change that?? Mass Prune should *always* not drop postcounts!
It was fine the way it worked, now why change it then??? :confused:
:(
JTMON
12-07-2001, 08:59 PM
Originally posted by KuraFire
That is quite sucky. Why did they change that?? Mass Prune should *always* not drop postcounts!
It was fine the way it worked, now why change it then??? :confused:
:(
My thoughts exactly. So now, you have to use a Non Jelsoft supported HACK to accomplish this :rolleyes:
So, does anyone have a complete hack for this that will work for v 2.2.1? OR is that what Squawell posted up top?
squawell
01-05-2002, 04:42 AM
this can do well with 221 look below:
open admin/functions.php find:
// ###################### 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:
// ###################### 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:
// ###################### 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:
// ###################### 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~~
Originally posted by squawell
this can do well with 221 look below:
... ... ... ... ... ... ... ... ... ... ... ... ... ...
i do this in my forum and it's work~~
Thank you, Squawell! I will install this right away. :)
squawell
01-05-2002, 02:32 PM
Rose ur welcome ~~ :D :D :D
Umm, that didn't seem to work. I got errors when I tried to access my board, then the cp. But, I may have had server interference at the same time so I'll try again tomorrow. :s Evil servers!
Psychdrone
01-20-2002, 02:31 AM
damn I tried this and it dosn't work??
I really need this too!!
:(
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.