MyBB Community Forums

Full Version: Pushing information in between the postbit?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Trying to do more with adverts.

I want to put an advert between the first and second post on each page in a thread.

I have all the logic there but not sure which hooks to use and how to actually insert the code.

I tried by putting

$post.='advert code';

$post['message'] .= 'Advert code';

But none of these seem to work. And I believe this would be putting the advert inside the first post.

How would I go about inserting in between the first and second post?

Dan
Oh I have also tried with

the postbit hook and showthread_start
I have a plugin to do this (Its paid) , im not sure if there is a free version out there. But heres the link to my version if you want to take a look.

http://www.mybbextras.com/showthread.php?tid=1151

[attachment=22293] [attachment=22294]
I'd say the easiest way to do this would be to add a variable to the bottom of the postbit template, use the postbit hook and set that variable to whatever you want.
Pretty sure the MyAdvertisements plugin will do this - http://community.mybb.com/thread-75833.html
MyAdvertisement seems to do mostly what I need. I draw my adverts from another table so I can manage them sitewide. So I will reverse engineer this.

Cheers
Dan