Strict Standards: Declaration of action_plugin_dlcount::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/dlcount/action.php on line 14

Strict Standards: Declaration of action_plugin_indexmenu::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/indexmenu/action.php on line 169

Strict Standards: Declaration of action_plugin_ipban::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/ipban/action.php on line 67

Strict Standards: Declaration of action_plugin_loglog::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/loglog/action.php on line 82

Strict Standards: Declaration of action_plugin_navi::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/navi/action.php on line 46

Strict Standards: Declaration of action_plugin_uparrow::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/uparrow/action.php on line 69

Strict Standards: Declaration of action_plugin_userspagecreate::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/userspagecreate/action.php on line 97

Strict Standards: Declaration of cache_instructions::retrieveCache() should be compatible with cache::retrieveCache($clean = true) in /home/www/wiki/inc/cache.php on line 289

Warning: Cannot modify header information - headers already sent by (output started at /home/www/wiki/lib/plugins/dlcount/action.php:14) in /home/www/wiki/inc/auth.php on line 312

Strict Standards: Only variables should be passed by reference in /home/www/wiki/doku.php on line 71

Warning: Cannot modify header information - headers already sent by (output started at /home/www/wiki/lib/plugins/dlcount/action.php:14) in /home/www/wiki/inc/actions.php on line 154
Infinite Ajax Scroll (IAS) [phpwcms-HowTo:wiki]

Strict Standards: Declaration of syntax_plugin_code::render() should be compatible with DokuWiki_Syntax_Plugin::render($format, &$renderer, $data) in /home/www/wiki/lib/plugins/code/syntax.php on line 41

Strict Standards: Declaration of syntax_plugin_tip::render() should be compatible with DokuWiki_Syntax_Plugin::render($format, &$renderer, $data) in /home/www/wiki/lib/plugins/tip/syntax.php on line 38

Infinite Ajax Scroll (IAS)

Author:adamderesz http://forum.phpwcms.org/viewtopic.php?f=1&t=24285

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:

Follow these simple steps an you'll get it!

Step 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

Line 122:
$template_default['article_paginate_navi']   = '<div class="paginate paginate-{POS}">{PREV:&laquo;} <span class="page-next">{NEXT:&raquo;}</span> page # of ##</div>'; //

Step 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:

<script type="text/javascript">
jQuery.ias({
    container : '#cnt',
    item: '.artlistentry',
    pagination: '#cnt .paginate',
    next: '.page-next a',
    loader: '<img src="/img/loader.gif"/>'
});
</script>

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.

Step 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.

addendum

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.

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'.

addendum 2

Yes, it's working with content part pagination as well in (almost) the same manner.

License

When do I need a commercial license? You need a commercial license if you want to use this plugin on a website that sells anything License and download

english/other-enhancements/infinite_scolling.txt · Last modified: 2015/02/04 13:18 by Claus
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0

Strict Standards: Only variables should be passed by reference in /home/www/wiki/doku.php on line 79