Closed (fixed)
Project:
Image Lazyloader
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Sep 2012 at 05:45 UTC
Updated:
6 Jun 2016 at 11:01 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
kristougher commentedI had the problem with a view. I solved it with this (I know, not the most elegant solution, but sometimes reality is craving for a fast solution).
In a module
I had a selector in front of 'img[data-src]' in order to only hit the relevant images.
In a JS file:
I will try to create something more general.
Comment #2
-Mania- commentedI'm trying to use this module for views too and it doesn't seem to do anything. I don't use Ajax with views so that's not the issue.
edit. I ended up using http://drupal.org/project/lazyload instead.
Comment #3
ludo.rAs I understand, the new pictures loaded through Ajax do not receive the lazyloader function.
That's what Drupal.behaviors are for. Please try with this
lazyloader.module,lazyloader_process_html()function :It works for me at least...
Comment #4
nbourdial commentedSame problem for me using Views with ajax.
Thanks for your fix, I attached it as a patch.
Comment #5
btopro commentedreroll of patch against dev. This is working in a production site I just tested it in so I think it's ready for prime time. Setting it to R&T though obviously not the maintainer, just helping highlight that this works w/ multiple confirmations. Great module!
Comment #6
btopro commentedrefactoring of patch to resolve
#2088367: wrapping inline jquery call for js at end of file themes
and
#2077337: Notice icon undefined
I've also rebuilt the page to follow better conventions for including inline js in drupal by allowing the drupal_add_js function to handle it. This helps avoid conflicts realized in #2088367: wrapping inline jquery call for js at end of file themes
Comment #7
btopro commentedattaching the patch would have helped :)
Comment #8
jordanmagnuson commentedGreat patch (#7). Working well for me so far to resolve conflict with views infinite pager.
Comment #9
szantog commentedThis patch is perfect.
Comment #10
tusik commentedCan't patch... I'm using patch in #7 and version 7.x.1-1 dev
patching file lazyloader.module
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 154 with fuzz 2.
Patch must be revised. It's fuzzy.
Comment #11
danielhonrade commentedanybody who wants to maintain this module?
Comment #12
btopro commentedsure; dono how much I'll add but #7 works well in production where I have it. would be happy to apply to the project.
Comment #13
Farreres commented@btopro, did you take maintenance? would be nice to have the patch applied to dev
Comment #14
neeravbm commentedPatch #7 doesn't work with Views slideshow when the slideshow is above the fold on page load. Hence this patch.
Comment #15
rv0 commentedPatch in #14 works fine for me.EDIT: Patch #14 has problems when a view is filtered by exposed filters with ajax. Patch #7 works nicely
Comment #16
kaztur commented#7 works great! Tjak You, btopro!
But now I have en error:
Notice: Undefined index: icon in lazyloader_page_build() (line 180 in /home/...blah-blah.../lazyloader/lazyloader.module).My end code:
Comment #17
angelgarciaco commentedok.. it's simple, replace:
, icon: "' . base_path() . $settings['icon'] . '" });
for
, icon: "' . $icon . '" });
Comment #18
kaztur commentedangelo047, great thank You for help - it works fine!
Comment #19
Christopher Riley commentedWorked for me would love to see #14 committed.
Comment #20
btopro commentedSeems like there are currently mixed reports about which is better, 7 or 14
Major difference in approaches is that 7 runs during page build operation while 14 runs during HTML output operation. 7 is more flexible and can be overridden by other projects and *should* have greater compatibility with things like panels / EVA / anything that loads items into items (potentially).
We run 7 in production w/ the latest dev
Comment #21
Christopher Riley commentedI will give #7 another go on the site I am developing to see what I think.
Thanks for the tip.
Comment #22
btopro commentedmake sure you clear site caches after applying #7 cause it switches hooks involved in page building / output which then can break the JS getting tied into the page (until caches are cleared).
Comment #23
Christopher Riley commentedWell one thing that I like so far is a few issues I had before I excluded panels do not appear with patch 7. Continuing to play and seeing what I can find.
Thanks again.
Comment #24
cthshabel commentedOverall, it seems #7 works better for my situation. I am using this primarily for Views Load More module which uses waypoints.js to load more content. Having it run during page build operation seems smoother than HTML output operation.
Thanks a lot for the patches btopro. Good stuff
Comment #25
Anonymous (not verified) commented#7 works for me where i use views load more and submit hidden exposed filters.
Comment #26
legolasboI've altered #7 to attach the javascript using #attached instead of drupal_add_js() to allow for better caching. Please review it's functionality so I can commit this.
Comment #27
Anonymous (not verified) commented#26 works fine for me with views load more and ajax exposed filters.
Comment #29
legolasboPatch committed, thanks!
Comment #31
Jochen.Zhang commentedlazyload.module
the function:
Comment #32
legolasbo@lamp99 ????
Comment #33
Sora_tm commentedHello! May be some one can help me -
I wrote my custom module with ajax content loading, like this -
js file:
module:
And after loading content, lazy load not working, just white space. HTML code of img tag:
What I must to do? Sorry for my English :)
Comment #34
Sora_tm commentedAdding
Drupal.attachBehaviors();helped me :)Comment #35
nayanalok commentedHi,
I cant find lazyloader_process_html() in lazyloader.module.
I have my page coming through angularjs, means its a ajax content and I want to applly lazyloader to it. html code is getting generated but lazy loader is not getting applied. Following is the html generated
Someone help me to fix this
Comment #36
legolasboHi nayanalok,
Please open a new issue instead of re-opening this closed issue.