在 iframe 中显示 mediawiki
首先...我真的不想使用 iframe,但我认为在这种情况下我别无选择。
我正在将一些帮助文档集成到已经构建的系统中。对我来说,让其他人编写帮助的最简单的事情就是为他们提供具有自定义样式的 mediawiki,然后将其集成到系统中,我想在帮助选项卡中放置指向 mediawiki 的直接链接。
问题是,我的 mediawiki 似乎阻止 iframe 加载它(也许这是默认设置),但我想知道如何将其关闭。我知道我的代码很好,因为它加载了其他网站!
你也可以做我试图用 div 标签做的事情吗?
谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
wiki 通常不允许您这样做,但有一个解决方法:
要在 iframe 中显示 wiki,您必须找到文件“mediawiki-1.xx \ Skins \ common \ wikibits.js”并注释掉这两行:
这是不允许 wiki 显示的代码。
请参见此处。
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:
This is the code that doesn't allow the wiki to show.
Seen in here.
这是一个配置选项,可以在 LocalSettings.php 中设置。
请参阅 $wgEditPageFrameOptions 和 $wgBreakFrames。
请注意,这可能会让您遭受某些“点击劫持”攻击。
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.