Extension:PhpTags/de-formal
<translate> This extension is currently not actively maintained!</translate> <translate> Although it may still work, any bug reports or feature requests will more than likely be ignored.</translate> <translate> If you are interested in taking on the task of developing and maintaining this extension, [[<tvar name=request>Special:MyLanguage/Gerrit/Privilege policy#Requesting Gerrit privileges</tvar>|you can request repository ownership]].</translate> <translate> As a courtesy, you may want to contact the author.</translate> <translate> You should also remove this template and list yourself as maintaining the extension in the page's <tvar name=extension>{{Extension }}</tvar> infobox.</translate> |
PhpTags Release status: unmaintained |
|
---|---|
Implementation | Tag , Parser function , Hook |
Description | Allows users to use the Magic expressions with PHP language syntax |
Author(s) | Pavel Astakhov (pastakhovtalk) |
Latest version | 5.5.0 (2015-11-20) |
MediaWiki | 1.25+ |
PHP | 5.3+ |
License | No license specified |
Download | |
phptag |
|
Quarterly downloads | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Public wikis using | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Translate the PhpTags extension if it is available at translatewiki.net | |
Issues | Open tasks · Report a bug |
The PhpTags extension implements the concept of Magic expressions with PHP language syntax that allows you to create and use compatible but not monolithic MediaWiki extensions, which greatly increases the convenience, flexibility and performance. More ...
Description
The PhpTags extension has its own the runtime environment PHP code which supports scalar types, arrays, variables, operators, control structures. It also supports constants, functions and objects but it does not implement any of them except for some language constructs.
When using a function, object or constant PhpTags calls corresponding extension. Therefore, a set of constants, functions, objects and actions that they produce only depend on additionally installed compatible extensions which can be found here.
PhpTags designed so to be as similar to native PHP, therefore you should have the illusion of direct execution PHP code although this never happens.
Usage
The code should be placed between the tags <phptag>
and </phptag>
. It can be located in any namespace if it is allowed by the variable $wgPhpTagsNamespaces
.
<phptag>
$foo = 'hello world';
echo ucfirst( $foo . "!!!\n" );
</phptag>
It will display:
Hello world!!!
ucfirst
is implemented in Extension:PhpTags Functions . More details can be found in the quick start guide.
Installation
- <translate> [[<tvar name=2>Special:ExtensionDistributor/PhpTags/de-formal</tvar>|Download]] and move the extracted <tvar name=name>
PhpTags/de-formal
</tvar> folder to your <tvar name=ext>extensions/
</tvar> directory.</translate>
<translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate>cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/PhpTags%2Fde-formal - <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
wfLoadExtension( 'PhpTags/de-formal' );
- File:OOjs UI icon check-constructive.svg <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
<translate> Vagrant installation:</translate>
- <translate> If using <tvar name=vagrant>Vagrant </tvar>, install with <tvar name=code>
vagrant roles enable phptags --provision
</tvar></translate>
Optional installation
- CodeMirror extension provides code highlighting in article editor
Additional installation
The PhpTags extension (core) implements magic expressions only and not, for instance, any PHP function.
For additional features such as functions, you can install additional extensions which are compatible with the magic expressions of the PhpTags extension.
The main extensions are:
- Extension:PhpTags Wiki - lets you query various data from MediaWiki core
- Extension:PhpTags Functions - contains many functions for data processing
- Extension:PhpTags Widgets - displays the data in different ways
Others are Extension:PhpTags SMW and Extension:PhpTags Storage .
Configuration parameters
Name | Description | Default |
---|---|---|
$wgPhpTagsMaxLoops | Maximum number of allowed loops | 1000 |
$wgPhpTagsNamespaces | Array of namespaces in which the PhpTags extension is allowed to use. Boolean true allows usage in all namespaces
|
true
|
$wgPhpTagsBytecodeExptime | Storage time of the compiled bytecode in cache (30 days) | 2592000 (30 days) |
- Pages with script errors
- Pages with broken file links
- Unmaintained extensions/de-formal
- Tag extensions/de-formal
- Parser function extensions/de-formal
- Hook extensions/de-formal
- Extensions with manual MediaWiki version
- Extensions with no license specified/de-formal
- Extensions in Wikimedia version control/de-formal
- All extensions/de-formal
- Extensions not in ExtensionJson
- Modifiable variables extensions/de-formal