View Full Version : 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..
Dismounted
02-11-2009, 05:17 AM
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).
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?
bananalive
02-11-2009, 02:11 PM
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
if ($foruminfo[forumid] == 23)
{
//post count -2 here
}
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..
Ted S
02-12-2009, 01:05 AM
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 1234408231 at 1234408231 ---------------
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
Dismounted
02-12-2009, 03:47 AM
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.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.