Hi all,
Can you help offer insight on what is causing this error when trying to access page 2+ on the album pages?
`
PHP Notice: printField() invalid function call. in /zp-core/template-functions.php on line 1440
PHP Fatal error: Call to a member function getImages() on a non-object in /zp-core/template-functions.php on line 1968
`
Comments
Zenphoto: Zenphoto version 1.4.4.8 [4fd3c047c8] (Official build)
Interestingly enough it works on the default theme, but not working in this theme.
The call in the theme it's trying to do is
`<?php if (getNextPageURL()) { ?>">Next Page <?php } ?>`
Wondering if something is missing in the album.php logic?
Anyway if it is working in the distributed themes then it is an error in whatever theme you are using. Maybe if you identify it the author might step in.
Author is a bit MIA and since I'm customizing it anyways, I'm on my own. Can you point me to a solid rtfm on this?
Basically, you have tried those functions out of context.
I assume it's because when you're on page 2, there's no subfolders to load, so it just exits with error.
Is there a way to load the subfolder albums while on page 2+?
`
while (next_album()) {
?>
<?php
}
`
Of course, there may well be sub-folders on page 2 depending on how your pagination is setup and how many sub-folders there are.
There are functions such as isImagePage and isAlbumPage (the spelling of these may be wrong, this is from memory) that will tell you the context.
1. It's only displaying photos from the first subfolder on the main album view. It's not showing the root level photos at all, even when the URL is the root.
2. While in an album, the list is showing OTHER albums, is there a way to restrict it to show only the subfolders of the current album being viewed?
Many thanks
`printAlbumMenu('list',null,null,null,null,null,null,null,null,true,null);`
I want list, no count, no css (yet), no css (yet), no css (yet), no css (yet), no index name (default is fine), no first image link, keep top level album entry active, and no limit on truncation.
No where do I see "list only menu options for the current album" nor "show only pictures in first sub".
Please advise.
but my #2 issue still exists (seeing other albums when I don't want to). Only want to see the current subs.
The menu has nothing to do with ""show only pictures in first sub". It just lists the albums. All else you have to modify the theme.
Since all other albums will be private and hidden from clients, I don't want that to be shown
I'd rather not have public guests seeing albums they're not "supposed" to see. (if they stumble upon another album by luck (or because we've worked with them before), then I'm ok with it). Nothing confidential is being stored.
It's just to cut down on confusion.
If a visitor is viewing mysite.com/vendors/clientA, I don't want them to know about clientZ from clientA's album.
They should only be able to see the subfolders within the URL they're viewing - in this example, it's clientA.
It's not bulletproof security; because I don't need it to be. I just want to be able to silo the albums in an HTML subfolder list.
`
function sidebarFolderMenu() {
if (isAlbumPage()) {
if (next_album())
echo '
Collections
';while (next_album()) {
?>
<?php
}
}
}
`
This snippet seems to perform much better (and it's borrowed from the printAlbumMenu plugin).
`
function sidebarFolderMenu() {
global $_zp_current_album;
$albums = $_zp_current_album->getAlbums();
if ($albums) { // If there are subfolders, lets do something with them
echo '
Collections
';echo '
echo '
';- getAlbumLink(0))."' title='".html_encode($title)."'>".html_encode($title)."";
';foreach ($albums as $album) {
$topalbum = new Album(NULL,$album,true);
$title = $topalbum->getTitle();
$link = "
echo $link;
}
echo '
echo '
} else { // No subfolders to display, add some text on screen.
echo '
Collections
';echo "No collections in this view.";
}
}
`