Timeline- Load more button automatic

When you scroll with the mouse and the window reaches the end of the page is activated the Load More button automatically.

In /public_html/templates/base

_footer.html add the line

<script language="javascript" type="text/javascript" src="https://xxxxxxxxx.com/inc/js/toni.js"></script>

Add the archive toni.js in /public_html/inc/js


toni.js

$(window).scroll(function(){

 if ($(window).scrollTop() == $(document).height() - $(window).height()){

  oWallView.changePage(20, 20)

 }

});

 

The problem is that the timeline block should be the last one. Any idea to improve it?

I hope you like it

Quote · 14 Jan 2017
muro = 0;
$(window).scroll(function(){
 if ($(window).scrollTop() == $(document).height() - $(window).height()){
	 muro = muro + 20;
     oWallView.changePage(muro, 20)
 }					
});

better now

Quote · 20 Jan 2017

Great stuff and should be mandantory in Dolphin!

 

Thanks!

 

Greetings

 

Klaus


You should palce it in the market!

Quote · 13 Apr 2017

Thx Klaus


It will work better for you by adding this:

muro = 0;
var toni = !document.getElementsByClassName("bx-btn-disabled")[0];
if (toni == true){
$(window).scroll(function(){
 if ($(window).scrollTop() == $(document).height() - $(window).height()){
	 muro = muro + 20;
     oWallView.changePage(muro, 20)
	 }
});
}

 

One question, does it work on your cell phone?


Quote · 14 Apr 2017

Yes, it works on smartphones as well as on tablets.


What makes the difference to your second coding?

 

Greeting

 

Klaus

Quote · 14 Apr 2017

 

Avoid loading the "empty" message indefinitely in the profiles without any publication

Quote · 14 Apr 2017

In Chrome you still have the empty messages in the timeline.

Quote · 14 Apr 2017

It would be interesting if the wall uploads more publications a little before reaching the end of the page so the user does not have to wait.

But I can not do it, any help?

Quote · 14 Apr 2017

That will be nice, yes!

Quote · 14 Apr 2017

Hi, thanks for the tip, i tried to change it a little to work with outline too and it did now work for me. can you check it in you end please?

 

Outline:

muro = 0;
var toni = !document.getElementsByClassName("bx-btn-disabled")[0];
if (toni == true){
$(window).scroll(function(){
 if ($(window).scrollTop() == $(document).height() - $(window).height()){
	 muro = muro + 20;
     oWallOutline.changePage(muro, 20)
	 }
});
}

Both: 

 

muro = 0;
var toni = !document.getElementsByClassName("bx-btn-disabled")[0];
if (toni == true){
$(window).scroll(function(){
 if ($(window).scrollTop() == $(document).height() - $(window).height()){
	 muro = muro + 20;
     oWallOutline.changePage(muro, 20);
     oWallView.changePage(muro, 20);
	 }
});
}
Always remember that the future comes one day at a time.
Quote · 22 Apr 2017

With the code I put before I had problems on mobile devices. With this it works on mobiles although it could be improved.


muro = 0;
var toni = !document.getElementsByClassName("bx-btn-disabled")[0];
if (toni == true){
$(window).scroll(function(){
 if ($(window).scrollTop() + $(window).height() >= $(document).height()-100){
muro = muro + 20;
     oWallView.changePage(muro, 20);
}
});
 
}
Quote · 12 Oct 2017