We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

photos plugin | Forum

Topic location: Forum home » Support » General Questions
tammy harris
tammy harris Feb 28 '15
in photos plugin does any one know where to adjust the lazy load distance 
as now when you scroll to the bottom of the pics that is loaded you have to wait so long untill it starts loading more 
Kelvin
Kelvin Feb 28 '15
wow Tammy I have a same question too !!! I want more long lazy load distance too !
tammy harris
tammy harris Mar 2 '15
anyone ???
Taissa Team
Taissa Mar 5 '15
Tammy, do you mean that you want the photos were loaded not at the bottom of the window but much earlier, before you have scrolled to the bottom?
If so, you need to make changes in the /ow_plugins/photo/static/js/browse_photo.js file.
The system counts the certain number of pixels from the bottom side of the window and then starts to load photos. So you need to increase the number of pixels in the next line:
return Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.body.clientHeight, document.documentElement.clientHeight) - (win.scrollTop() + win.height()) <= 200;

For example you need to increase the value from 200  to 400 .
Kelvin
Kelvin Mar 5 '15
Thank you Taissa ! It finally works pretty well !! Never see bottom bar anymore :)
Kяuncн Leader
Kяuncн Mar 5 '15

Quote from Taissa Tammy, do you mean that you want the photos were loaded not at the bottom of the window but much earlier, before you have scrolled to the bottom?
If so, you need to make changes in the /ow_plugins/photo/static/js/browse_photo.js file.
The system counts the certain number of pixels from the bottom side of the window and then starts to load photos. So you need to increase the number of pixels in the next line:
return Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.body.clientHeight, document.documentElement.clientHeight) - (win.scrollTop() + win.height()) <= 200;

For example you need to increase the value from 200  to 400 .

/public_html/owl.systems/ow_static/plugins/photo/js/browse_photo.js As well
Kelvin
Kelvin Mar 5 '15
Yes Krunch I just changed both path to make real change. You can check my site to see how cool it is :)
tammy harris
tammy harris Mar 5 '15
wow cool thanks il try the tomorrow 
tammy harris
tammy harris Mar 5 '15

Quote from Kяuncн
Quote from Taissa Tammy, do you mean that you want the photos were loaded not at the bottom of the window but much earlier, before you have scrolled to the bottom?
If so, you need to make changes in the /ow_plugins/photo/static/js/browse_photo.js file.
The system counts the certain number of pixels from the bottom side of the window and then starts to load photos. So you need to increase the number of pixels in the next line:
return Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.body.clientHeight, document.documentElement.clientHeight) - (win.scrollTop() + win.height()) <= 200;

For example you need to increase the value from 200  to 400 .

/public_html/owl.systems/ow_static/plugins/photo/js/browse_photo.js As well
would it be better to just clear cache 
Taissa Team
Taissa Mar 10 '15
Tammy, have you managed to do what you were trying to achieve?
tammy harris
tammy harris Mar 10 '15
i have done the changes but i have not had time to test it 
right now i have just switched to a dedicated server and seams the server does not like the oxwall ftp  as try update a plugin got my ip blocked from the server 
waiting hosting whitleist my ip as i can not even ssh into the server 

il let you know


Kelvin
Kelvin Mar 10 '15
How come a dedicated server can block you when you are a owner ? You can control everything.
tammy harris
tammy harris Mar 10 '15
servers have fire walls and if even the owner does something the server does not like it will shut that ip out  and i forgot to whitelist my ip so the server will not lock me out 
and for some reason that i have not worked out yet it does not like the oxwall ftp 
so when i went to update a plugin and it did not work i try do it few times and the server thinks im try doing bad thinks to it so it locks my ip out 
Kelvin
Kelvin Mar 10 '15
yeah you need to whitelist first.
tammy harris
tammy harris Mar 12 '15

Quote from Taissa Taissa
Taissa
thank you so much it works great 
tammy harris
tammy harris Mar 12 '15
and i see the quote thing had a bit of a dummy spit lol il try again


tammy harris
tammy harris Mar 12 '15

Quote from Taissa Tammy, have you managed to do what you were trying to achieve?
hmmmmmm  worked that time
tammy harris
tammy harris Mar 20 '15
i have changed it to 600 as i have some bottom content 
Kelvin
Kelvin Mar 20 '15
so you can make value like 2000 then you won't see bottom content anymore.