PHPackages                             mediawiki/iframe-tag - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. mediawiki/iframe-tag

ActiveMediawiki-extension

mediawiki/iframe-tag
====================

1.1.1(2y ago)21.4k5[3 issues](https://github.com/hexmode/mediawiki-iframe/issues)[3 PRs](https://github.com/hexmode/mediawiki-iframe/pulls)gpl-3.0PHPPHP &gt;=7.3CI passing

Since Apr 17Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/hexmode/mediawiki-iframe)[ Packagist](https://packagist.org/packages/mediawiki/iframe-tag)[ RSS](/packages/mediawiki-iframe-tag/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (7)Versions (10)Used By (0)

MediaWiki IFrameTag extension
=============================

[](#mediawiki-iframetag-extension)

This extension allows you use [iframe](https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-iframe-element) tags in your wiki and makes some attempt to validate the URLs being embedded in iframes. Your wiki admins will be able to use a page in the MediaWiki namespace to update the list of allowed URLs.

As of this writing, only the following attributes are supported:

 srcAddress of the resource heightVertical dimension widthHorizontal dimension allowfullscreenWhether to allow the iframe’s contents to use [requestFullscreen()](https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen) sandboxControls the restrictions applied to the content embedded in the iframe styleThis is the only [global attribute](https://www.w3.org/html/wg/spec/elements.html#global-attributes) that is supported. It is implemented via the base [tag builder class](https://packagist.org/packages/nichework/tag-builder).Configuring the allowed hosts
=============================

[](#configuring-the-allowed-hosts)

Currently, host name matching is done based on the full domain name. If a list of names is allowed hosts is given in the configuration and the host in the `src` attiribute of the `iframe` tag is not on the configured list of hosts, then the `iframe` tag is not shown on the wiki.

There are two methods for configuring permissible domains.

On Wiki configuration
---------------------

[](#on-wiki-configuration)

This method is enabled by default, but if you do not want your administrators changing the list of allowed domains, you can set `$iFrameOnWikiConfig` to false:

```
$iFrameOnWikiConfig=false;
```

If you leave the method enabled, people with the [editsitejson](https://www.mediawiki.org/wiki/Manual:User_rights#List_of_permissions) (administrators and interface administrators by default) will be able to change the value of `[[MediaWiki:IFrame-cfg.json]]`. To authorize the only three domains, the following would be used:

```
{
    "domains": [
        "one.example.com",
        "two.example.com",
        "two.example.com"
    ]
}
```

PHP Configuration
-----------------

[](#php-configuration)

This is the familiar “set a PHP variable in your `LocalSettings.php`” method.

In your `LocalSettings.php`, add a setting for the variable `$iFrameDomains` that contains an array of domains that are allowed. For example:, to authorize the same three domains as are in the above wiki configuration.

```
$iFrameDomains = [
	   'one.example.com',
	   'two.example.com',
	   'three.example.com'
];
```

How the tag is parsed
=====================

[](#how-the-tag-is-parsed)

The `src` attribute is parsed using PHP’s [parse\_url](https://www.php.net/parse_url). The schema is [verified as safe](https://github.com/hexmode/mediawiki-iframe/blob/9fefe2141e3c664f4caef48c868624e34d5de8e0/src/Handler.php#L104) (only `http`, `https` and `ftp` are allowed), the URL’s domains are checked against a list of allowed urls (if specified), any specified port is added, as is any path, query string (the part following `?`) or fragment (the part following `#`).

If problems are found with when parsing the iframe tag attributes, that attribute is skipped, notes about what went wrong are they are inserted into the page output as HTML comments.

If the `src` attribute has a problem, then the iframe tag is skipped and the author will have to check the html source to find any problems.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~153 days

Recently: every ~228 days

Total

7

Last Release

940d ago

PHP version history (2 changes)1.0.1PHP &gt;=7.4

1.0.2PHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/091004c4b32e573a26383800e11030fc01201119f53a8fa6886aa34e80edb42d?d=identicon)[hexmode](/maintainers/hexmode)

---

Top Contributors

[![hexmode](https://avatars.githubusercontent.com/u/43581?v=4)](https://github.com/hexmode "hexmode (32 commits)")[![chigley](https://avatars.githubusercontent.com/u/1202682?v=4)](https://github.com/chigley "chigley (1 commits)")[![cscott](https://avatars.githubusercontent.com/u/156080?v=4)](https://github.com/cscott "cscott (1 commits)")[![Minionguyjpro](https://avatars.githubusercontent.com/u/66115754?v=4)](https://github.com/Minionguyjpro "Minionguyjpro (1 commits)")[![olena-stoliarova](https://avatars.githubusercontent.com/u/28828146?v=4)](https://github.com/olena-stoliarova "olena-stoliarova (1 commits)")

###  Code Quality

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mediawiki-iframe-tag/health.svg)

```
[![Health](https://phpackages.com/badges/mediawiki-iframe-tag/health.svg)](https://phpackages.com/packages/mediawiki-iframe-tag)
```

###  Alternatives

[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k15.7k5](/packages/elgg-elgg)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[johnbillion/user-switching

Instant switching between user accounts in WordPress and WooCommerce.

19768.3k2](/packages/johnbillion-user-switching)[rainlab/blog-plugin

Blog plugin for October CMS

17257.7k](/packages/rainlab-blog-plugin)[rainlab/user-plugin

User plugin for October CMS

11954.3k13](/packages/rainlab-user-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
