Recent Topics

1 Nov 29, 2006 01:03    

I have been using a script to display an Adsense at the bottom of the first post on each page.... and it now throws up an "Notice: Undefined variable: shown_advert" error that wasn't there in 1.8.5
the skin specific _main.php script is..

<?php
    if ( ! $shown_advert )
    {
?>
<p class="money">
<script type="text/javascript"><!--
google_ad_client = "pub-6882102320194673"; google_ad_width = 468; google_ad_height = 60; google_ad_format = "468x60_as"; google_color_border = "EFF2EA"; google_color_bg = "EFF2EA"; google_color_link = "DD9955"; google_color_url = "556655"; google_color_text = "556655"; //--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></p>

<?php
      $shown_advert = 1;
    }
 } // ---------------------------------- END OF POSTS ------------------------------------ ?>

Is there a quick fix for this?

On a related undefined variable, I also got one for the Credits script in the footer, which had changed from $sponsored_links to $credit_links.

2 Nov 29, 2006 08:04

<?php
    if ( empty( $shown_advert) || ! $shown_advert )
    {
?>

¥


Form is loading...