Subalbum Admin (sort of)

I have managed to get a semblance of subalbum administration added to my theme. I placed the following code in the footer section of alblum.php:

<?php
global $_zp_current_album;
if (zp_loggedin()) {
echo ' · ';
printLink(WEBPATH.'/zen/admin.php?page=edit&album=' . $_zp_current_album->name . '/', 'Edit Album', NULL, NULL, NULL);
}
?>

This gives me a link to edit the subalbum. Sorting the album appears to work, but doesn’t “stick” and “« back to the list” takes you to the admin edit page (as you might expect.) But you can change the thumbnail for the subalbum and edit the image titles and descriptions, so it is useful.

Comments

  • Well, HTML got me. the echo ' . ' really has the middot HTML code.
  • Turns out subalbum image sorting does work. The problem I had was solved when I removed the Thumbs.db file that got copied along with the images. Guess image sorting gets confused by the extra file.
  • Your hack is great for editing subalbum's name and arrange photo within the subalbum.
    How can I sort the subalbums ?
  • There is a full subalbum admin patch on ticket #6 in the WIKI
    http://www.zenphoto.org/trac/ticket/6

    This will allow the sorting. Otherwise you have to use phpMyAdmin to set the sort_order field directly.
Sign In or Register to comment.