Erweiterung:NamespaceHTML

This page is a translated version of the page Extension:NamespaceHTML and the translation is 50% complete.
MediaWiki-Erweiterungen
NamespaceHTML
Freigabestatus: ohne Wartung
Einbindung Tag
Beschreibung Erlaubt reines HTML in bestimmten Namensräumen
Autor(en) Ike Hecht (tosfosDiskussion)
Letzte Version 0.4 ()
Kompatibilitätspolitik Für jede MediaWiki-Version, die ein Long Term Support Release ist, existiert ein entsprechender Zweig in der Erweiterung.
MediaWiki 1.35, 1.39
Datenbankänderungen Nein
Lizenz GNU General Public License 2.0 oder später
Herunterladen
$wgRawHtmlNamespaces
<html>
Quarterly downloads 1 (Ranked 142nd)
Übersetze die NamespaceHTML-Erweiterung, wenn sie auf translatewiki.net verfügbar ist
Probleme Offene Aufgaben · Einen Fehler melden

The NamespaceHTML extension allows raw HTML in specified namespaces. It is intended to work just like the $wgRawHtml setting. The difference is that this extension allows specifying which namespace(s) should be able to contain raw HTML, which allows administrators to restrict raw HTML to namespaces with sufficient edit protections.

This extension was created for WikiWorks.

Verwendung

Embed raw html within ‎<html>...‎</html> tags. See Handbuch:$wgRawHtml for more information.

Als eine Vorlage

The extension allows inclusion from namespaces where HTML is allowed to namespaces where HTML is not. You can create a custom script namespace and allow HTML in that namespace. Then you can create pages in the script namespace that contain safe scripts which can be transcluded into any page.

Technically, you can use the #tag parser function to pass parameters to the template. See here for an example. However, it is a better idea to use the Widgets extension for that.

Widget examples

Installation

  • Die Erweiterung herunterladen und die Datei(en) in ein Verzeichnis namens NamespaceHTML im Ordner extensions/ ablegen.
    Entwickler und Code-Beitragende sollten stattdessen die Erweiterung von Git installieren, mit:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/NamespaceHTML
  • Folgenden Code am Ende deiner LocalSettings.php -Datei einfügen:
    wfLoadExtension( 'NamespaceHTML' );
    
  • Configure as required.
  •   Hinweis: $wgRawHtmlNamespaces = []; must be configured, see below.
  •   Erledigt – Navigiere zu Special:Version in deinem Wiki, um zu überprüfen, ob die Erweiterung erfolgreich installiert wurde.

Konfiguration

$wgRawHtmlNamespaces
List of the namespaces where raw HTML should be enabled. See this page for more information about namespace constants. For example:
# allow raw HTML but only in the Project: & User: namespaces
$wgRawHtmlNamespaces = [ NS_PROJECT, NS_USER ];

Siehe auch