Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 12-26-2000 Last Update: Never Installs: 0
 
No support by the author.

We have a "Chit Chat" forum on our boards where users can post anything. The problem is that some of our users complain because others get very high post counts by making useless posts to the Chit Chat forum. I'd really appreciate it if someone could tell me how to make the user post counts not go up in a specific forum.

Thanks

Show Your Support

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

Comments
  #2  
Old 12-26-2000, 11:52 AM
Guest
 
Posts: n/a
Default

Sure this is pretty easy to do. Just open up "newreply.php" and change the following code:

Code:
$DB_site->query("UPDATE user SET posts=posts+1,$dotitle"."lastpost=".time()." WHERE userid=$userid");
And replace it with this:
Code:
// Change the number 1 below to the forum you don't want posts to count in
if ($threadinfo[forumid]==1) {
$DB_site->query("UPDATE user SET posts=posts,$dotitle"."lastpost=".time()." WHERE userid=$userid"); 
} else {
$DB_site->query("UPDATE user SET posts=posts+1,$dotitle"."lastpost=".time()." WHERE userid=$userid"); 
}
And that should do it.

-Chris
Reply With Quote
  #3  
Old 12-26-2000, 11:57 AM
Guest
 
Posts: n/a
Default

look just what i have been looking for as well

what if you want to specify 2 or more forums ?
Reply With Quote
  #4  
Old 12-26-2000, 12:06 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by eva2000
what if you want to specify 2 or more forums ?
Then just change that first line and add an 'or' for each forum you want to exclude:
Code:
if ($threadinfo[forumid]==1 or $threadinfo[forumid]==2) {
Reply With Quote
  #5  
Old 12-26-2000, 12:26 PM
Guest
 
Posts: n/a
Default

Well thanks for the quick reply! It works great but I have a problem. What about new threads? I did the same change for the newthread.php but my post count increased when I posted a new thread. I'll be very happy if you could find a solution for the new threads.

Thanks
Reply With Quote
  #6  
Old 12-26-2000, 12:47 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by DoST
What about new threads?
Sorry about the oversight there, yes you should be able to make the same change to newthread.php as you did in newreply.php, the code for incrementing the post count is the same in both. I'm not sure why it still changed your post count, but you might want to empty your browser's cache file and try it again?
Reply With Quote
  #7  
Old 12-26-2000, 04:42 PM
Guest
 
Posts: n/a
Default

It doesn't work for me. Maybe someone else who tried can tell if it works or not?
Reply With Quote
  #8  
Old 12-26-2000, 07:33 PM
Guest
 
Posts: n/a
Default

I did it a little differently.

In the Forum table I added a column called countposts

countposts smallint(6) default 1

Then using SQL queries I set them forums I wanted to ignore in the post count to zero.

update forum set countposts=0 where forumid=XX

newthread.php
Look for:
Code:
$foruminfo=$DB_site->query_first("SELECT
change to:
Code:
$foruminfo=$DB_site->query_first("SELECT countposts,
Leave the rest of the line alone.

Under that line add:
Code:
$countposts=$foruminfo[countposts];
Then look for:
Code:
        $DB_site->query("UPDATE user SET posts=posts+1,$dotitle"."lastpost=".time()." WHERE userid=$userid");
Change to:
Code:
        //Wayne Luke 11/01/2000
        //Exclude certain forums from post counts
        if ($countposts) {
          $DB_site->query("UPDATE user SET posts=posts+1,$dotitle"."lastpost=".time()." WHERE userid=$userid");
        } else {
        $DB_site->query("UPDATE user SET posts=posts,$dotitle"."lastpost=".time()." WHERE userid=$userid"); 
        }
        // End Modification.
newreply.php
Look for:
Code:
  $foruminfo=$DB_site->query_first("SELECT
Change to:
Code:
  $foruminfo=$DB_site->query_first("SELECT countposts,
Leave the rest of the line as it is.

Look for:
Code:
          $DB_site->query("UPDATE user SET posts=posts+1,$dotitle"."lastpost=".time()." WHERE userid=$userid");
Change to:
Code:
        //Wayne Luke 11/01/2000
        //Exclude certain forums from post counts
        if ($countposts) {
          $DB_site->query("UPDATE user SET posts=posts+1,$dotitle"."lastpost=".time()." WHERE userid=$userid");
        } else {
        $DB_site->query("UPDATE user SET posts=posts,$dotitle"."lastpost=".time()." WHERE userid=$userid"); 
        }
        // End Modification
THen if I want to exclude another forum in the future, I can just set the countposts column = 0 for that forum without touching the code.


[Edited by wluke on 12-26-2000 at 04:39 PM]
Reply With Quote
  #9  
Old 01-01-2001, 10:27 PM
Guest
 
Posts: n/a
Default

Thanks, I think I will include this on my site.
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:03 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.04148 seconds
  • Memory Usage 2,260KB
  • Queries Executed 22 (?)
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
  • (12)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)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
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete