Announcement

Collapse
No announcement yet.

Google Adsense Problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Google Adsense Problem

    I'm using Google Adsense in my forums now, I put the ads in the postbit_legacy template, at the end of every thread, but I have a problem, when I post something using the quick reply box, I get a blank page and can't refresh the page :S

    This is the code I'm using
    Code:
    <!-- Start Google AdSense -->
    <if condition="$post['islastshown']">
    <div style="padding:$stylevar[cellpadding]px 0px 0px 0px">
    <table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="1" border="0" width="100%" align="center">
    <tr>
        <td class="alt2">
    <center>
    <table width="100%" height="80" border="0">
      <tr>
        <td width="20%"><div align="center">
    	Marquesina Con Top 10 Aca [despues edito xD]
        </div></td>
        <td width="80%"><div align="center">
        <script type="text/javascript"><!--
        google_ad_client = "pub-xxxxxxx";
        google_ad_width = 468;
        google_ad_height = 60;
        google_ad_format = "468x60_as";
        google_ad_type = "text_image";
        google_ad_channel = "";
        google_color_border = "000000";
        google_color_bg = "242f37";
        google_color_link = "FFFFFF";
        google_color_text = "CCCCCC";
        google_color_url = "FFFFFF";
        //--></script>
        <script type="text/javascript"
        src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
        </script>
        </div></td>
      </tr>
    </table>
    </div>
    </center>
        </td>
    </tr>
    </table> 
    </if>
    <!-- End Google AdSense -->
    Any idea?
    Last edited by Skavenger; Tue 12 Feb '08, 6:18pm.

  • #2
    A couple of tweaks, and it works perfectly.

    First, delete that code from your postbit legacy template. It interferes with the AJAX for the Quick Reply which is why you are having problems.

    Then, open your showthread template.

    Find
    Code:
    <div id="posts">$postbits<div id="lastpost"></div></div>
    
    
    <!-- start content table -->
    $spacer_open
    <!-- / start content table -->
    Add After
    Code:
    <!-- Start Google AdSense -->
    <div style="padding:$stylevar[cellpadding]px 0px 0px 0px">
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="1" border="0" width="100%" align="center">
    <tr>
        <td class="alt2">
    <center>
    <table width="100%" height="80" border="0">
      <tr>
        <td width="20%"><div align="center">
        Marquesina Con Top 10 Aca [despues edito xD]
        </div></td>
        <td width="80%"><div align="center">
        <script type="text/javascript"><!--
        google_ad_client = "pub-8473163217242949";
        google_ad_width = 468;
        google_ad_height = 60;
        google_ad_format = "468x60_as";
        google_ad_type = "text_image";
        google_ad_channel = "";
        google_color_border = "000000";
        google_color_bg = "242f37";
        google_color_link = "FFFFFF";
        google_color_text = "CCCCCC";
        google_color_url = "FFFFFF";
        //--></script>
        <script type="text/javascript"
        src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
        </script>
        </div></td>
      </tr>
    </table>
    </div>
    </center>
        </td>
    </tr>
    </table> 
    
    <!-- End Google AdSense -->

    Comment


    • #3
      Now I understand, the problem was with the AJAX
      I added a <br /> at the end, before <!-- End Google AdSense -->
      Thank you, it's working fine now =)

      Comment


      • #4
        I had this issue also, so I moved my adsense code to the showthread template and that seems to have cured the issue.

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X