![]() |
Question about using the template hooks
I was updating to the latest version and all went quickly as I have all code mods as plugins. But I still had to fix modded templates one by one. I noticed the template_hooks and thought I might be able to save myself some time in the future by using some of these. So I decided I could try this out on my postbit_legacy template where I have this code at the end to display an ad after the first post:
HTML Code:
<if condition="!$GLOBALS['FIRSTPOSTID']"> Code:
eval('$template_hook[postbit_end] .= " ' . fetch_template('custom_postbit_ad_at_end') . '";'); My problem is that it shows the ad after every post, not just the first. So I'm guessing that my conditional is coming up TRUE every time because $GLOBALS['FIRSTPOSTID'] is empty every time. Can somebody throw me a clue as to what I'm doing wrong? Is there a way to make this work? Seemed like it should be simple, but.... Thanks |
All times are GMT. The time now is 07:52 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:
|