Announcement

Collapse
No announcement yet.

Google adsense in php

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

  • [vB4] Google adsense in php

    Right now if you go to www.worldslargestforum.com/forum/
    If you look quickly it will load all the html only (words only) on the webpage and then after 2 seconds the page reloads properly in php format with proper images etc. This has been happening ever since I inserted google adsense code (in headinclude template)

    Am i putting adsense code in a wrong template?
    headinclude template

    Code:
    <meta http-equiv="Content-Type" content="text/html; charset={vb:stylevar charset}" />
    <meta id="e_vb_meta_bburl" name="vb_meta_bburl" content="{vb:raw vboptions.bburl}" />
    <base href="{vb:raw basepath}" /><!--[if IE]></base><![endif]-->
    <meta name="generator" content="vBulletin {vb:raw vboptions.templateversion}" />
    
    <adleft>
    <script type="text/javascript"><!--
    google_ad_client = "pub-9500407150183558";
    /* 120x600, created 4/17/11 */
    google_ad_slot = "6225220725";
    google_ad_width = 120;
    google_ad_height = 600;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    </adleft>
    
    <adright>
    <script type="text/javascript"><!--
    google_ad_client = "pub-9500407150183558";
    /* 120x600, created 4/17/11 */
    google_ad_slot = "4085140157";
    google_ad_width = 120;
    google_ad_height = 600;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    </adright>
    in my additional.css template

    Code:
    adright
    {
    position:fixed;
    right:0px;
    top:152px;
    }
    
    adleft
    {
    position:fixed;
    left:0px;
    top:152px;
    }
    define('DISABLE_HOOKS', true);
    Adding the above to config.php will save your life when encountering SQL errors!
    http://www.worldslargestforum.com/forum/

  • #2
    You should not be placing that code in the headinclude. It should be placed in other templates that make up the body of the html output. Look at the various ad_ templates for placement. Also, the way you are invoking the CSS is incorrect, <adleft> will do nothing. You should do something like <div class="adleft">Google Code</div>
    sigpic
    Nation of Blue - Kentucky Wildcats Sports


    Some CMS Goodness: Add Avatar to Article

    Comment

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