forum.coppermine-gallery.net
Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: hooch on September 30, 2004, 02:08:19 pm
-
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
-
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.
-
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
-
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__);
-
worked very good!! ;D
thank you VERY much nibbler!
/Gustav