Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt November 11, 2024
.Peter Posted September 14, 2010 Posted September 14, 2010 File Name: .Peter - Lazy Loader for IPBFile Submitter: .PeterFile Submitted: 14 Sep 2010File Updated: 20 Sep 2010File 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
master_of_disaster Posted September 15, 2010 Posted September 15, 2010 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?
.Peter Posted September 15, 2010 Author Posted September 15, 2010 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? 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.
SKDown Posted September 16, 2010 Posted September 16, 2010 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.
ll4ever Posted September 16, 2010 Posted September 16, 2010 that's because lazyload.php is empty (last xml file compared to the first)
.Peter Posted September 16, 2010 Author Posted September 16, 2010 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
SKDown Posted September 16, 2010 Posted September 16, 2010 too lazy to really update the file now? disappointed..
.Peter Posted September 16, 2010 Author Posted September 16, 2010 I can't I'm at work and don't have internet access except via phone.. Not a laziness issue just accesibility
SKDown Posted September 16, 2010 Posted September 16, 2010 never the less, thanks for your mod and effort in making it, lets just hope this works.
.Peter Posted September 17, 2010 Author Posted September 17, 2010 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.
Aisha Posted September 17, 2010 Posted September 17, 2010 Demo seems to work the way you said it will.
.Peter Posted September 18, 2010 Author Posted September 18, 2010 Yes it does... did you expect it not to lol?
Aisha Posted September 18, 2010 Posted September 18, 2010 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.
.Peter Posted September 18, 2010 Author Posted September 18, 2010 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
ll4ever Posted September 18, 2010 Posted September 18, 2010 $(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.
.Peter Posted September 18, 2010 Author Posted September 18, 2010 $(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.
SKDown Posted September 18, 2010 Posted September 18, 2010 one smart mod, i will keep on updating my site to work with ur mod.
.Peter Posted September 18, 2010 Author Posted September 18, 2010 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.
Gaffney Posted September 19, 2010 Posted September 19, 2010 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.
.Peter Posted September 19, 2010 Author Posted September 19, 2010 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.
Gaffney Posted September 19, 2010 Posted September 19, 2010 seems like it's the cookies, check with the hosting they say the server is fine, sent a ticket to ips.
Connor T Posted September 20, 2010 Posted September 20, 2010 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
.Peter Posted September 20, 2010 Author Posted September 20, 2010 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.
Aisha Posted September 20, 2010 Posted September 20, 2010 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?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.