Mind blowing SEO improving and Google rank increasing Signature Rotator SEO Tool.

Thread: 

MYBB show Adsense after first post?

Ads
banner
banner
banner
kickass Offline referral

Posts: 103
Joined: Apr 2014
Reputation: 1

#1
Member
Hello, I am trying to monetize my MYBB forum with Adsense ads and I want to show ads after on in the first post also I would like to show ads after lets say 5th and 10th post on each page. I am looking for template conditional not a plugin I have template conditionals plugin installed!
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#2
Support Team
To show Adsense after first post use this conditional:

PHP Code:
<if (($postcounter 1) % $mybb->settings['postsperpage'] == 0then>
//My Adsense code
</if> 

To show Adsense after lets say first and fifth post on each page then use this conditional:

PHP Code:
<if (($postcounter 1) % $mybb->settings['postsperpage'] == 0) || (($postcounter 5) % $mybb->settings['postsperpage'] == 0then>
//Adsense code goes here
</if> 

Remember that you have to add them to postbit template
Looking for ways to make money fast? Read this article and start earning money todya fast, easy or for free.
kickass Offline referral

Posts: 103
Joined: Apr 2014
Reputation: 1

#3
Member
Thanks again man works awesome.
bruno36 Offline referral

Posts: 1
Joined: Oct 2014
Reputation: 0

#4
Junior Member
(04-10-2014 01:56 PM)kickass Wrote:  Thanks again man works awesome.

Bonjour!
Should I put the code in postbit?
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#5
Support Team
(10-07-2014 11:15 AM)bruno36 Wrote:  Bonjour!
Should I put the code in postbit?

Yes this template conditional should be placed inside MYBB postbit template! The location of the Adsense ads depends on where you put the code!

Find:
PHP Code:
$post['message'

Put the code above to show Adsense before the post message and put it after to show Adsense after the post content.
Looking for ways to make money fast? Read this article and start earning money todya fast, easy or for free.
Guest referral

 

#6
Unregistered
(10-07-2014 04:15 PM)marcus_avrelius Wrote:  
(10-07-2014 11:15 AM)bruno36 Wrote:  Bonjour!
Should I put the code in postbit?

Yes this template conditional should be placed inside MYBB postbit template! The location of the Adsense ads depends on where you put the code!

Find:
PHP Code:
$post['message'

Put the code above to show Adsense before the post message and put it after to show Adsense after the post content.

I would like to display one advertising messages 1,5,10
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#7
Support Team
(10-07-2014 04:49 PM)Guest Wrote:  I would like to display one advertising messages 1,5,10

Use this on in the template:

PHP Code:
<if (($postcounter 1) % $mybb->settings['postsperpage'] == 0) || (($postcounter 5) % $mybb->settings['postsperpage'] == 0) || (($postcounter 10) % $mybb->settings['postsperpage'] == 0then>
//Adsense code goes here
</if> 

This will show Adsense code after 1th, 5th and 10th reply on each page!
Looking for ways to make money fast? Read this article and start earning money todya fast, easy or for free.





User(s) browsing this thread: 1 Guest(s)