Extension:NamespaceHTMLSCRIPT
Jump to navigation
Jump to search
![]() | This extension is currently not actively maintained! Although it may still work, any bug reports or feature requests will more than likely be ignored. |
NamespaceHTMLSCRIPT Release status: unmaintained |
|
---|---|
Implementation | Tag |
Description | Allows raw HTML & PHP include in specified namespaces |
Author(s) | Ike Hecht, modified by François Zajéga (frankiezafetalk) |
Latest version | 0.2 (January 2016) |
MediaWiki | 1.23+, likely earlier versions as well |
PHP | 5.3+ |
Database changes | No |
License | GNU General Public License 2.0 or later |
Download | NamespaceHTMLSCRIPT on bitbucket |
$wgRawHtmlScriptNamespaces |
|
<html> , <script> |
|
The NamespaceHTMLSCRIPT extension allows raw HTML & PHP includes in specified namespaces. It is based on the NamespaceHTML extension.
WARNING:
This extension allows editors to add plain PHP calls in content! Use carefully!
This extension allows editors to add plain PHP calls in content! Use carefully!
Usage[edit]
- Embed raw html within
<html>...</html>
tags. See this page for more information. - Embed php code within
<script>...</script>
tags.
- Example
<script> echo "NamespaceHTMLSCRIPT is activated"; </script>
Installation[edit]
- Download and place the file(s) in a directory called
NamespaceHTMLSCRIPT
in yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php:
require_once "$IP/extensions/NamespaceHTMLSCRIPT/NamespaceHTMLSCRIPT.php";
- Configure as required.
Note:
$wgRawHtmlScriptNamespaces= array();
must be set!
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.tt
Configuration[edit]
- $wgRawHtmlScriptNamespaces
- An array of namespaces where raw HTML should be enabled. See this page for more information about namespace constants. For example:
$wgRawHtmlScriptNamespaces = array( NS_PROJECT ); # allow raw HTML but only in the Project namespace
Todo[edit]
- Convert PHP output to HTML on save.
- Disable tag depending on usergroups