Announcement

  •  » Requests
  •  » Request: Previous/Next Album Navigation

#1 2012-12-20 12:34:33

miblo69
Member
Stockholm, Sweden
2012-06-05
26

Request: Previous/Next Album Navigation

Hi,

I would like to add an additional navigation feature, on the top of each album page, to be able to select the 'Next' Album, or the Previous Album. This would make it much easier to swiftly browse through a large set of albums.

Without this feature, you need to go up one level to view the parent album, and then go down and select the child album. And then up again to go down.... So to speak.

I understand this can be done with a Template, and I have found  the place in Index.tpl (using the default theme) where the code should be added. But I am unaware of how to retrieve the information on which albums is the previous/next, based on the album I am currently viewing.

Attached is a mock-up screenshot on how I want the navigation to work.

"Prev" should be a link to " /Blomgren / 1997"
"Next" should be a link to " /Blomgren / 1999 "

Any pointers on how to get this info would be greatly appreciated!

~Mike

Offline

 

#2 2012-12-20 14:50:05

flop25
Piwigo Team
2006-07-06
6975

Re: Request: Previous/Next Album Navigation

Hello
you're right retrieve which album is next/previous requires a mysql request
sry I don't have time for that kind of dev Until you have knowledge on that or someone else with time develop it, could you open a ticket in our bugtracker ? http://piwigo.org/bugs/bug_report_advanced_page.php thx
that's an interesting idea


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#3 2012-12-20 16:17:39

miblo69
Member
Stockholm, Sweden
2012-06-05
26

Re: Request: Previous/Next Album Navigation

Done. Mantis 2812.

All I need is the SQL or pwg_function to retrieve the Next/Previous Album (using the current Sort Order of couse). Once done, I can probably figure out how to implement it in the index.tpl.

Thanks,
~Mike

Offline

 

#4 2014-01-14 14:03:30

miblo69
Member
Stockholm, Sweden
2012-06-05
26

Re: Request: Previous/Next Album Navigation

Bump. Any ideas on how to write the Previous Album/Next Album Query? (see my original request above)

Thanks,
~Mike

Offline

 

#5 2014-01-14 14:09:59

flop25
Piwigo Team
2006-07-06
6975

Re: Request: Previous/Next Album Navigation

hi
as far as i remmeber you might try to search in the global variable like $page or in the template variable set


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#6 2015-01-19 17:59:47

miblo69
Member
Stockholm, Sweden
2012-06-05
26

Re: Request: Previous/Next Album Navigation

I coded it as a plugin. With the help of the skeleton plugin, I figured out a way to solve it without modifying the templates.

[extension by miblo69] PrevNext

Cheers,
~Mike

Offline

 

#7 2016-03-17 09:47:36

netizen
Member
2015-03-23
3

Re: Request: Previous/Next Album Navigation

Hi

Can you (or someone) fix it for 2.8?

Fatal error: Uncaught Error: Cannot use object of type PwgError as array in /home/gallery/plugins/prevnext/include/public_events.inc.php:41 Stack trace: #0 /home/gallery/include/functions_plugins.inc.php(279): prevnext_add_button() #1 /home/gallery/index.php(364): trigger_notify('loc_end_index') #2 {main} thrown in /home/gallery/plugins/prevnext/include/public_events.inc.php on line 41

[Edit: error data]

Last edited by netizen (2016-03-17 10:17:34)

Offline

 

#8 2016-03-22 09:37:56

miblo69
Member
Stockholm, Sweden
2012-06-05
26

Re: Request: Previous/Next Album Navigation

I saw the error too after upgrading. I will attempt a fix, but if anyone has an idea on what changed between 2.7 and 2.8 - pls let me know.

Offline

 

#9 2016-03-22 12:05:56

flop25
Piwigo Team
2006-07-06
6975

Re: Request: Previous/Next Album Navigation

in the zip [extension by miblo69] PrevNext there is two main.inc!


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#10 2016-07-13 12:18:12

miblo69
Member
Stockholm, Sweden
2012-06-05
26

Re: Request: Previous/Next Album Navigation

Fixed the issue, so it's now compatible with 2.8.

Removed extraneous files.

Offline

 

#11 2016-09-22 10:50:50

MacGeol
Member
2016-08-23
22

Re: Request: Previous/Next Album Navigation

Hi miblo69,

I was interested in this previous/next tool too.
So i have installed the plugin you made. Thanks for it!

But i'm a french user.
So I add multilingual support (english and french).

If you are interested about this improvement of your code, I can transmit you the files.

Note : it seems that many code lines and files are unused in your plugin. I think a big clean up of the code would be really opportune...

Cheers

MacGeol

Offline

 

#12 2020-06-29 21:15:13

racoonradio
Member
2020-06-23
2

Re: Request: Previous/Next Album Navigation

Hello I tried the extension with the latest version of Piwigo 2.10.2 with the default theme. But i couldn't get it working.  Does it work with the current version and standard template. If so what do i need to do?

Offline

 

#13 2020-07-01 09:45:26

miblo69
Member
Stockholm, Sweden
2012-06-05
26

Re: Request: Previous/Next Album Navigation

Hi,

Wow, I am surprised yet pleased that  there still is an interest in this Plugin :)

I haven't updated it in years, and I use it with the 'elegant' theme where it works well in 2.10.2.

For other themes, I don't know. And I don't really have the time/knowledge/know-how to quickly have a look and change the code, if needed.

Sorry.

Offline

 
  •  » Requests
  •  » Request: Previous/Next Album Navigation

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2020 · Contact