Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #21  
Old 12-27-2004, 01:39 AM
dcarr dcarr is offline
 
Join Date: Dec 2004
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, in your admin or mod cp in Threads and posts section is a drop down for prune. There are many options to isolate the threads. Often I just choose the appropriate forum, and then click prune threads...this brings up a separate window where you can view each and decide what to prune and what to keep
Reply With Quote
  #22  
Old 12-27-2004, 01:57 AM
Michael Morris's Avatar
Michael Morris Michael Morris is offline
 
Join Date: Nov 2003
Location: Knoxville TN
Posts: 774
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The counters are maintained in the ./includes/functions_databuild.php library. That's the file where you'll find the query (or one similar to it) Colin mentioned.
Reply With Quote
  #23  
Old 12-30-2004, 06:08 PM
snake-boy snake-boy is offline
 
Join Date: Jul 2004
Location: Bangkok
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd have to second this request for this hack. In fact I can't believe nobody has addressed this before. If I had a clue about php I'd do it myself.

I have the exact same problem in that I have to move all threads to a separate forum that users cannot see. The key issue here is SPACE. The thousands of posts that have accumulated there occupy more space then all my other forums combined! I want to be able to flush out that forum (ie HARD delete all those posts), but NOT impact on users post counts.

Once a post has been made, the act of posting has been acomplished, thus +1 to the post count. The physical removal of the 'evidence' of the posting should not have anything to do with the post count.

What amazes me is some feel so strongly that post counts should be -1 when a post is hard deleted, yet they feel that soft-delete is fine. It's no different from the users point of view, he has still committed the 'act of posting' weather his post is later hard deleted OR soft deleted, so why should his post count be effected be either?

I'd really appreciate it if someone would take a look at a hack that could acomplish this. I would really appreciate it. It will put this descision in the hands of the admin, where it belongs.

Many thanks

-snake
Reply With Quote
  #24  
Old 12-30-2004, 07:15 PM
dcarr dcarr is offline
 
Join Date: Dec 2004
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well if you do move them to a separate forum, then you can prune that entire forum and no post counts will be affected.
Reply With Quote
  #25  
Old 01-04-2006, 02:33 AM
KOKS@LN KOKS@LN is offline
 
Join Date: Dec 2005
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm using vB 3.5.2 but i tried to find a solution for you...
I think your problem can be solved if you remove the underlying code from includes/functions_databuild.php
It works, but i'm not sure whether it affects other things or not, because i also don't know php...

PHP Code:
if (!empty($userbyuserid) AND $threadinfo['visible'] == 1)
    { 
// if the thread is moderated the posts have already been reduced
        
$userbypostcount = array();
        foreach (
$userbyuserid AS $postuserid => $postcount)
        {
            
$alluserids .= ",$postuserid";
            
$userbypostcount["$postcount"] .= ",$postuserid";
        }
        foreach(
$userbypostcount AS $postcount => $userids)
        {
            
$casesql .= " WHEN userid IN (0$userids) AND posts > $postcount THEN 

posts - 
$postcount\n";
        }

        
// postcounts are already negative, so we don't want to do -(-1)
        
$vbulletin->db->query_write("
            UPDATE " 
TABLE_PREFIX ."user SET
                posts = CASE 
$casesql ELSE 0 END
            WHERE userid IN (0
$alluserids)
        "
);
    } 
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:17 PM.


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.12088 seconds
  • Memory Usage 2,209KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete