Is there a way to make it so that only registered users can view the actual gallery pics, but everyone else can view thumbnails, searh, film strip, etc?
This is not in the design of coppermine. You could modify the display image page but it would require some php coding and it could still be curcumnavigated by someone who knew what they were doing.
Kevin
I wouldn't mind if someone who knew what they were doing could access the pics.
I just want to give incentive for someone to actually register, while at least letting them be able to see thumbnails/etc as a tease...
Okay then you will need to modify the php code for the displayimage page to require the registered user group. Sorry I don't have any use for this on my site so I have not looked farther, but I think it should be pretty easy.
Kevin
Does anyone know how I may edit displayimage.php in order to require the registered user group? :S
Edit displayimage.php and add
if (!USER_ID) cpg_die(ERROR, 'You need to register to access this page', __FILE__, __LINE__);
just before
/**************************************************************************
* Local functions definition
**************************************************************************/
The above post came directly from the FAQ. Always good to check out the resources available.
Thanks for the help guys, but strangely, it didn't work
I did manage to previously find this in the FAQ:
"How can I prevent unregistered user from viewing the gallery?
edit
displayimage.php and index.php and search.php and thumbnails.php
and search for
require('include/init.inc.php');
and add after it
if (USER_ID){
} else {
{
$redirect = $redirect . "login.php";
header("Location: $redirect");
exit();
}
}"
Which I only added to displayimage.php
I tried with that, didn't work, I tried seperately with the code listed above, didn't work, and I tried both of them together and it still didn't work.
(And yes, I remembered to be logged out each time!)
as suggested above: http://coppermine.sourceforge.net/faq.php#viewThumbnailsOnly
Quote from: GauGau on April 22, 2005, 08:16:54 AM
as suggested above: http://coppermine.sourceforge.net/faq.php#viewThumbnailsOnly
That one worked! thanks much, sorry for not being able to see this myself