![]() |
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: |
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. |
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?
|
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.
|
Quote:
That won't work, the hook it far above the location in the file I want to edit. |
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. |
All times are GMT. The time now is 08:51 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|