A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:HTMLets below:

Extension:HTMLets - MediaWiki

This extension is currently not actively maintained! Although it may still work, any bug reports or feature requests will more than likely be ignored.

If you are interested in taking on the task of developing and maintaining this extension, you can request repository ownership. As a courtesy, you may want to contact the author. You should also remove this template and list yourself as maintaining the extension in the page's {{Extension }} infobox.

The HTMLets extension provides a way to include (inline) static HTML snippets into wiki pages.

Includes HTML snippets into wiki pages without changing the default setting of $wgRawHtml . Snippets are located in files in a special directory on the web server. This addresses the demand for a simple way to insert special JavaScript code, an ‎<iframe>, or an HTML form, without allowing users to insert arbitrary and potentially harmful code.

Including a HTML snippets is done using a special tag, ‎<htmlet>. For example, if you put this on a wiki page:

This will include the contents of the file foobar.html from the htmlet directory. If the snippet may change often, and you want those changes reflected on the wiki page right away, you can tell HTMLets to disable the parser cache for this page:

<htmlet nocache="yes">foobar</htmlet>

The htmlet directory can be configured using $wgHTMLetsDirectory; it defaults to "$IP /htmlets", i.e. the directory htmlets in the installation root of MediaWiki; but note that if you follow the instructions given above for adding code to your LocalSettings.php file, the htmlet directory will be set to "$IP/extensions/HTMLets". $wgHTMLetsDirectory may also refer to a place on a webserver, for example, you can set it to http://localhost/htmlets/, if you provide htmlets in that location - note that the .html ending is enforced, query strings are not allowed in the htmlet's name.

Parser issues and hacks[edit]

Currently, the MediaWiki parser doesn't leave the output of parser hooks alone as it should (T10997). This means that the HTML from your snipped file would be mangled under some circumstances (for example, if it contained indented or blank lines).

As of revision 19966, HTMLets works around this by supplying "hack modes". Which hack is applied can be controlled using the hack attribute for the ‎<htmlet> tag, the global default can be set using the $wgHTMLetsHack setting in LocalSettings.php. The following values are defined (the first is the name to use with the hack attribute, the second is the constant name to use in LocalSettings.php):


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4