Announcement

Collapse
No announcement yet.

How: Load Forums first. Ads / external scripts later

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

  • 6piston
    started a topic How: Load Forums first. Ads / external scripts later

    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

  • 6piston
    replied
    hi dody

    THANKS!!!!

    i will try it out in the morning

    Leave a comment:


  • Dody
    replied
    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.

    Leave a comment:


  • 6piston
    replied
    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

    Leave a comment:


  • Dody
    replied
    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.

    Leave a comment:

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