Jump to content

Download: .Peter - Lazy Loader for IPB


.Peter

Recommended Posts


Awesome mod.



If you don't know what lazy load is, probably the most popular site to implement lazy load is [url="http://mashable.com/"]mashable.com[/url].



However, in Opera (vers.10.62) signatures don't appear after the initial page load. Other user images (avatars, attachements) seems to appear but not fade in.






Thanks for checking it in Opera. Thats one of the browsers I haven't checked yet, I'll look into the sig thing.


Looks like it breaks Lightbox too. Large images are not resized.





I knew about this and I'm trying to figure out how to resolve that. The IPS standard Prototype is conflicting with the jQuery from the mod. I'm going to try and reverse the order of the scripts and/or write some function and hopefully I can get it taken care of.

Link to comment
  • 4 weeks later...

Yes I'm still working on it. The current version is stable the only known bugs are the fact my hook currently cancels out IPS's lightbox plugin on large images so the large image gets loaded instead of being shrunk by IPB. I'm still working on fixing this.

Also I'm exploring the possibility of instead of just lazy loading images , actually lazy load entire posts like the jQuery forums have as you scroll the post will become available. So far I have been far from close to that lol.

Link to comment

Thanks for checking it in Opera. Thats one of the browsers I haven't checked yet, I'll look into the sig thing.






I knew about this and I'm trying to figure out how to resolve that. The IPS standard Prototype is conflicting with the jQuery from the mod. I'm going to try and reverse the order of the scripts and/or write some function and hopefully I can get it taken care of.





$htmlcode .= '<script type="text/javascript" charset="utf-8">

						// LazyLoader adpated for IPB by .Peter

						$.noConflict();

  						jQuery(document).ready(function($) {

							$(function() {							

								$("img.bbc_img").lazyload({ 

   	 								placeholder : "http://theta.me/api/grey.gif",

									effect: "fadein",

									threshold: 150,

    							});

							});

						});

					</script>'

i actually never seen the $.noConflict(); before, but i cant say its wrong, although, what i know of is


var $j = jQuery.noConflict();

or like how i do it


jQuery.noConflict();


$htmlcode .= '<script type="text/javascript" charset="utf-8">

						// LazyLoader adpated for IPB by .Peter

						jQuery.noConflict();

  						jQuery(document).ready(function($) {

							jQuery(function() {							

								jQuery("img.bbc_img").lazyload({ 

   	 								placeholder : "http://theta.me/api/grey.gif",

									effect: "fadein",

									threshold: 150,

    							});

							});

						});

					</script>'




also according to jQuery, you can not load jQuery before other libs if you are using the compatibility mode.. not sure if this helps anyway but eh you never know..

also since when lightbox resize images?.. it never been resized on my site i dont have ur mod installed and it is still not resized?

Link to comment

I had to use $.noConflict(); because the other method I had wasn't working with the prototype already in IPS.. additionally it was causing issues with another jQuery script I was running on the same forum so I made it fairly hard to run into other issues hence $.noConflict().

Also try to add a 1024 x 768 image to your post and watch the image get resized, actually I suppose thats not true lightbox as the embedding of attached images is. But the resize doesn't work with my hook.

Link to comment

have you managed to make it work with prototype?




Enkidu it currently works with Prototype as Prototype is the js library that IPB comes installed with by default. It all works except for the one thing I mentioned about the dynamic image resizer which I'm still working on a fix for.
Link to comment
  • 3 weeks later...

Ok I'm in the process of upgrading this hook to v2.0 which will be compatible with IPB 3.1.3+. The current hook works with 3.1.3 but with version 2.0 I will be adding a few new features.

This is the current list for what I'm trying to add:

  • Fixing the IPB image resizer override.
  • Option to LazyLoad entire posts instead of just images (with ACP options to choose).
Due to popular request v2.0 will convert to a paid hook as a few people have suggested to me that I should charge for this, it will be available in the IPS Marketplace for a whopping $2.

Additionally some of you may have noticed that currently the v1.0.5 hook data is hosted on my server theta.me , the v1.0.5 data will remain on that server but v2.0 will be hosted on a different server and from that server v1.0.5 will be available free of charge. More info on this will come as the hook gets further developed.

Link to comment

You won't be making much off of it for $2 as the commision ips takes lol. But still people will buy this and you will make some money.





True.. they'll take $0.30 from each purchase.. but this hook already has 91 downloads :D. Besides I don't want to scare people away due to charges.
Link to comment
  • 1 month later...
  • 3 months later...
  • 2 months later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...