Saturday, June 16, 2012

How to place adsense in SMF post

This is guide that would teach you how to place adsense code below first post in each topic on SMF to increase your earnings. Google Adsense is the best approach when it comes to getting steady income from your Forum.

placing adsense in smf post

Here are the steps below.

1. Log Into Your Control panel (i mean where your files are hosted not the admin panel)

2. Navigate and click on the Themes Folder .

3. Then Click on Default folder.

4. Then click and Edit your Display.template.php file.

After you’ve opened that section, Locate this code (press Ctrl+F then type the code)

<div id="msg_', $message['id'], '">',$message['body'], '</div>

After you’v found that, then replace the entire code with this:

<div id="msg_', $message['id'], '"', '>';if ($message['id'] == $context['first_message'])echo '<div style="float:right; width:270px;"><script type="text/javascript"><!--google_ad_client = "pub-xxxxxxxxxxxxxxx";/* 250x250, created 9/07/11 myforum post ads */google_ad_slot = "xxxxxxxxxxxx";google_ad_width = 250;google_ad_height = 250;//--></script><script type="text/javascript"src=""></script></div>';echo '', $message['body'], '</div>

Then save your file.
Remember to change the "pub-xxxxxxxxxxxxxxx ” to your publisher ID on adsense.

And that's it. View your SMF forum's full site. And all topics first post would have adsense embeded.


Post a Comment

Post a Comment