I have recently setup a coppermin gallery bridged to phpbb.
I would like to allow guests (non registered users) to view the slideshow of only 1 album while restricting guests to viewing only thumbnails for all other albums.
I am currently using the code below to restrict guests from viewing pictures but this is all or nothing.
Any suggestions??????
***
How can I let unregistered users see the thumbnails only, but not the actual pictures?
if (!USER_ID) cpg_die(ERROR, 'You need to register to access this page', __FILE__, __LINE__);
So you refered to the FAQ (http://coppermine-gallery.net/demo/cpg14x/docs/faq.htm#viewThumbnailsOnly)...
Not tested - should be something like
if (!USER_ID) {
if ($aid != 23) {
cpg_die(ERROR, 'You need to register to access this page', __FILE__, __LINE__);
}
}
Replacing "23" with the actual album ID that you want to allow.
As suggested, I haven't tested this - please post feedback.
Excellent Idea!
Dumb question. Where can I find the album ID for The album I want to open to the public?
Do I need to do an SQL query?
Replacing "23" with the actual album ID that you want to allow.
As suggested, I haven't tested this - please post feedback.
Go into the album with your web browser and then look at the address bar. You might need $_GET['album'] or $_GET['aid'] instead of $aid - depends where you use the code.
Works great !!!!
I added this code into displayimage.php
if (!USER_ID) {
if ($_GET['album'] != 2) {
cpg_die(ERROR, 'You need to register to access this page', __FILE__, __LINE__);
}
}
THANK YOU !!!!!!