Like many others on this forum I also wanted to have pagination in Phocagallery plugin.
So I started digging around and finally made a working patch.
Joomla has system article pagination so why not using it for our plugin?
My pagination works like:
{phocagallery view=category|categoryid=2|pagination=30}
It is very simple and I wonder why it wasn't implemented yet.
Follow these instructions in order to make it work.
1. Enable Content - Page Break in Joomla>Extensions>Plugins.
I recommend disabling Article Index Heading and Table of Contents in Plugin settings in order not to break your layout design.
2. Edit /plugins/content/phocagallery/phocagallery.php
3. Around line 105 just after
Code: Select all
$cssSbox = '';
Code: Select all
$counter=0;
4. Around line 159 just after
Code: Select all
$padding_box = $paramsC->get( 'padding_box', 5);
Code: Select all
$pagination = $paramsC->get( 'pagination', 0);
5. Around line 270 just after
Code: Select all
else if($values[0]=='hsclosebutton') {$highslide_close_button = $values[1];}
Code: Select all
else if($values[0]=='pagination') {$pagination = $values[1];}
6. Around line 765 just after
Code: Select all
foreach ($category as $image) {
Code: Select all
if ($pagination > 0) {
if($counter == $pagination) {
$output .= '<hr class="system-pagebreak" />';
$counter = 0;
}
$counter++;
}
That's it. You are ready to go and use default Joomla pagination for Phocagallery plugin inside article.
You just need to set pagination value in your article like this:
Code: Select all
{phocagallery view=category|categoryid=2|pagination=30}
Enjoy and have fun.