![]() |
How do I include $threadinfo in the headinclude template?
What do I need to do to include $threadinfo['replycount'] in my headinclude template?
I'm running header bidding, and I want to only include calls to certain ads if there are 0 replies, 1 reply, or more than 1 reply. Currently, inserting $threadinfo['replycount'] in my headinclude template doesn't return anything. |
what is this going to do for you?
Would it be beneficial to look at having dynamic slots based on the number of posts using plug-ins? This would allow you to have multiple slots... I have mine after post 3, 5, 7 and the last post of the page (default is 10 per page). hook location - postbit_display_complete Code:
global $ids; I'm sure someone that is better than me can probably array the $ids for the posts to have 1 plug in as opposed to multiples.... credit to MarkFL for helping me initially with mine. Scott |
I think I'll be able to do this all in the SHOWTHREAD template. With header bidding, you need to first make a bidding call in the header, for every ad that will be shown on the page. So, for example, if a thread has 0 responses, you shouldn't make header calls for ads that show after post #2.
I believe the modulo operation in a conditional statement can do this best, at the top of SHOWTHREAD. So, since I show ads in the 1st and 2nd posts on a page (post #1, post #2, post #11, post #12, etc.), it will look something like this: Code:
<vb:if condition="$thread['replycount'] % $perpage == 0"> |
All times are GMT. The time now is 07:12 PM. |
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:
|