How to Add MyBB Adsense to Your Forum

By | December 14, 2013
How to Add MyBB Adsense to Your Forum, No Plugins

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.

      <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.


<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']}
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 for members



Leave a Reply