The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
How would I implement this code hack as a plugin
In my file includes/class_dm_threadpost.php I wrapped an IF statement around the post count incrementor.
I made if so post counts are not incremented if the thread has certain text in the title. PHP Code:
Thanks :up: |
#2
|
||||
|
||||
1. (optional) Create a new product in the admincp (allows you to export import and link the plugins / templates /phrases)
2. Create a new plugin. Select the product and select a hook location. In the vb file your editing,... see if there is a hook (hook is in the name of the function) somewhere above the spot you edit. 3. Sit back and enjoy a beer. |
#3
|
||||
|
||||
The hook location is far above the code I want to edit. So would I need to duplicate all that extra code in the plugin?
|
#4
|
||||
|
||||
No... dont do that. Just add the code you posted above in the plugin and use the hook you found to see if it works.
|
#5
|
||||
|
||||
Quote:
That won't work, the hook it far above the location in the file I want to edit. |
#6
|
|||
|
|||
Instead of NOT incrementing the post count, since the hook is above where you made your edit:
Have the plugin subtract 1 from the post count if your conditions are true, then when it adds to the post count, it will seem as though it has not changed. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|