I've gotten two e-mails asking me how I "integrated" the ads into the forums, so here's how:
1. I added the following to main.tpl below the footer:
<pun_include "_google.php">
2. I then created a new PHP script called _google.php (the underscore is just there so I don't include it in a release by mistake or something stupid like that). The script contains this code:
<?php
switch ($pun_user['style'])
{
case 'Cobalt':
$bg_color = '2A2A2A';
$link_color = '60A0DC';
$text_color = 'D4D4D4';
break;
case 'Mercury':
$bg_color = '2A2A2A';
$link_color = 'F6B620';
$text_color = 'D4D4D4';
break;
case 'Radium':
$bg_color = '2A2A2A';
$link_color = '60C860';
$text_color = 'D4D4D4';
break;
case 'Sulfur':
$bg_color = 'FFFFFF';
$link_color = '822100';
$text_color = '333333';
break;
case 'Lithium':
$bg_color = 'FFFFFF';
$link_color = '638137';
$text_color = '333333';
break;
default:
$bg_color = 'FFFFFF';
$link_color = '005CB1';
$text_color = '333333';
break;
}
?>
<div style="TEXT-ALIGN: center">
<script type="text/javascript">
<!--
google_ad_client = "pub-5038618221283072";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_channel ="";
google_ad_type = "text";
google_color_border = "<?php echo $bg_color ?>";
google_color_bg = "<?php echo $bg_color ?>";
google_color_link = "<?php echo $link_color ?>";
google_color_url = "<?php echo $link_color ?>";
google_color_text = "<?php echo $text_color ?>";
google_alternate_color = "<?php echo $bg_color ?>";
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>
Not very pretty, but it works
"Programming is like sex: one mistake and you have to support it for the rest of your life."