Jakeman
08-10-2002, 10:29 AM
here is what i want to do. i want to put my forum content table into an iframe (like this site (http://www.lionhead.com/boards/)). i was experimenting with this earlier. the iframe needs to have a src for the page that will be displayed in the iframe... it's not like a table where you just place the content between the table tags. i need a variable for the url of the current page for the src of the iframe. i'm going to setup a condition so the surrounding header, footer and iframe will be generated if the HTTP_REFERER is not from my site, otherwise when a user clicks a link on another site that goes to a thread on my forums then the surrounding content and iframe won't already be generated... only the contents of what would be the iframe will be shown which is what i want to prevent. and so my questions are...
1) is there a variable (http header variable perhaps?) for the url of the current page that i can use in my templates (or define in the script and then use in my templates)? example, you click on the link http://www.vbulletin.org/ and the variable would contain the string value "http://www.vbulletin.org/" when the page is loaded.
2) how do i check the HTTP_REFERER string for another string? example, HTTP_REFERER = http://www.macsubculture.com/forum/forumdisplay.php?s=&forumid=1 . i need to check if that string value contains the string "macsubculture.com" to see if the link came from my site to see if the iframe needs to be generated, otherwise the iframe will already be there. or is there an easier method for checking this?
i am trying to explain myself the best i can. i started by explaining what i want to do so you guys can set me straight if i'm making things too complicated. ;)
1) is there a variable (http header variable perhaps?) for the url of the current page that i can use in my templates (or define in the script and then use in my templates)? example, you click on the link http://www.vbulletin.org/ and the variable would contain the string value "http://www.vbulletin.org/" when the page is loaded.
2) how do i check the HTTP_REFERER string for another string? example, HTTP_REFERER = http://www.macsubculture.com/forum/forumdisplay.php?s=&forumid=1 . i need to check if that string value contains the string "macsubculture.com" to see if the link came from my site to see if the iframe needs to be generated, otherwise the iframe will already be there. or is there an easier method for checking this?
i am trying to explain myself the best i can. i started by explaining what i want to do so you guys can set me straight if i'm making things too complicated. ;)