Page 5 of 6«123456»
Forum moderator: bigblog 
uCoz Community » For Webmasters » Custom Solutions » New page auto load when scrolling down
New page auto load when scrolling down
Cyberdasm
Posts: 599
Reputation: 6
Message # 61 | 6:16 AM
VZ, I well give a try on $MODULE_ID$.
--------------------------------------------------------
I think this url '/$MODULE_ID$/0-' is for publ module only. since 0- is publ entry.
This is the whole url of an entry: 41-1-0-307

41- <<-- category ID
1-
0- <<-- publ entry
307- <<--entry ID and I'm sure of it.

1F4BF3B

admin@lizeal.tk
www.lizeal.tk
Post edited by Cyberdasm - Friday, 2017-01-20, 7:07 AM
VZ
Posts: 189
Reputation: 3
Message # 62 | 7:01 AM
Quote Cyberdasm ()
I think this url '/$MODULE_ID$/0-' is for publ module only. since 0- is publ entry.

I tried it out on Photos. It works but I do not know on how many pages. In addition it worked out on the main page of the file catalog module. Would need a little modification for Videos, it appears it would work on the Publisher module as well.

to make it work on the video module change this
Code
nextik = $("#selector").find(".swchItem:contains('»')").attr('href');

to
Code
nextik = $("#selector").find(".swchItem:contains('»')").attr('onclick').toString();

Hit that "Thanks" button. :)
In life there's ALWAYS limits but do not plan above them.
Post edited by VZ - Friday, 2017-01-20, 7:11 AM
Cyberdasm
Posts: 599
Reputation: 6
Message # 63 | 7:05 AM
VZ, May I see your demo page..?
1F4BF3B

admin@lizeal.tk
www.lizeal.tk
VZ
Posts: 189
Reputation: 3
Message # 64 | 7:05 AM
Cyberdasm, http://flatdesign101.cf/photo/
Hit that "Thanks" button. :)
In life there's ALWAYS limits but do not plan above them.
Cyberdasm
Posts: 599
Reputation: 6
Message # 65 | 7:12 AM
VZ, Yeah it's working but I don't know why is it that it doesn't work out in my website. Since Last December I try MODULE_ID in it.
Here's my demo

1F4BF3B

admin@lizeal.tk
www.lizeal.tk
Post edited by Cyberdasm - Friday, 2017-01-20, 7:13 AM
VZ
Posts: 189
Reputation: 3
Message # 66 | 7:12 AM
Quote Cyberdasm ()
This is the whole url of an entry: 41-1-0-307

41- <<-- category ID
1-
0- <<-- publ entry
307- <<--entry ID and I'm sure of it.

Yes it is. However, I played around with the page selectors and at least two sections and 2 categories in one section.

Hit that "Thanks" button. :)
In life there's ALWAYS limits but do not plan above them.
Cyberdasm
Posts: 599
Reputation: 6
Message # 67 | 7:32 AM
VZ, I see you trigger the pagination in my case I trigger the url... smile
Kudos for improving the script. Maybe I'm to narrow minded since I only stick on the url. +1 rep.

Added (2017-01-20, 7:32 AM)
---------------------------------------------

Quote Cyberdasm ()
it appears it would work on the Publisher module as well.

Yes it worked in publ module. since the get is 'publ/0-'+num

1F4BF3B

admin@lizeal.tk
www.lizeal.tk
Post edited by Cyberdasm - Friday, 2017-01-20, 7:24 AM
VZ
Posts: 189
Reputation: 3
Message # 68 | 9:51 AM
Quote Cyberdasm ()
Yeah it's working but I don't know why is it that it doesn't work out in my website. Since Last December I try MODULE_ID in it.
Here's my demo

uCoz could have updated it.

Hit that "Thanks" button. :)
In life there's ALWAYS limits but do not plan above them.
Soldierdevil
Posts: 122
Reputation: 0
Message # 69 | 7:04 AM
VZ, on your demo page the script works so well..but i dont know why on mine its taking forever to load another page. I dont know whats happening here...could you help please...... The photo mopdule

Added (2017-01-21, 7:04 AM)
---------------------------------------------
Click here and see whats happening. Nothing at all.... sad sad


I hate politics, people who do not make an effort with people and those who try hard to be cool
VZ
Posts: 189
Reputation: 3
Message # 70 | 1:06 AM
Quote Soldierdevil ()
VZ, on your demo page the script works so well..but i dont know why on mine its taking forever to load another page. I dont know whats happening here...could you help please...... The photo mopdule

Added (2017-01-21, 7:04 AM)
---------------------------------------------
Click here and see whats happening. Nothing at all.... sad sad

The problem is with my updated script. It should work really good on the home page. Since this is the category/section page it takes the last number from $URI_ID$...I will see if I can get it fixed.

Since the that category has an ID of 80 it takes only 0 from it because its the last digit.

Change
Code
<?substr($URI_ID$,-1)?>

to
Code
<?substr($URI_ID$,5)?>


Added (2017-01-23, 1:06 AM)
---------------------------------------------
Code
<div id="conter">$BODY$</div>
<div class="selector" id="selector" style="display:none">$PAGE_SELECTOR$</div>

