Problems w/ preventing unregistered user viewing gallery... Problems w/ preventing unregistered user viewing gallery...
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Problems w/ preventing unregistered user viewing gallery...

Started by clayaikenfancom, October 18, 2005, 03:13:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

clayaikenfancom

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?

kegobeer

Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

clayaikenfancom

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.

Nibbler

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
*/

clayaikenfancom

I changed it and it still doesn't work!! I am logged out and everything. Ahhh. What else should I do?

clayaikenfancom

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
*/

Stramm