Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-11-2009, 04:45 AM
k111 k111 is offline
 
Join Date: Nov 2008
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How hard is it to make posting in a specific board -1 postcount?

I thought this would be a simple request with a simple solution but I haven't been able to find anything even remotely related to this request.

There is one board that I would like to give negative postcounts when people post there.. how complicated is this to achieve?

Many thanks to anyone smart enough to know..
Reply With Quote
  #2  
Old 02-11-2009, 05:17 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not complicated at all if you know vBulletin confidently. Find the code that updates the post count (most likely in the Post Data Manager), and run a query to subtract 2 posts (remember that it will have already been incremented).
Reply With Quote
  #3  
Old 02-11-2009, 01:10 PM
k111 k111 is offline
 
Join Date: Nov 2008
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
Not complicated at all if you know vBulletin confidently. Find the code that updates the post count (most likely in the Post Data Manager), and run a query to subtract 2 posts (remember that it will have already been incremented).
I want this to happen only in one area, not the whole board.. wouldn't this do it to everything?
Reply With Quote
  #4  
Old 02-11-2009, 02:11 PM
bananalive bananalive is offline
 
Join Date: Oct 2007
Location: UK
Posts: 2,802
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by k111 View Post
I want this to happen only in one area, not the whole board.. wouldn't this do it to everything?
Not if you use php conditional, something along the lines

PHP Code:
if ($foruminfo[forumid] == 23)
{
//post count -2 here

Reply With Quote
  #5  
Old 02-11-2009, 11:26 PM
k111 k111 is offline
 
Join Date: Nov 2008
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks both of you for your help, sorry to be so ignorant but I'm not entirely sure where I should be inserting that code. I am crawling around in phpmyadmin looking for anything related to the 'Post Data Manager' and then templates.. I think it's just been a long day and I am maybe a bit fried but I failed to work out where that should go. :erm: Any ideas?

Sorry to be a pain, I promise I am a quick learner..
Reply With Quote
  #6  
Old 02-12-2009, 01:05 AM
Ted S Ted S is offline
 
Join Date: Dec 2003
Location: SoCal
Posts: 3,954
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

phpMyAdmin is a tool to edit mysql data once it is posted... You need to be looking at the php scripts that actually make the posts (part of vBulletin) and editing those.

Take a look at newpost.php and newreply.php and their required library scripts. It's somewhere in the middle.

--------------- Added [DATE]1234408231[/DATE] at [TIME]1234408231[/TIME] ---------------

Ok I decided to look for myself and while I didn't test I think I found it for you...

1. Open file includes/class_dm_threadpost.php
2. Go to line 614 and you'll see the posts going up

You can directly edit the code here or find a hook and build a plugin.

One way to do this is to disable posts from counting in that forum and then copy the if statement on line 614 and change it to check for the right forum ID and then adjust the query to be posts - 1.

Have fun
Reply With Quote
  #7  
Old 02-12-2009, 03:47 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by k111 View Post
Thanks both of you for your help, sorry to be so ignorant but I'm not entirely sure where I should be inserting that code. I am crawling around in phpmyadmin looking for anything related to the 'Post Data Manager' and then templates.. I think it's just been a long day and I am maybe a bit fried but I failed to work out where that should go. :erm: Any ideas?

Sorry to be a pain, I promise I am a quick learner..
If you do not have some sort of PHP proficiency, it will be difficult for you to do this.
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:30 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.02056 seconds
  • Memory Usage 2,220KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete