Extension:IframePage

The IframePage extension allows embedding an iframe into a special page. The iframe src is set in "LocalSettings.php" so that it does not pose a security risk. It is useful for embedding functionality from an external site and visually integrating it as if it was contained in the wiki.

Configuration

 * $wgIframePageSrc
 * An associative array containing the iframe src. Mandatory.
 * The key in this array is expected to be a simple string that will be used as the title of a subpage of . The value should contain the actual iframe src URL.
 * The key can be omitted. That is because navigating to  will simply pull the URL contained in the first value in the   array.


 * $wgIframePageAllowPath
 * Defaults to . If set to , it allows passing a parameter using  . The path value will be appended to the URL contained in.

Examples
These examples are described using YouTube or Vimeo and are just for illustration.

Simple example
In this case, navigating to  or to   will display a video with the ID specified in the   array.

Example using a path
In this case, navigating to  or to   will cause a YouTube error, since no ID was specified. You can send an ID by specifying the path. For example, you can navigate to  to see the above video. Or substitute the path with any YouTube video ID.

Alternatively, to see a Vimeo video, navigate to, substituting the path with any Vimeo ID.

Including on another page
It is possible to include the IframePage on another page. Use  when editing the page.

If you need to pass in the url then use pipes the same way you would for other mediawiki templates:

or

Adding rel=nofollow
To keep search engines from crawling the external websites, as most iframes will be external websites, this can be done a few ways. The recommended option is editing the SpecialIframePage.php and adding to the $html .= Html::element array so the last two lines of the array look like this: 'height' => '100%' , 'rel' => 'nofollow' Note: there must be a comma at the end of the previous "height" array. The second option is to add disallow: /Special:IframePage to your robots.txt file in the wiki installation directory. This is the less preferable option as the entire page will not show up in the search enginge results rather than the links within the iframe.