How to Add MyBB Adsense to Your Forum, No Plugins

How to Add MyBB Adsense to Your Forum, No Plugins, 5.0 out of 5 based on 4 ratings

How to Add MyBB Adsense to Your Forum, No PluginsMyBB AdSense tutorial to add ads on your forum, no plugins needed.

MyBB AdSense is one of the best ways to earn money with your MyBB forum, especially on a forum with tons of pageviews. Not just Google AdSense, there’s also others such as adBrite, Chitika, Bidvertiser, etc. Adding the ad code for MyBB AdSense is actually very simple, no MyBB plugins needed for it. This tutorial will show you how to add MyBB AdSense code (or any ads) on your forum.

Step 1: Go to your AdSense account (or any ad provider you’re using) and grab the code. In this example I’m using Chitika, 728×90 Leaderboard format.

Step 2: Go into Admin CP > Templates & Style > Templates > (your default template). Here you’ll need to choose where you want your ads to display. For header ads, go into Header Templates > header.

Find:

      {$pm_notice}
      {$bannedwarning}
      {$bbclosedwarning}
      {$unreadreports}
      {$pending_joinrequests}
      <navigation>
      <br />

Below this, add the following code:

<div style="text-align: center;"></div>

Then insert your MyBB AdSense code just between this. It should look like this:

<div style="text-align: center;">YOUR MYBB ADSENSE OR ANY AD CODE GOES HERE</div>

Step 3: Save changes. Here’s a screenshot:

How to Add MyBB Adsense to Your Forum, No Plugins - HeaderThe MyBB AdSense ad code will be displayed on every page, centered in the header of the forum.

Want footer ads? Go into Footer Templates > footer.

Copy the whole MyBB AdSense code you added earlier, including the div tags and insert it on line 1 above everything else. Save changes, the result:

How to Add MyBB Adsense to Your Forum, No Plugins - FooterAnother method of adding MyBB AdSense code in your forum is displaying it for guests only, to do this go into Header Templates > header_welcomeblock_guest.

Find:

<span style="float: right;">{$lang->welcome_current_time}</span>
    <span id="quick_login">{$lang->welcome_guest} (<a href="{$mybb->settings['bburl']}/member.php?action=login" onclick="MyBB.quickLogin(); return false;">{$lang->welcome_login}</a> &mdash; <a href="{$mybb->settings['bburl']}/member.php?action=register">{$lang->welcome_register}</a>)</span>

Insert your MyBB AdSense code (including the div tags) just below this, your ads will now only be displayed for guests, but when they login, they’ll disappear.

These are the most common places of inserting MyBB AdSense ads, you can place them anywhere, in between posts, on member profiles, even in a sidebox using the sidebox code for skyscraper ad formats.

VN:F [1.9.20_1166]
Rate This post
Rating: 5.0/5 (4 votes cast)

6 thoughts on “How to Add MyBB Adsense to Your Forum, No Plugins

  1. Hi,

    Great tutorial. I have just added the code as you instructed and ti worked perfectly fine. Could you please tell me how to add the adsense to the both sides vertically? And ads after every posts in the thread ?

    Thanks a lot!

  2. I put the code in and wondered why it wouldnt work is it becasue my ads are image only? cause i notice the “text-align: center; part of your coding what coding do i put in for image only ads????

    • Also google adsense said i have a robots.txt file which is preventing me from showing ads? but i contacted my host and they said i dont have a robots.txt file????

    • For the code maybe try this:

      <div align=center>YOUR MYBB ADSENSE OR ANY AD CODE GOES HERE</div>

      For the other part, try creating a robots.txt file and add the following lines to it:

      User-agent: Mediapartners-Google*
      Disallow:

      Or:

      User-Agent: *
      Disallow:

      Either one will grant the Google Adsense bot permission to crawl through your site.

      • That didn’t work either tried both things with different ad sizes and types even tried doing text but still won’t work seems like i have tried everything :/

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Powered by Sweet Captcha
Verify your real existence,
Drag the dress to the hanger
  • captcha
  • captcha
  • captcha
  • captcha