• Welcome to Simple Machines Community Forum. Please login or sign up.

Advice: Another How-to Place for Adsense (Above 'unread posts')

Started by Aes-Sedai, April 17, 2007, 08:04:55 PM

Previous topic - Next topic


Some users, as always might not want to exactly see the ads Adsense displays, and will never click on them either.

This will put the Adsense code above the place where it says 'show unread posts since last visit' etc. Which also, for us newbies, is a collapsable area where everyone can just collapse the area when they don't want to see ads.

To give them this choice, go to index.template.php:


// If the user is logged in, display stuff like their name, new messages, etc.

Add After:
// Begin Adsense on Index.
echo '
<table width="100%" cellpadding="5" cellspacing="0" style="table-layout: fixed;" class="">

<td valign="top" width="100%" height="100%">
<div style="overflow: auto; width: 100%;" align="center">

[color=purple]Adsense Code[/color]

<script type="text/javascript"

// End of Adsense on Index.

It's the same HTML layout for Adsense that Nite0859 used, just in a different place where users can collapse it. Most credit to Nite0859 and his thread: http://www.simplemachines.org/community/index.php?action=post;topic=153647.15;num_replies=22, all I did was put it in a different place.