vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Post trimming does not decrease post count... v2.2.0 (https://vborg.vbsupport.ru/showthread.php?t=32321)

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

Quote:

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

Quote:

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:

Rose 01-05-2002 02:47 AM

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:
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~~

Rose 01-05-2002 01:48 PM

Quote:

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

Rose 01-05-2002 07:21 PM

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!!

:(


All times are GMT. The time now is 04:36 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01579 seconds
  • Memory Usage 1,754KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete