I just want to let you know that I have searched this forum for this mod and tried what I found and it didn't work. I am trying to make it so only registered users can view the full size pics. This is how I have my displayimage.php edited:
/**
if (!USER_ID) cpg_die(ERROR, 'You need to register to access this page', __FILE__, __LINE__);
* Local functions definition
*/
I log out and can still view everything full size. I also tried this mod:
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();
}
}
still not working. What am I doing wrong?
Try following the FAQ:
http://coppermine.sourceforge.net/faq.php#viewThumbnailsOnly
I already tried that one. Posted above is the exact code I edited in displayimage.php. Here is is again:
/**
if (!USER_ID) cpg_die(ERROR, 'You need to register to access this page', __FILE__, __LINE__);
* Local functions definition
*/
it should work but yet it doesn't.
There is no chance that will work, you added the code in the wrong place
if (!USER_ID) cpg_die(ERROR, 'You need to register to access this page', __FILE__, __LINE__);
/**
* Local functions definition
*/
I changed it and it still doesn't work!! I am logged out and everything. Ahhh. What else should I do?
This is now what I have and it still doesnt work:
if (!USER_ID) cpg_die(ERROR, 'You need to register to access this page', __FILE__, __LINE__);
/**
* Local functions definition
*/
in what file is this code?
you also can try http://forum.coppermine-gallery.net/index.php?topic=21332.0