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

Thanks for sharing. Good code. However I get EMPTY messages both on Chrome and on IE. Any idea how to fix this?

 

Thanks!

Quote · 28 Aug 2018

Besides the EMPTY messages, I noticed that on page load the Timeline shows only the posts from the most recent day, which could be only one or two posts. So I added the $(window).load(function() event to 's code.

If someone can advise how to get rid of the EMPTY boxes that would be great.

Thanks.

Here it is:

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);
      }
    });

    $(window).load(function(){
      if (muro < 20){
          muro = muro + 20;
          oWallView.changePage(muro, 20);
      }
    });
}

Quote · 30 Aug 2018
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.