The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Looking to make a simple PHP include...
I want to include a PHP file ever 5 posts. I've been looking through the templates and reading how to do certain stuff on this board. What I believe I need to do is create a hook(?) and then have the code include the php. Is this correct?
To be more specific, I'd like to place the file after the 5th and 10th posts in a thread on each page of the thread, (so obviously it would be after post 5, 10, 20, 25, 35, 40, etc..) Anyone have some insight for me? A path to get me started on? I'm not new to programming, but I'm new to vB mods. Thanks, Matt |
#2
|
||||
|
||||
Firstly, I suggest having a look at the vBulletin Manual.
You could probably hook in at postbit_display_complete and use the variable "$post['postcount']" with modulus to add something after the fifth post, etc. |
#3
|
|||
|
|||
Thanks. I created a custom hook which allowed me to do what I wanted, but ran into a weird issue with it. I eventually modified the template instead and added a new variable in the code that pulls from an include file. So far, it works like a charm.
I went through the manual and noticed it was very sparse for information about programming plugins. Luckily, I'm not writing this plugin for the masses, just for one site... Thanks for your help. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|