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

Reply
 
Thread Tools
Posting in specific forums you specify deducts or adds to post count Details »»
Posting in specific forums you specify deducts or adds to post count
Version: 1.00, by Erwin Erwin is offline
Developer Last Online: May 2013 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 01-08-2004 Last Update: Never Installs: 5
 
No support by the author.

Posting in specific forums you specify deducts or adds to post count

This is a fairly simple hack, but it can be useful for certain forums. Feel free to expand or modify this to suit your forums.


How to use:

1) If you have a spam forum, you may want to deduct 1 from the post count each time a member posts there.
2) If you have a special forum, you may want to add more than 1 to the post count each time a member posts there.
3) Any combination of the above.


Installation:

In includes/functions_newpost.php:

Find:

PHP Code:
            $doposts 'posts = posts + 1,'
Replace with:

PHP Code:
if ($foruminfo['forumid']==66 OR $foruminfo['forumid']==67
{
            
$doposts 'posts = posts - 1,';
} else {
            
$doposts 'posts = posts + 1,';

Just change 66 and 67 to your spam forumids, remove or add forumid's as needed.

Change -1 to +2 or +5 if you want to ADD to the member's post count for whatever reason. Play around with the code - this hack is meant to be customized in many ways for your forum.

Show Your Support

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

Comments
  #12  
Old 02-08-2005, 10:45 PM
lazytown lazytown is offline
 
Join Date: Feb 2004
Posts: 503
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there any way to make this work with the rebuild options? So it can apply retroactively? I wanted something that would have fractional post counts for off-topic forums, etc. But it can still be done with whole numbers by just multiplying everything.

-V
Reply With Quote
  #13  
Old 02-09-2005, 12:40 AM
oldfan's Avatar
oldfan oldfan is offline
 
Join Date: Jul 2004
Posts: 813
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry but I'm confussed...
I have a spam forum, #20
to remove a 1 from they're post count I have to...

if ($foruminfo['forumid']==20)
{
$doposts = 'posts = posts - 1,';

??
thanks
Reply With Quote
  #14  
Old 02-10-2005, 04:11 AM
oldfan's Avatar
oldfan oldfan is offline
 
Join Date: Jul 2004
Posts: 813
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump
Reply With Quote
  #15  
Old 02-10-2005, 09:49 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by oldfan
Sorry but I'm confussed...
I have a spam forum, #20
to remove a 1 from they're post count I have to...

if ($foruminfo['forumid']==20)
{
$doposts = 'posts = posts - 1,';

??
thanks
Correct, except you forgot a } at the end.
Reply With Quote
  #16  
Old 02-10-2005, 11:02 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How well does vB handle negative posts counts ?
Reply With Quote
  #17  
Old 02-10-2005, 03:01 PM
oldfan's Avatar
oldfan oldfan is offline
 
Join Date: Jul 2004
Posts: 813
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Doesn't seem to do anything :/ on 3.06
Reply With Quote
  #18  
Old 02-11-2005, 01:15 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by oldfan
Doesn't seem to do anything :/ on 3.06
I'll check when I find time to see if the code in 3.0.6 has changed.
Reply With Quote
  #19  
Old 02-12-2005, 11:28 AM
oldfan's Avatar
oldfan oldfan is offline
 
Join Date: Jul 2004
Posts: 813
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Erwin
I'll check when I find time to see if the code in 3.0.6 has changed.
thank you
Just so you know, when I installed it..
The post count didn't change when I posted in ANY forum.
Reply With Quote
  #20  
Old 02-17-2005, 02:54 PM
ZombieAndy's Avatar
ZombieAndy ZombieAndy is offline
 
Join Date: Oct 2004
Location: UK
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by oldfan
thank you
Just so you know, when I installed it..
The post count didn't change when I posted in ANY forum.
can this be based on a userID or usergroup rather than forumID? and is there a way it can be set in the admin cp?
Reply With Quote
  #21  
Old 02-17-2005, 09:43 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by YodaTheCoda
can this be based on a userID or usergroup rather than forumID? and is there a way it can be set in the admin cp?
I'll modify this hack to do this via the Admin CP. Wait for it...
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 06:37 PM.


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.05530 seconds
  • Memory Usage 2,311KB
  • 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
  • (2)bbcode_php
  • (5)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
  • (2)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