ingh.am
ingh.am

Reputation: 26742

Displaying a mediawiki within a iframe

First off... I don't really want to use iframes but I don't think I have a choice in this situation.

I'm integrating some help docs into an already built system. The easiest thing for me to let other people write the help is to provide them with a mediawiki with a custom style, then to integrate this into the system I wanted to put a direct link to the mediawiki in a help tab.

The problem is, my mediawiki appears to block iframes from loading it (maybe this is a default setting) but I was wondering how to turn it off. I know my code is fine as it loads other sites!

Also can you do what I'm attempting to do with a div tag?

Thanks

Upvotes: 7

Views: 4287

Answers (2)

bawolff
bawolff

Reputation: 51

This is a configuration option and can be set in LocalSettings.php.
See $wgEditPageFrameOptions and $wgBreakFrames.

Be aware that this can open you up to certain "click-jacking" attacks.

Upvotes: 5

Yisela
Yisela

Reputation: 6961

The wiki doesn't normally allow you to do it, but there is a workaround:

To display the wiki in an iframe, you have to find the file "mediawiki-1.xx \ skins \ common \ wikibits.js "and comment out these two lines:

/ / A-trap us from framesets
if (window.top! = window)
window.top.location = window.location;

This is the code that doesn't allow the wiki to show. Seen in here.

Upvotes: 9

Related Questions