vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Prune doesn't reduce user post count (https://vborg.vbsupport.ru/showthread.php?t=12420)

padd 10-09-2001 09:44 AM

Yeah a version for 2.0.3 would be great please

Chris Stewart 10-14-2001 03:58 AM

Could someone post the whole modded fuctions.php doc for us newbies?:D

Freddie Bingham 10-14-2001 04:17 AM

You can not post source code.

Chris Stewart 10-14-2001 04:20 AM

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

Heineken77 10-16-2001 04:47 AM

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

almighty one 10-23-2001 10:11 PM

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

Heineken77 10-24-2001 05:54 AM

I've been waiting for a definitive answer myself :(

defweb 10-27-2001 01:58 AM

need a definitive answer for version 2.03 still

Matt 11-08-2001 12:34 AM

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

ToraTora! 11-23-2001 09:47 AM

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.





:)


All times are GMT. The time now is 06:14 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.01276 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
  • (8)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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