Infinite posts feature / option
- adamderesz
- Posts: 19
- Joined: Sat 3. Oct 2009, 14:06
- Location: Gdansk / Poland
- Contact:
Infinite posts feature / option
Is it possible to implement somehow the 'infinite posts' option so once we open a page/section it will automatically load few articles and add more articles from that category every time we reach almost end of that page?
That would be very very useful
That would be very very useful
- Oliver Georgi
- Site Admin
- Posts: 9906
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Re: Infinite posts feature / option
until now there is nothing like this. It might be possible in combination with pagination and javascript that handles this because there is simple solution inside of phpwcms to catch only specific content sections. Idea would be to detect pagination by javascript, sort out the possible max amount and while scrolling down load next page content by ajax and append it and so on…
All missing is the JavaScript that is fired — at all pretty simple. No JavaScript = fallback to the classic paginated method.
All missing is the JavaScript that is fired — at all pretty simple. No JavaScript = fallback to the classic paginated method.
Re: Infinite posts feature / option
something like this one?
http://www.fieg.nl/infinite-ajax-scroll-a-jquery-plugin
http://www.fieg.nl/infinite-ajax-scroll-a-jquery-plugin
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Re: Infinite posts feature / option
in conclusion, adamderesz: if you're able to output a pagination you're able to infinit scroll
but there are only a few parts inside phpwcms with pagination, yet
other way oliver talked about would be to check this and create your own infinit loader.
would like to see the result.
but there are only a few parts inside phpwcms with pagination, yet
other way oliver talked about would be to check this and create your own infinit loader.
would like to see the result.
Last edited by nameless1 on Thu 9. Jan 2014, 18:21, edited 1 time in total.
- Oliver Georgi
- Site Admin
- Posts: 9906
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Re: Infinite posts feature / option
Do not link to Google Code — GitHub has it too:
https://github.com/slackero/phpwcms/com ... 66cd062335
https://github.com/slackero/phpwcms/com ... 66cd062335
Re: Infinite posts feature / option
Me toonameless1 wrote:would like to see the result.
and the corresponding howto
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
- adamderesz
- Posts: 19
- Joined: Sat 3. Oct 2009, 14:06
- Location: Gdansk / Poland
- Contact:
Re: Infinite posts feature / option
Will have a think about it... slight trouble is I'm not the best javascripter in town
To tell you the truth I recently had to make a website based on 'wp' and it was so incredibly painful I regretted this job the second day it started...
Mmy customer needed to use a tool that's based on.. that something, so there was no other option. Hopefully for me it was also based on purchased template, so at the end it was not so bad, but I'll never do it again if I'm not forced to it
To the point - the cool feature there was this infinite posts, and I really liked that idea... so, we'll see
thanks for info and some draft guidelines
Adam
To tell you the truth I recently had to make a website based on 'wp' and it was so incredibly painful I regretted this job the second day it started...
Mmy customer needed to use a tool that's based on.. that something, so there was no other option. Hopefully for me it was also based on purchased template, so at the end it was not so bad, but I'll never do it again if I'm not forced to it
To the point - the cool feature there was this infinite posts, and I really liked that idea... so, we'll see
thanks for info and some draft guidelines
Adam
- Oliver Georgi
- Site Admin
- Posts: 9906
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Re: Infinite posts feature / option
I would be able to work this out if someone needs but as always — should be paid at all (symbolic price).
- adamderesz
- Posts: 19
- Joined: Sat 3. Oct 2009, 14:06
- Location: Gdansk / Poland
- Contact:
Re: Infinite posts feature / option
Soo, tried it on phpwcms 1.5.4.1 (r491), and it worked (in general) straight from the box.
Code used was Infinite Ajax Scroll (IAS) from https://github.com/webcreate/infinite-ajax-scroll
Here's how it went:
1.
Site is using paginate code as in config/phpwcms/conf.template_default.inc.php file with added extra class for "next page' link as it's required by the IAS script to work
2.
I have the 'articles' template set, that is different to all others within the site for various reasons, and it includes jQuery (v1.7), the IAS script and then call to start IAS.
Theres' some small css provided with IAS I just placed together with my main css file. It's just to position the loading progress graphic, mainly and make nice notes (IAS script can add notes like 'no more to view' or 'hover here for more content') - I don't use that here.
The call for that lot is also straight from the box:
Above call (if in-page) shall be placed after the posts area so it hides the original pagination block, if it's before - the block will be visible until first ias function trigger.
3.
Set up the article nodes of my site to use pagination and show 5 elements per page...
And it works like a gem
I'm quite sure it will work as good if used for article content pagination... so one can do a fancy self expanding article with just few clicks, literally.
I guess that could be a nice feature to implement, sometime in a future or just setup guidelines somewhere in official phpwcms docs
Code used was Infinite Ajax Scroll (IAS) from https://github.com/webcreate/infinite-ajax-scroll
Here's how it went:
1.
Site is using paginate code as in config/phpwcms/conf.template_default.inc.php file with added extra class for "next page' link as it's required by the IAS script to work
Code: Select all
Line 122:
$template_default['article_paginate_navi'] = '<div class="paginate paginate-{POS}">{PREV:«} <span class="page-next">{NEXT:»}</span> page # of ##</div>'; //
I have the 'articles' template set, that is different to all others within the site for various reasons, and it includes jQuery (v1.7), the IAS script and then call to start IAS.
Theres' some small css provided with IAS I just placed together with my main css file. It's just to position the loading progress graphic, mainly and make nice notes (IAS script can add notes like 'no more to view' or 'hover here for more content') - I don't use that here.
The call for that lot is also straight from the box:
Code: Select all
<script type="text/javascript">
jQuery.ias({
container : '#cnt',
item: '.artlistentry',
pagination: '#cnt .paginate',
next: '.page-next a',
loader: '<img src="/img/loader.gif"/>'
});
</script>
3.
Set up the article nodes of my site to use pagination and show 5 elements per page...
And it works like a gem
I'm quite sure it will work as good if used for article content pagination... so one can do a fancy self expanding article with just few clicks, literally.
I guess that could be a nice feature to implement, sometime in a future or just setup guidelines somewhere in official phpwcms docs
Re: Infinite posts feature / option
Yeah! This sounds good (enough) to give it a try?
Will post it at the http://www.phpwcms-howto.de/wiki/ as soon as there is some more comment by Oliver to read...
Will post it at the http://www.phpwcms-howto.de/wiki/ as soon as there is some more comment by Oliver to read...
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
- Oliver Georgi
- Site Admin
- Posts: 9906
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Re: Infinite posts feature / option
Fine and good work. That's easy at all.adamderesz wrote:Soo, tried it on phpwcms 1.5.4.1 (r491), and it worked (in general) straight from the box…
Re: Infinite posts feature / option
adamderesz wrote: 3.
Set up the article nodes of my site to use pagination and show 5 elements per page...
Could you please be so kind to provide examples of the above, for the sake of completeness?adamderesz wrote: I have the 'articles' template set, that is different to all others
Edit: Did you setup different articles within a level or did you use the pagination of Content Parts? Could be done with both versions, I think?
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
- adamderesz
- Posts: 19
- Joined: Sat 3. Oct 2009, 14:06
- Location: Gdansk / Poland
- Contact:
Re: Infinite posts feature / option
There's nothing to add, really.claus wrote: Could you please be so kind to provide examples of the above, for the sake of completeness?
In administration, for sections that have many articles (news, events, blog name it any way you want) one must enable pagination and set it to required number of elements per page.
My 'articles template' is different only because it implements the IAS code plus {CATEGORY} as a h1 element (instead of using the regular article h1). That's because I also use additional 'news' article template - purely to have other headers formatting - different for single page and multi-articles section. It's really very site specific, so there's nothing to add to 'core instruction'
The test implementation I made - it's actually live client's site ( ) - is using that for article list, only - as this is the place where pagination is used most often. They rarely have articles that long to make them self-expanding, but lists of entries is a whole other thing.claus wrote: Edit: Did you setup different articles within a level or did you use the pagination of Content Parts? Could be done with both versions, I think?
I believe it could be implemented for ContentParts pagination - when it's set with the nextpage/prevpage options. It's just so it has 'findable' next button - with special class or ID, so we can tell the IAS script what to look for.
As regards howto - it's just to figure out where it's the best to include necessary JS. In my opinion it would be the 'paginate version' of standard article template... I would not mess with other places for sake of general code 'purity'.
Re: Infinite posts feature / option
It's now part of the wiki
Thanks!
Thanks!
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.