MyBB Community Forums

Full Version: Add ads inside the first post only
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
URL: http://nosforum.com

MyBB Version: 1.6.8

I am trying to add advertisement into my posts and have managed it by adding my ad codes into my template's postbit. (template > postbit > postbit)

<span id="edited_by_{$post['pid']}">{$post['editedmsg']}</span>


				<div class="post_body" id="pid_{$post['pid']}">
{myadvertisements[zone_4]}
<br><br>
<div style="float: right">{myadvertisements[zone_5]}</div>
<div style="float: left">{myadvertisements[zone_7]}</div>
					{$post['message']}
				</div>
				{$post['attachments']}
				{$post['signature']}

Now I am trying to add this code ONLY into the first post.

{myadvertisements[zone_4]}
<br><br>
<div style="float: right">{myadvertisements[zone_5]}</div>
<div style="float: left">{myadvertisements[zone_7]}</div>

Since the postad.php and advertisement in posts plugins do not work anymore since I have updated to 1.6.8 from 1.6.4, I want to do it manually. Can anyone help?
I'm asking the same question:
How to add this code only into the first post? I can't do that...
You can use the plugin of Zinga Burga "PHP in Templates" and paste this code in postbit "<if $post['pid'] == $thread['firstpost'] then>Ads Code Here</if>" Smile

I use it and it works Smile
I used it and it didn't work.
telling me any other way to add adsense code inside first post would be appreciated..
(2012-08-21, 01:27 PM)Michael94 Wrote: [ -> ]You could use this plugin.
http://mods.mybb.com/view/advertisement-in-posts
This pluig has didn't work...