one small question..(refer when loggin in) one small question..(refer when loggin in)
 

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

one small question..(refer when loggin in)

Started by hooch, September 30, 2004, 02:08:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hooch

hello!
i recently installed coppermines photogallery and then I modyfied displayimage.php so that you have to be registerd to click on a thumbnail.
So when you click on a thumbnail it says "Your have to Log In!" and i have made the Log In to a link to login.php :)

but i would like it to refer to the page the user tried to access. so when he logs in he comes to that paga directly..
i´ve seen that the "real" login button has that script but i want it on my "own" link..

can anyone help me? i assume that i shold write? login.php?referer=$REFERER..but something is missing?

so can anyone help me? :D

thanks in advance! /Gustav

Nibbler

Make sure $REFERER is available when you make the link, if you are inside a function you will need to global it. Posting a link and the code you have added/changed would be helpful.

hooch

in displayimage.php i have this line:

if (!USER_ID) cpg_die(ERROR, 'You have to <a href="login.php">log in</a> to reach this page!<br>
If you not are<a href="register.php"> registrered</a> tet? Do it now!!', __FILE__, __LINE__);


and my question is how to do if i want them to come to the right picture that they clicked on when they have logged in/registerd..

thanks in advance
/Gustav

Nibbler

if (!USER_ID) cpg_die(ERROR, "You have to <a href=\"login.php?referer=$REFERER\">log in</a> to reach this page!<br>
Not <a href=\"register.php\">registered</a> yet? Do it now!!", __FILE__, __LINE__);

hooch

worked very good!! ;D
thank you VERY much nibbler!
/Gustav