Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

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
  #22  
Old 10-09-2001, 09:44 AM
padd padd is offline
 
Join Date: Jan 2002
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah a version for 2.0.3 would be great please
Reply With Quote
  #23  
Old 10-14-2001, 03:58 AM
Chris Stewart Chris Stewart is offline
 
Join Date: Nov 2001
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could someone post the whole modded fuctions.php doc for us newbies?
Reply With Quote
  #24  
Old 10-14-2001, 04:17 AM
Freddie Bingham's Avatar
Freddie Bingham Freddie Bingham is offline
 
Join Date: Oct 2001
Posts: 506
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can not post source code.
Reply With Quote
  #25  
Old 10-14-2001, 04:20 AM
Chris Stewart Chris Stewart is offline
 
Join Date: Nov 2001
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could you email me the page or send it over PM or something? All my info is in my profile. I would do it myself but for some reason my whole fuctions.php (and others) file is all thrown together. It's not laid out all nice and neat.

Email is Fool1515@mediaone.net
Reply With Quote
  #26  
Old 10-16-2001, 04:47 AM
Heineken77 Heineken77 is offline
 
Join Date: Jul 2002
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by bira
If you change $countposts=1 to $countposts=0 then there is no way on earth that the post count will change
LMFAO .. sorry ... but I found this VERY amusing ehehheehehe

Thanks bro
Reply With Quote
  #27  
Old 10-23-2001, 10:11 PM
almighty one
Guest
 
Posts: n/a
Default

come on someone must have worked this out please post how i hate to revert my functions template back to older version to use this
Reply With Quote
  #28  
Old 10-24-2001, 05:54 AM
Heineken77 Heineken77 is offline
 
Join Date: Jul 2002
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've been waiting for a definitive answer myself
Reply With Quote
  #29  
Old 10-27-2001, 01:58 AM
defweb defweb is offline
 
Join Date: Nov 2001
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

need a definitive answer for version 2.03 still
Reply With Quote
  #30  
Old 11-08-2001, 12:34 AM
Matt's Avatar
Matt Matt is offline
 
Join Date: Oct 2001
Location: UK
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

HELP!!!!!!!

I tried this and it totally mucked my boards post counts up. Can someone please say what I need to do for the latest version of Vbulletin???
Reply With Quote
  #31  
Old 11-23-2001, 09:47 AM
ToraTora! ToraTora! is offline
 
Join Date: Nov 2001
Posts: 255
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

First of all, there are many ways of doing this hack, and tubedogs hack, for no decrease in the posting numbers is the best way that I can think of. There are other ways, but to be honest, the way I combined my idea, with tubedog's works just fine.

I will not support this for anybody, because i realize this hack has already received its share of complaints, so keep in mind these simple rules, before taking my advice.

1) Tubedog had origionally created this hack. I'm just adding on to it.

2) all changes, are user responsibility. Backup your functions.php file, and if there are errors, than either figure them out on your own, or go back to your old backed up script, because support is something that I truely tried to provide early on in this game, however, most people are here on a take it and run basis, so I provide this information, on the same premise.

3) Do not Pm me, aol me, icq me, yahoo me, or email me concerning the price of cheese on this hack. respond to this thread if you would like any type of support, which as earlier written, sparse if any.

4) Its a simple hack, so for God's sake read what is written, and all will be ok.

Here are the changes.

you will find these script lines in your functions.php script(functions.php is found in your admin folder)

Find on line 1837, (or around there) to start in the correct area of the needed changes:

PHP Code:
// ###################### Start delete thread ####################### 
a few lines down, on line 1866, (or around there), you will find this line:
PHP Code:
 if (is_array($userpostcount)) {
      while(list(
$postuserid,$subtract)=each($userpostcount)) {
        
$DB_site->query("UPDATE user SET posts=posts$subtract WHERE userid='$postuserid'");
      }
    } 
you can do one of two things.

1) completely take the script out, which is what i did

2) comment out the script such as below.

PHP Code:
 //if (is_array($userpostcount)) {
 // while(list($postuserid,$subtract)=each($userpostcount)) {
 //$DB_site->query("UPDATE user SET posts=posts$subtract WHERE userid='$postuserid'");
  //    }
    //} 
either way, the script will not execute.




Secondly, Thanks to Tubedog, make these modifications.
(the line numbers, and some variables may of changed, but the basic principle remains).

Find on line 1886 (or around there) this line, to start in the correct area of the needed changes:

PHP Code:
// ###################### Start delete post ####################### 
than, a little bit further down, on line 1892 (or around there) find:

PHP Code:

// decrement user post count
  
if ($postinfo=getpostinfo($postid)) {
    if (
$countposts) {
    
$DB_site->query("UPDATE user SET posts=posts-1 WHERE userid='$postinfo[userid]'");
    } 
and than comment it out as shown below.

PHP Code:

// decrement user post count
  
if ($postinfo=getpostinfo($postid)) {
    
//if ($countposts) {
    //$DB_site->query("UPDATE user SET posts=posts-1 WHERE userid='$postinfo[userid]'");
    //} 



NOTE!!!: i did not comment out:
PHP Code:
if ($postinfo=getpostinfo($postid)) { 
If you comment this line out, you will receive this error:
PHP Code:

Parse error
parse error in /home/blah/public_html/blah/blah/admin/functions.php on line 1907 
so do NOT comment out the line described above.





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 12:39 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.04789 seconds
  • Memory Usage 2,324KB
  • 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
  • (8)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
  • (10)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