Announcement

Collapse
No announcement yet.

How: Load Forums first. Ads / external scripts later

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

  • How: Load Forums first. Ads / external scripts later

    Hi all

    It's pretty annoying that some advertisement servers load much slower than your own site.

    Do anyone by any chance know of a good and simple way to make ads load last? or any other scripts that has to wait before loading vbulletin?

    Thanks!
    Tom

  • #2
    yes you can. place a javascript in the bottom of your page (in the footer template) and place a div around your ads location and give it an id (< div id="myads">ads go here</div>) and code your javascript so it calls the innerHtml of the div, so you can inject your code inside the div after the page loads. Sounds like a good idea to make it as a plugin i'll give it a try once vb4.0 rolls out.
    while(true){
    if(
    $someone->needsHelp() && $i->canHelp()) $post->help();
    if(
    $i->findBug()) $post->bug();
    }

    Comment


    • #3
      hi dody

      thanks for replying
      good to know there's a possibility to make this work

      i can't code at all, so would appreciate if you could point me in the right direction

      yes please, i'm sure millions would love to have a plugin like that

      Comment


      • #4
        Place the following HTML code instead of your ads position:

        HTML Code:
        <div id="myads">
        </div>
        Place the following javascript in the footer template:

        HTML Code:
        <script type=”text/javascript”>
        document.getElementById(”myads”).innerHTML = "place your ads code here"
        </script>
        it is a simple addon, I will do a research on how legal is this according to adsense TOS and others, and will for sure release it as a small plugin.
        while(true){
        if(
        $someone->needsHelp() && $i->canHelp()) $post->help();
        if(
        $i->findBug()) $post->bug();
        }

        Comment


        • #5
          hi dody

          THANKS!!!!

          i will try it out in the morning

          Comment

          Loading...
          Working...
          X