<script type="text/javascript">
if ($("#selector").find(".swchItem:contains('»')").text() == '»') {
$("#selector").after('<div id="nextCont" class="input_submit alt"><div class="u_pos"></div></div>');
};

$(window).scroll(function() {
if($(".u_pos").length != 0) {
if($('.u_pos').position().top-$(window).scrollTop() < 1000) {
Conte.to()
}
}
});
Conte = {
to:function(){
$("#nextCont").html('<div align="center"><img src="/.s/img/icon/ajsml.gif" border="0" /></div>');
nextik = $("#selector").find(".swchItem:contains('»')").attr('href');
if(nextik !=undefined) {
<?ifnot($PAGE_ID$ == "main" || $PAGE_ID$ == "main_page" )?>
num = nextik.split(/\s*-\s*/)[1];
<?else?>
num = nextik.match(/\d/);
<?endif?>
$.get('/$MODULE_ID$/<?ifnot($PAGE_ID$ == "main")?><?substr($URI_ID$,5)?><?else?>0<?endif?>-'+num, function(next){
$("#conter").append( $("#conter", next).html() );
$("#selector").html( $("#selector", next).html() );
$("#nextCont").html('<div class="u_pos"></div>');
if ($("#selector", next).find(".swchItem:contains('»')").html() == null) { $("#nextCont").fadeOut(); };
});
}
}
}
</script>

Hit that "Thanks" button. :)
In life there's ALWAYS limits but do not plan above them.
Post edited by VZ - Monday, 2017-01-23, 1:07 AM
Soldierdevil
Posts: 122
Reputation: 0
Message # 71 | 8:27 AM
VZ, please provide me your paypal email. Looks like you have solved all the problems in my life biggrin biggrin So how i can i make this code work on the page of users entries and search results plus the blog, news and video module as well?
I hate politics, people who do not make an effort with people and those who try hard to be cool
Cyberdasm
Posts: 599
Reputation: 6
Message # 72 | 11:20 AM
VZ,
Quote VZ ()
The problem is with my updated script. It should work really good on the home page. Since this is the category/section page it takes the last number from $URI_ID$...I will see if I can get it fixed.

Since the that category has an ID of 80 it takes only 0 from it because its the last digit.

I don't quite understand on where did you get the 80. Could you please explain a little bit about it?

1F4BF3B

admin@lizeal.tk
www.lizeal.tk
Soldierdevil
Posts: 122
Reputation: 0
Message # 73 | 12:42 PM
Cyberdasm, i think the 80 is the category ID of the cat link i provided.
Quote
Click here and see whats happening. Nothing at all.... sad sad

I hate politics, people who do not make an effort with people and those who try hard to be cool
VZ
Posts: 189
Reputation: 3
Message # 74 | 9:13 PM
Quote Cyberdasm ()
I don't quite understand on where did you get the 80. Could you please explain a little bit about it?

paypal: paypal.me/nmaksymchuk
80 comes from his category/section id, the demo he provided
http://u.to/6NeqDw
Update:
Didn't realize soldier devil has answered the question.

Added (2017-01-23, 9:13 PM)
---------------------------------------------
Blog:
page-0-cid/sid

Code
<div id="conter">$BODY$</div>
<div class="selector" id="selector" style="display:none">$PAGE_SELECTOR$</div>

<script type="text/javascript">
if ($("#selector").find(".swchItem:contains('»')").text() == '»') {
$("#selector").after('<div id="nextCont" class="input_submit alt"><div class="u_pos"></div></div>');
};

$(window).scroll(function() {
if($(".u_pos").length != 0) {
if($('.u_pos').position().top-$(window).scrollTop() < 1000) {
Conte.to()
}
}
});
Conte = {
to:function(){
$("#nextCont").html('<div align="center"><img src="/.s/img/icon/ajsml.gif" border="0" /></div>');
nextik = $("#selector").find(".swchItem:contains('»')").attr('href');
if(nextik !=undefined) {
<?ifnot($PAGE_ID$ == "main" || $PAGE_ID$ == "main_page" )?>
num = nextik.split(/\s*-\s*/)[1];
<?else?>
num = nextik.match(/\d/);
<?endif?>
$.get('/$MODULE_ID$/'+num+ '-0-<?ifnot($PAGE_ID$ == "main")?><?substr($URI_ID$,5)?><?else?>0<?endif?>/', function(next){
$("#conter").append( $("#conter", next).html() );
$("#selector").html( $("#selector", next).html() );
$("#nextCont").html('<div class="u_pos"></div>');
if ($("#selector", next).find(".swchItem:contains('»')").html() == null) { $("#nextCont").fadeOut(); };
});
}
}
}
</script>

Hit that "Thanks" button. :)
In life there's ALWAYS limits but do not plan above them.
Post edited by VZ - Monday, 2017-01-23, 9:14 PM
Soldierdevil
Posts: 122
Reputation: 0
Message # 75 | 8:43 AM
VZ, sorry was off. Please accept payments i am getting errors. The last code you provided does not seem to work in the blog module. If at all i would make it work for the blog and site news plus video...actually all modules. That would be great.
I hate politics, people who do not make an effort with people and those who try hard to be cool
uCoz Community » For Webmasters » Custom Solutions » New page auto load when scrolling down
Page 5 of 6«123456»
Search: