Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Details »»

Version: , by tubedogg tubedogg is offline
Developer Last Online: Dec 2016 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 03-26-2001 Last Update: Never Installs: 45
 
No support by the author.

Someone mentioned this in the other forum (I think it was Castel). It's hardly a hack, as it consists of commenting out 3 lines, but here's how to do it:

In functions.php (in the /admin directory) find
Code:
// ###################### Start delete thread #######################
It should be around line 1450, somewhere in there. Now, a few lines below that, find
Code:
			if ($countposts) {
				$DB_site->query("UPDATE user SET posts=posts-1 WHERE userid='$post[userid]'");
			}
and replace it with
Code:
//			if ($countposts) {
//				$DB_site->query("UPDATE user SET posts=posts-1 WHERE userid='$post[userid]'");
//			}
Then, a few lines below that, find
Code:
// ###################### Start delete post #######################
A few lines below that, find
Code:
		if ($countposts) {
			$DB_site->query("UPDATE user SET posts=posts-1 WHERE userid='$postinfo[userid]'");
		}
and replace it with
Code:
//		if ($countposts) {
//			$DB_site->query("UPDATE user SET posts=posts-1 WHERE userid='$postinfo[userid]'");
//		}
Now when you prune (or a post is deleted) the users' post count won't decrease.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 01-06-2002, 06:09 PM
WebMasterAJ WebMasterAJ is offline
 
Join Date: Oct 2001
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bringing this hack back, I am using 2.2.0 and when I install the hack, and go to Prune... I tell it to prune 50 days (had the board since Sept) and it comes up with nothing. It doesn't display one post...

However, when I delete threads/posts individually, users keep their post count... so it works on an "individual basis"...

Any ideas?

Thanks...

Andrew Tatum
Reply With Quote
  #33  
Old 02-16-2002, 09:26 PM
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Posts: 557
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excuse the intrusion, probably in a wrong place, but nobody answered here

I have the opposite problem: when a mod moves a post/thread from a forum with $countposts=1 to another with $countposts=0 (for example the RecycleBin or a chit-chat area which doesn't count against the membership awards given by post-counter), that number is not decreased.
Infact in postings.php, action move, nowhere is any instruction to decrease the counter (or check if necessary) like it is in the delete thread/post sections.
I don't agree with this policy, but that isn't the problem: infact, if I do a complete post recount, unpredictably this user count remains the same, even that user post is ONLY into the $countposts=0 forum....

What's up ?
Thanks

P.S.: I would like very much to bugfix the 'move' code to do this check, but can't figure how...
Reply With Quote
  #34  
Old 02-17-2002, 05:40 AM
ToraTora! ToraTora! is offline
 
Join Date: Nov 2001
Posts: 255
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you guys should really read this thread from beginning to end. Alot of your questions are answered within it.
Reply With Quote
  #35  
Old 02-17-2002, 08:17 AM
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Posts: 557
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by ToraTora!
you guys should really read this thread from beginning to end. Alot of your questions are answered within it.
Are you sure ? Have you carefully read mine ? :china:
Thnx
Reply With Quote
  #36  
Old 03-25-2002, 07:40 AM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes this is updated.. I remeber the old one that was made *memories*.. but the code has changed. So here it is in living color.

I thought this would be usefull since a few people have asked about it.

##### In admin/function.php find ( around line 1967) #####
PHP Code:
    if (is_array($userpostcount)) {
      while(list(
$postuserid,$subtract)=each($userpostcount)) {
        
$DB_site->query("UPDATE user SET posts=posts$subtract WHERE userid='$postuserid'");
      }
    } 
### and replace with ###
PHP Code:
//    if (is_array($userpostcount)) {
//      while(list($postuserid,$subtract)=each($userpostcount)) {
//        $DB_site->query("UPDATE user SET posts=posts$subtract WHERE userid='$postuserid'");
//      }
//    } 
##########

##### now shortly under it find ( around line 1996 ) #####
PHP Code:
    if ($countposts) {
      
$DB_site->query("UPDATE user SET posts=posts-1 WHERE userid='$postinfo[userid]'");
    } 
### and replace with ###
PHP Code:
//    if ($countposts) {
//      $DB_site->query("UPDATE user SET posts=posts-1 WHERE userid='$postinfo[userid]'");
//    } 
##########

Enjoy.
Reply With Quote
  #37  
Old 03-25-2002, 07:48 AM
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Posts: 557
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just an add: WHAT ABOUT moved threads ?
I saw the post count of each user isn't updated when I move a thread from a forum (with countposts=1) to another (with countposts=0) ... ???

I also put a message in bugfix section of vb.com, but it doesn't seem being recognized as a bug...

How could I recount posts -ONLY- for each members affected by a particular thread ?

Thanks
Reply With Quote
  #38  
Old 03-26-2002, 05:46 AM
ZiRu$'s Avatar
ZiRu$ ZiRu$ is offline
 
Join Date: Jan 2002
Location: Manitoba, Canada
Posts: 520
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

work perfectly on 2.2.4
Reply With Quote
  #39  
Old 03-26-2002, 07:57 AM
larryz larryz is offline
 
Join Date: Oct 2001
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Original Post:

https://vborg.vbsupport.ru/showthrea...threadid=34518
Reply With Quote
  #40  
Old 03-28-2002, 09:25 AM
jardragon901 jardragon901 is offline
 
Join Date: Nov 2001
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanx neo, works great .
Reply With Quote
  #41  
Old 04-04-2002, 07:03 PM
Zedd's Avatar
Zedd Zedd is offline
 
Join Date: Mar 2002
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thnax neo that worked easily and fast.
Reply With Quote
Reply

Thread Tools

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 09:42 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04656 seconds
  • Memory Usage 2,313KB
  • Queries Executed 25 (?)
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
  • (6)bbcode_code
  • (4)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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