News:

CPG Release 1.6.29
During HTML5 upload, keep pseudo blank code 200 messages from triggering error condition
added Russian language
correct failure to use theme menu icons in album manager
minor vulnerabilities mitigation

Main Menu

[Solved]: Help making a <a href> with referer, is this possible?

Started by net, March 22, 2008, 09:39:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

net

Hi,

I've added your documented "hack" in displayimage.php to tell users to register and login to view full image

if (!USER_ID) cpg_die(ERROR, 'You need to <a href=register.php><u>register</u></a> and <a href=login.php><u>login</u></a> to view this page', __FILE__, __LINE__);

This works great, but i saw that the true login button does refer to the actual page the user was on when he clicked the login button, so once hes logged on he will be kicked back to the image he was trying to display.

I checked include/themes.inc.php to see what code is done and it seems that i need to add "login.php?referer=$REFERER" however this does not seem to work in html, any clue how i could do it another way?

Nibbler


if (!USER_ID) cpg_die(ERROR, 'You need to <a href="register.php">register</a> and <a href="login.php?referer='.$REFERER.'">login</a> to view this page', __FILE__, __LINE__);


Should work.

net