Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 02 Aug 2019, 01:30
ice9 ice9 is offline
 
Join Date: Jun 2003
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.
Reply With Quote
  #2  
Old 02 Aug 2019, 14:11
scottkoz20 scottkoz20 is offline
 
Join Date: Jan 2016
Real name: Scott
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


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


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
Reply With Quote
  #3  
Old 09 Aug 2019, 16:22
ice9 ice9 is offline
 
Join Date: Jun 2003
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:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Let me know if that looks good.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 15:13.

Layout Options | Width: Wide Color: