Back to vBulletin 4.x Template Modifications

lazy load, load your page faster & save bandwidth
Mod Version: 1.00, by dinodonk

vB Version: 4.1.0 Rating: (14 votes - 4.50 average) Installs: 117
Released: 23 Feb 2011 Last Update: Never Downloads: 701
Not Supported Template Edits Additional Files Re-usable Code  

this mod is using http://www.appelsiini.net/projects/lazyload/ by Mika Tuupola. you can see demo at his site http://www.appelsiini.net/projects/lazyload/enabled.html

Lazy Load will delay the loading of images outside of viewpoint to make the page load faster. That is, images in the visible part of the web page are only loaded and remaining images are loaded when visitor scrolls down the page, at some times it can even helps to save bandwidth.

in template headinclude, add this code at the bottom

Code:
  
<vb:if condition="THIS_SCRIPT == 'showthread'">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js" type="text/javascript" charset="utf-8"></script>  
<script type="text/javascript" src="{vb:raw vboptions.bburl}/clientscript/jquery.lazyload.mini.js"></script>
  <script type="text/javascript" charset="utf-8">
      $(function() {
          $(".postbody img").lazyload({placeholder : "{vb:raw vboptions.bburl}/clear.gif", effect: "fadeIn"});
      });
  </script>
</vb:if>
copy jquery.lazyload.mini.js to your <vb root>/clientscript/ folder

done!!!

pls click install if you like this modification

Thanks to OldSchoolDSL for this suggestion

Spoiler (click to open)


Installed, although as the original author stated on his site...

http://www.appelsiini.net/projects/lazyload/

He does not believe this will completely work with more modern browser.

Also I would recommended the following....

1) Change the JQuery version number from:
PHP Code:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript" charset="utf-8"></script
To 1.5.0 for a faster load time and improved browser support.

PHP Code:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js" type="text/javascript" charset="utf-8"></script
2) If your community already does load JQuery.... There is no reason to load it more then 1x. So you can be safe to edit it out (remove) JQuery in the authors code.

Close

Download

File Type: %1$s jquery.lazyload.mini.zip (948 Bytes, 788 downloads)

Similar Mods

Realtime Template Compressor: Reduces page sizes, loads pages faster, saves bandwidth vBulletin 3.5 Add-ons
RealTime Template Compressor: Reduces page sizes, loads pages faster, saves Bandwidth vBulletin 2.x Full Releases

vblts.ru supports vBulletin®, 2022-2024