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

MyBB monetize Portal and ForumDisplay threadslist with Adsense ads plugin!

make money online
marcus_avrelius Offline referral

Posts: 2,507
Joined: May 2013
Reputation: 109

Support Team
Hello ladies it's been a while since the last time I posted a tutorial on MYBB open source forum script/software.

Now this time I will teach you how to add Adsense or any type of advertising ads to portal and forumdisplay threadslist template specifically the ads will be showing after the first thread/announcement or after some X amount of them it's totally up to you.

To achieve that we will need a plugin that I will include in here and you would also need to have a plugin called "template conditionals" already installed!

Now it's very important for the website start to generate some income as this will make it better because the more money the webmaster makes the more of it will be invested into the development of new tools and features which would make the site better and better it's not all about getting rich is about making it better!

So lets get started!

Here is the plugin simply copy the code into your PHP editor and then save it as monetization.php then upload it to ./inc/plugins directory then activate it from MYBB admin panel.

PHP Code:

"Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");


    return array(
"name" => "Adsense in portal and forumdisplay threadlist",
"description" => "Shows adsense ads after x posts needs template conditional",
"website" => "http:// letsforum.com",
"author" => " letsforum",
"authorsite" => "http:// letsforum.com",
"version" => "1.0",
"compatibility" => "16*"

if (!isset(
$monetizationcounter)) {
$monetizationcounter 0;

Now here is where the magic will happen!

We would need to use these template conditionals in our templates!

For portal_announcement:
PHP Code:
<if ($monetizationcounter Xthen><else>
ad code

For forumdisplay_thread:
PHP Code:
<if ($monetizationcounter X) % $mybb->settings['threadsperpage'] == "0" then>
ad code

Replace the X with the value that will represent the number of posts after which the code will show.

Have fun and don't forget to share and love me Smile

Google this topic

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