The core of Zenphoto is class based. You basically have to loop through all albums recursively via the gallery class and then album class on each.

You could also get all album names from the database directly but you still need to create album objects and check on them as you otherwise will bypass publish status or protection which is inherited from parents.

I have not found a function to grab all image filenames in subfolders from a parent folder.

Create an album object for an album and get its images via the appropiate method getImages() is the way to do that. Again you have to do this recursively for further levels by using the getAlbums() method of the album object.

Note that you your code does not check for the publish state of the images and getAllSubAlbumIDs() does not check for protection, publish state or if this is a user's album either. You have to use the objects and the related methods as well. Use the function getItemByID() to get an oject from those ids.

Again you should extend the plugin class either theme based or via an additional plugin and modify any method of the original class you need different.

I understood that differently. In a parent album, where there are only sub albums, getAlbums() will deliver the subalbums. In a parent album where there are only subalbums, getImages() = NULL. Everything always works only on the current album. There is no function getImages('any-album'), but only getImages('current-album').

I understood that differently. In a parent album, where there are only sub albums, getAlbums() will deliver the subalbums. In a parent album where there are only subalbums, getImages() = NULL. Everything always works only on the current album.

Yes, but I am not talking about the standard template functions that are procedural.

There is no function getImages('any-album'), but only getImages('current-album').

No, you have to use the object model for that which then provides methods to do that.
Please don't confuse procedural general template functions with class methods. There are sometimes similar named in both.

I hang. How do I get the latitude and longitude of an image? $imageobject["data"]->EXIFGPSLatitude$imageobject->getImageGeodata()getImageGeodata($imageobject)$imageobject->getGeoCoord()getGeoCoord($imageobject)
don't work by me.

Of course not, it its either dependend on the current album or you have to pass one.

To get all albums try this:

$toplevelalbums = $_zp_gallery->getAlbums(0);
$albumlist = array();
foreach($toplevelalbums as $album) {
$obj = newAlbum($album);
$albumlist[] = $obj->getID();
// getAllAccessibleAlbums() should assign to $albumlist, it assigns IDs
// only so you need to create objects later again to get their images - other than
// getAllAlbums() this does check for access etc.
getAllAccessibleAlbums($obj);
}

Thank you vincent, but I did not want to use Google Maps anymore, but OSM (and preferably with OpenLayer instead of Leaflet).

It now works with the OSM plugin. An overview in the index.php, an overview in parent albums in the album.php. But there is a problem. As soon as I want to display thumbs in the index.php OSM, there is server timeout. It loads too long. Even larger parent albums and sub-albums load very long. This blocks the page.
Can you speed up the loading?

You have to go through a lot of data and you have to load a lot of thumbs that also need to be generated (if you haven't precached them).
I recommend that you try Vincen'ts trick with the dynamic album. It might indeed be faster.

and preferably with OpenLayer instead of Leaflet

You can of course create your own custom plugin to use that. I choose LeafletJS because I like it better.

my tips is to create a map in a page.
basic doesn't support zenpage plugin, so it isn't the rigth way.

where do you add your code? in album.php page?
do you want to have a map only for this dynamic album or for all albums with geotaggued pictures?

in case of you want to have a map only for this dynamic album:
-duplicate album.php (album.php and album_map.php)
-in album.php: remove all code with openstreetmap plugin
-in album_map.php: only add (wherever you want in your code) this code printOpenStreetMap().
for example, you may remove all code to display subalbums and pictures and then you will have only your map)
-in admin>plugin: enable multiple_layouts plugin and check that multiple layouts is enabled for 'album'
-in admin>albums>your_dynamic_album, choose album_map as album layout.

just tested OK with googlemap plugin, but it should be something very similar with zp_OpenStreetMap.

Ok, that works better with album_map.php and multiple_layouts. So I have that in my gallery3.

I do not really need it for every parent album and subalbum.

Now I have some questions.
1.) This dynamic album should not appear in the index page. How can I hide it? I just want to insert a link to this page in the header.

2.) How can I remove the title and description in the popups? I just want to show the thumbs with image page link.

3.) Can I now disable Latitude and Longitude in search settings? That should not be generally available.

There is a big problem with using the search for the map. The result is Double Content/Duplicate Content, which Google punishes with down-ranking. The links in the popups and the page URLs have the following structure: example.com/fotomap/PICT0001.JPG
This is very bad.
Info: https://support.google.com/webmasters/answer/66359?hl=en
What can you do there?

If you are within a dynamicalbum the image pages have the url of that dynamic album. Otherwise it is complicated and confusing, to stay in album context and for visitors if the url constantly changes. That's why there is the canonical url option of the html meta tags plugin…

preg_replace('/^\/albums/', "", $image->webpath) . "

Don't understand this. This is an image page url that is not supposed to include the albums folder.

If you don't want that you need to return to the original more complicated solution.

Images in search results are always dynamic albums. But albums in search results link to the original, there is nothing dynamic.

I know that with the independent (dynamic) albums and it has its advantages. And dynamic albums are independent of what I want.

I'm just looking for a way to break this process. Currently, the maps are in a dynamic page that consists of a search result. In search results albums are linked autonomous. How can I achieve this with images in search results?

Which original more complicated solution?
The maps directly in the startpage is bad because the page has too long load times (20 seconds and more).