Embedding my forum into a site

Started by ktm450ds, July 22, 2014, 12:30:15 PM

Previous topic - Next topic

ktm450ds

I have a question about embedding my smf into my main website. I have had it this way for a few years not and then I did an upgrade and now it won't work. I tried to go back to the old version and still no luck. The way I have the forum embedded is using iframe like this <iframe src="http://www.knobbytalks.com/index.php?" width="800" Height="600"></iframe>

Is there a security or something going on that would give me this issue of a blank screen? The main site is www.usdualsports.com and the forum link is on the main nav bar if you want to see what going on.

Thanks

Arantor

Yes there is a security change added in the last couple of versions specifically to limit frames and things like clickjacking.

It's really not recommended since on most configurations it can affect session handling.

ktm450ds

Thanks for the update is there anyway or is it just to unsafe.

Arantor

Well, you could remove the line of code I added in index.php to change it (look for X-Frame-Options) but it's better not to integrate that way if you can help it.

ktm450ds

I went to my index.php and don't see that code.

Arantor

Trust me, it's in there. I know, I put it there.

header('X-Frame-Options: SAMEORIGIN');

ktm450ds

Oh trust me I believe you I just can't seen to figure out where it is. I'm going crazy over here to many files.

Arantor

Line 105 or thereabouts in a default install.

ktm450ds

Ok so go to Admin then theme settings then default theme, then index.php correct?

Arantor

No, you can't edit it from the admin panel, as it's not in the theme, it's the master index.php that everything runs through.

ktm450ds

Found it and thank you very much for your help.

Kindred

do note.. even aside form being potentially unsafe... there is a very good chance that it won't work correctly period... because iframes mess with sessions.  There are a dozen better ways to integrate the forum/site rather than use iframes
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

ktm450ds

Quote from: Kindred on July 22, 2014, 11:42:56 PM
do note.. even aside form being potentially unsafe... there is a very good chance that it won't work correctly period... because iframes mess with sessions.  There are a dozen better ways to integrate the forum/site rather than use iframes

Do you mind pointing me in the correct direction?

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: