The Arcive of vBulletin Modifications Site. |
|
Off-Topic Post Counter for Posts in Specified Forum(s) Details »»
|
|||||||||||||||||||||||||||
|
Off-Topic Post Counter for Posts in Specified Forum(s)
Developer Last Online: Aug 2021
PHP Code:
What does this hack do? Adds a new Post Counter, for off-topic posts. It enables you to define a Forum (or Forums) as 'Off-Topic Forums'. Any posts made by users in that Forum are not added to the Post count, they are added to the Off-Topic Post count instead. As a bonus, OT posting won't be rewarded with promotions or points or anything linked to $bbuserinfo[posts]. Queries to run: One Files to edit: One Templates to edit: One (postbit or postbit_legacy). ########################### SQL EDITS START ############################### Run this query: (change user to yourtableprefix_user if you use a table prefix). [sql] ALTER TABLE `user` ADD `otposts` INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL; [/sql] ############################# SQL EDITS DONE ############################### ############################ FILE EDITS START ############################## In includes/functions_newpost.php Find: PHP Code:
PHP Code:
############################ FILE EDITS DONE ############################### ############################ TEMPLATE EDITS START ########################## In postbit (or postbit_legacy) find: HTML Code:
$vbphrase[posts]: $post[posts]</div>
HTML Code:
<div class="smallfont" name="Off-Topic Posts">OT Posts: $post[otposts]</div> And you are done. Rejoice! Updates: 0850 1 April 2005 (GMT+12): Added name attribute to div tag for mouseover explanation. 1800 7 April 2005: Dan's AdminCP Update Offtopic Counter Addon: https://vborg.vbsupport.ru/showpost....2&postcount=14 Show Your Support
|
|||||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
Installed!
|
|
#3
|
|||
|
|||
|
screeny at cruiselineforums.com
|
|
#4
|
|||
|
|||
|
cn this be setup so if we have a one section any posts in there (well threads as post are not needed) can be added up ?
|
|
#5
|
||||
|
||||
|
Quote:
|
|
#6
|
|||
|
|||
|
is fine m8 it was way i worded it.
Does this work on posts only - would prefer one that actually worked on threads so if i had a section for posting say pics etc evertime someone made a thread in that section it would increase the counter by 1,but people replying to the same thread would`nt get an increase as its based on threads only. |
|
#7
|
||||
|
||||
|
Ahh, right.
Well, as vB is by default, I believe that this hack would achieve what you want. (ie: as far as the $postcount variable is concerned, it increases regardless of whether it was a reply or a post.) Therefore, new replies OR new threads in the specified OT forum would not add to Post count, but would add to OT Post count. That's why I called it 'OT Posts Hack' and not 'OT new replies Hack'.
|
|
#8
|
|||
|
|||
|
you need to add an update counters thing for it. else it'll only apply to posts made after the hack is installed.
|
|
#9
|
||||
|
||||
|
Quote:
If *you* want to make an Update Counters thing for it, go ahead. I can't find where it is I claim that it works retrospectively anywhere in this thread, so I don't 'need to add' anything. |
|
#10
|
|||
|
|||
|
Quote:
i think it should be easy to do thou, just copy the update posts code and change this query: PHP Code:
PHP Code:
$gotforums = ''; to $gotforums = '1,2,3'; where 1,2 and 3 are the forum ids of the forums you wish to count |
![]() |
|
|