forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: jaus on November 14, 2013, 04:48:07 pm
-
I would like to create some albums that would contain images that can be viewed as a result of a search, but would not appear on the index page as albums that can be selected for browsing. I don't see a configuration that would hide such albums from view (yet still allow guests to see the images within as a result of a search). Is there a plug-in, or hack, available that could do this?
-
If the images in those albums can only be found as a result of a search, wouldn't it be enough to upload them all in one album and hide just that album?
However, there's no plugin that does what you ask for as far as I know, but it should be quite easy to create a mod (maybe it even already exists).
-
Yes, one album would work. More than one might facilitate recordkeeping and upkeep of the gallery.
If anyone has an idea please post. The only thought I had was to create the album(s), find ithe album numbers by browsing the table, and then hack the category display to skip those album numbers. But I'm not a php coder so that might be problematic.
-
I suggest to create/move that "hidden" album to the root category of Coppermine (* no category *). Then, open index.php, find
if (!empty($FORBIDDEN_SET) && !$cpg_show_private_album) {
$album_filter = ' ' . str_replace('p.', 'a.', $FORBIDDEN_SET);
//unused code {SaWey}
//$pic_filter = ' ' . $FORBIDDEN_SET;
}and below, add
$album_filter = ' AND a.aid != 123';(don't forget to replace the album ID with your album's ID).
-
Like this?
if (!empty($FORBIDDEN_SET) && !$cpg_show_private_album) {
$album_filter = ' ' . str_replace('p.', 'a.', $FORBIDDEN_SET);
//unused code {SaWey}
//$pic_filter = ' ' . $FORBIDDEN_SET;
}
$album_filter = ' AND a.aid != 123'
If I used more than one such album, would the last line work like this:?
$album_filter = ' AND a.aid != (123||456||789)'
-
If I used more than one such album, would the last line work like this:?
$album_filter = ' AND a.aid != (123||456||789)'
Use
$album_filter = ' AND a.aid NOT IN (123, 456, 789)';
-
Works fine, thanks.