Pages: 1
I've looked for the past couple hours now, and either I'm just not looking hard enough or I skipped over the answers so please forgive me if this has been posted before.
But Basically, what I would like to do is add the pagination to the top of the page while inside an album. Several of my users have complained to me that constantly having to press the end key or scroll down to the end of the pages just to get to the next/previous page of images is getting rather tiresome.
And I sort of have to agree, and to satisfy them(and save myself from complaints) I'd like to add it to the top, above the thumbnails.
I'll add a screen shot of what I mean
Is this possible, has it been done before? If so I would really appreciate a link or an explanation.
P.S: wasn't totally sure what tags I should have selected, so I used categories and configuration.
Last edited by JakobieH (2012-06-27 12:41:31)
Offline
Sorry for double posting, forgot to include my version: 2.3.5
I would update to 2.4, but a)I'm waiting for all the plugin creators to get time to update and make them compatible and b) Due to a string of bad luck with my webhost.. I'm just paranoid at the moment something would go wrong.
Offline
Hi,
use LocalFilesEditor to create a personal plugin with this content :
<?php /* Plugin Name: Add Navbar on top Version: 1.0 */ add_event_handler('loc_end_index', 'top_navbar'); function top_navbar() { global $template; $template->set_prefilter('index', 'top_navbar_prefilter'); } function top_navbar_prefilter($content, &$smarty) { $search = '{if !empty($CATEGORIES)}{$CATEGORIES}{/if}'; $add = '{if !empty($navbar)}{include file=\'navigation_bar.tpl\'|@get_extent:\'navbar\'}{/if}'; return str_replace($search, $add.$search, $content); } ?>
Offline
hah success! Thank you very much.
Offline
I know this is a very old post, but it's the only one I can find on the topic.
The suggested plugin for this doesn't seem to work in the latest version of Piwigo.
Does anyone know how to make it happen?
Offline
Hi :-)
you can test
<?php /* Plugin Name: Add Navbar on top Version: 1.0 */ add_event_handler('loc_end_index', 'top_navbar'); function top_navbar() { global $template; $template->set_prefilter('index', 'top_navbar_prefilter'); } function top_navbar_prefilter($content, $smarty) { $search = '{if !empty($CATEGORIES)}{$CATEGORIES}{/if}'; $add = '{if !empty($navbar)}{include file=\'navigation_bar.tpl\'|@get_extent:\'navbar\'}{/if}'; return str_replace($search, $add.$search, $content); } ?>
Offline
Unfortunately that didn't work. I'm using the Modus theme. Maybe I need to make a test site with the default Piwigo theme and see if it shows up there.
Offline
Hi :-)
you can test
<?php /* Plugin Name: Add Navbar on top Version: 1.0 */ add_event_handler('loc_end_index', 'top_navbar'); function top_navbar() { global $template; $template->set_prefilter('index', 'top_navbar_prefilter'); } function top_navbar_prefilter($content) { $search = '{if !empty($CATEGORIES)}{$CATEGORIES}{/if}'; $add = '{if !empty($thumb_navbar)} {include file=\'navigation_bar.tpl\'|@get_extent:\'navbar\' navbar=$thumb_navbar} {/if}'; return str_replace($search, $add.$search, $content); } ?>
Offline
Sorry, still not working. It must be something I have done with other plugins or customization. When I try a default installation I will know more. Thank you for trying. :)
Offline
Thought I'd try that myself but something's gone very wrong... as soon as I hit save on the local file editor then refreshed the site (Bootstrap Darkroom), it's basically stopped working completely and now gives HTTP 500 errors (admin page doesn't work either)
Any ideas, ddtddt?
What file(s) do I need to overwrite via FTP to get things back working again?
####
Edit: ignore the above, found it.
Replacing config.inc.php with the .bak version did it.
Haven't a clue what's in that code that caused such a calamity though, my coding isn't that advanced! :)
Last edited by rjpp (2021-11-02 20:58:43)
Offline
Pages: 1