Create a file "access.php" in plugins/fullsize_access. Each line needs to contain the following data:
<USER_ID> <ALBUM_ID>
(USER_ID and ALBUM_ID are separated by space). Example:
1 1
2 1
1 2
1 3
2 6
3 8
Now, replace the content of fullsize_check.php with this:
<?php
function fullsize_check_user() {
if (GALLERY_ADMIN_MODE) {
return true;
}
if (!USER_ID) {
return false;
}
global $CONFIG;
$superCage = Inspekt::makeSuperCage();
$pid = $superCage->get->getInt('pid');
$aid = mysql_result(cpg_db_query("SELECT aid FROM {$CONFIG['TABLE_PICTURES']} WHERE pid = $pid"), 0);
$access = file_get_contents('plugins/fullsize_access/access.php');
$access = str_replace("\r", "\n", $access);
$access = str_replace("\n\n", "\n", $access);
$lines = explode("\n", $access);
foreach ($lines as $line) {
$user_id = NULL;
$album_id = NULL;
list($user_id, $album_id) = explode(" ", trim($line));
if (USER_ID == $user_id && $aid == $album_id) {
return true;
}
}
return false;
}
?>
As you can see, I already added general access for the admin user and denied for unregistered users. If you don't like that, change it to your needs. Additionally, I removed the check for
$superCage->cookie->getInt($CONFIG['cookie_name'].'_agb')
as I wasn't asked to accept anything while testing. Of course it's possible to re-add this check, if needed. Just let me know.