In case anyone else wants to do this, I came up with a simple but restrictive change:
This simply only allows the Admin to set permissions for albums. Everybody has to use the defaults. Simple and restrictive. But good enough for my needs.
I modified this lind in albums.php:
<a href="#" onClick="<?php echo popup("album_permissions.php?set_albumName={$tmpAlbumName}")?>">[permissions]</a>
to read:
<?php if ($gallery->user->isAdmin()) { echo '<a href="#" onClick="'; echo popup("album_permissions.php?set_albumName={$tmpAlbumName}"); echo '">[permissions]</a>'; }?>
Then I modified a similar line in view_album.php to only include the admin in the if statement.... Just search for "[permissions]" (not including quotes) and modify the if statement to only be include the check for admin.
if ($gallery->user->isAdmin() ) {
$adminCommands .= '<a href="#" onClick="'.popup("album_permissions.php?set_albumName=" .
$gallery->session->albumName).
'">[permissions]</a>&nbsp;';
}
GOD I LOVE OPEN SOURCE!!! THANKS GALLERY GUYS!!!
The code is very readable. However, I'm sad that I had to make such a change in two place that basically print out the same thing!!!