Jump to content

Download: .Peter - Lazy Loader for IPB


.Peter

Recommended Posts

Posted

File Name: .Peter - Lazy Loader for IPB
File Submitter: .Peter
File Submitted: 14 Sep 2010
File Updated: 20 Sep 2010
File Category: Hooks and Plugins

Statistics show that the majority of users that visit webpages never end up scrolling down but leave the page too fast.

This hook helps improve your bandwidth and improves page load times by loading images as the user sees them. When the user scrolls down a page images on that page will be loaded in and "faded in".

This hook is based off the Lazy Loader Plugin for jQuery found here, I have just re-adapted it for IPB.


For the time being there are no editable ACP settings and the source .js file is hosted on my server, later versions will allow the option to host the .js file on your own server.

This hook is FREE however Donations are greatly appreciated :D




Browser Requirements:
Due to how Safari handles jQuery scripts, this plugin does not work in Safari browsers.

Change log:

  • v 1.0.5 - Hook works again and properly, I sped up the loading times so now you may not even see them loading as the image will begin to load 150 pixels before you even get to the picture (off screen loading). Tested in Chrome and IE8, Chrome likes to try and pre-load most of the images but the script will stop it so loading times on Chrome are slightly longer than in IE8.
  • v 1.0.2 - Fixed a bug that made it so Fast Reply images wouldn't load. Now LazyLoader will only LazyLoad NON-IPB standard images (Sped loading times up a TON!) - Thanks to maxx_poland for finding this bug.


Click here to download this file
Posted

Great hook, but Fast Reply window don't load the icon editor. I checked on 2 computers and 2 browsers (Firefox 3.6.9 and IE 8)


Any idea?



post-120433-089735500 1284561352_thumb.j


Ok I think I fixed this, uninstall the hook from your ACP then re-download v1.0.2 http://community.invisionpower.com/files/file/3480-peter-lazy-loader-for-ipb/

I fixed it so now "theoretically" the hook will only load NON-Standard IPB images (a.k.a user shared images). This actually sped up my loading times quite a bit as the script didn't need to find every instance of an image like it did before.

If you find any other errors with it just let me know.
Posted

not really working or making any change at all.
page is loading normally and pictures at the bottom of the posts are loading as well. i tried with several pages and different browsers.
too good to be true.

Posted

oops I must have forgot to add that in the updated version.. When I get off work I'll get an updated version out. Wirh a few other adjustments.. Thanks for your patience

Posted

Ok hook has been updated. I've tested it in IE8 and Chrome and works. I've set it so the images will actually begin loading before they appear on the screen so for many smaller images you may not even notice that the images have been loaded but if you look at your scroll bar (Check demo link) you can see that the images are being loaded. So in essence I've made it faster and it saves on loading times.

Posted

Well everyone else seems to be saying it's not working. :P



My users have seen it work too on their signatures. They love it lol.




Thanks for the feedback!

Also you're right earlier it wasn't working as was mentioned by everyone else, and it was because when I updated the hook I had forgotten to put in the php code. Which I fixed in v 1.0.5
Posted

$(self).hide().attr("src", $(self).attr("original"))[settings.effect] is not a function
lazyload.js
Line 91

I noticed this while testing and on your demo site.
could be my end too I guess

also noticed that the full image won't appear after fade in. it starts to fade, then blank, until the scroll moves.
could be related to that error.

Posted

$(self).hide().attr("src", $(self).attr("original"))[settings.effect] is not a function


lazyload.js


Line 91



I noticed this while testing and on your demo site.


could be my end too I guess



also noticed that the full image won't appear after fade in. it starts to fade, then blank, until the scroll moves.


could be related to that error.




What browser are you using?

EDIT: I just tried it in Chrome, IE8, and FF 3.6 and they're all working for me with no issues. The Chrome JS Console doesn't show anything but the FF JS Console does, yet it still works. Also as it is I didn't write that function, it was from the adapted jQuery plugin that this hook is based off of.

RE-EDIT: Ok it has minor issues in Safari 5, the fade-in doesn't work so as you're scrolling the images just appear... I will working on fixing that.
Posted

one smart mod, i will keep on updating my site to work with ur mod.




Thanks ! And I'm fixing the Safari issue... it should be resolved by later today.
Posted

I think this has broke my site ? First of all people kept on getting signed out so I removed and now the latest posts aren't showing on the index, it's showing ones from before I installed it as the latest.

Posted

ummm my hook doesn't touch IPS sessions there is no way that the hook could have done that. Same with latest posts. Sorry to hear that but my hook doesn't have the ability to change that.

also upon uninstalling the hook, the changes if any should have reverted.

Posted

There is a prototype version for this :P

So you don't have to mess with jQuery and Prototype on same setup.

http://www.bram.us/projects/js_bramus/lazierload/#install_config

Posted

There is a prototype version for this :P



So you don't have to mess with jQuery and Prototype on same setup.



[url="http://www.bram.us/projects/js_bramus/lazierload/#install_config"]http://www.bram.us/p...#install_config[/url]




Oo thanks! I will look into this and see about switching!

Lazy loading does not currently work with safari because of webkit bug [url="http://bugs.webkit.org/show_bug.cgi?id=6656"]#6656[/url] (same goes for Lazy Load).[/QUOTE]




That's good to know :D.. I've been having issues with mine and Safari.



EDIT: I don't think the prototype version will work as it LazyLoads ALL the images on the page and from what I can tell there isn't a way to specify only certain images... whereas my hook will only LazyLoad images that users have submitted.

Posted

I think this has broke my site ? First of all people kept on getting signed out so I removed and now the latest posts aren't showing on the index, it's showing ones from before I installed it as the latest.



Have you tried resynchronizing everything to fix it?

Archived

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

  • Recently Browsing   0 members

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