Extension:SelectTag/pl

From Linux Web Expert

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Podręcznik rozszerzeń MediaWiki
SelectTag
Status wydania: stabilne
Realizacja Funkcja parsera
Opis Adds customisable ‎<select> for inserting text via database fetching.
Autor(zy) Khaled El Mansourytalk
Ostatnia wersja 1.2.0 (2022-11-05)
Polityka zgodności Snapshots releases along with MediaWiki. Master is not backward compatible.
MediaWiki
Zmiany w bazie danych Nie
Licencja GNU General Public License 3.0 lub późniejsza
Pobieranie
README
Przykład ExpressProgs TestWiki
$wgSelectTag
‎<select>
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').
Przetłumacz rozszerzenie SelectTag jeżeli jest dostępne na translatewiki.net

The SelectTag extension that can be used for embedding any kind of text (incl. HTML) into a wiki page via a new tag ‎<select> tag. It selects the data to be displayed from a database table in the same database as MediaWiki is installed in.

It is fully customisable via the LocalSettings.php file to include as many attributes as needed.

Installation

  • <translate> [[<tvar name=2>Special:ExtensionDistributor/SelectTag</tvar>|Download]] and move the extracted <tvar name=name>SelectTag</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/SelectTag
  • <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
    wfLoadExtension( 'SelectTag' );
    
  • 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>

Configuration

LocalSettings.php

$wgSelectTag[ 'examplesource' ][ '_dbname' ] = 'exampletbl';
$wgSelectTag[ 'examplesource' ][ 'attr1' ] = 'field1';
$wgSelectTag[ 'examplesource' ][ 'attr2' ] = 'field2';
$wgSelectTag[ 'examplesource' ][ 'attr3' ] = 'field3';
$wgSelectTag[ 'examplesource' ][ '_show' ][ 'show1' ] = 'field4';
$wgSelectTag[ 'examplesource' ][ '_showDefault' ] = 'show1';

Page

<select _source="examplesource" arr1="value1" arr2="value2" arr3="value3" _show="show1" />

Resulting SQL query

SELECT field1, field2, field3 FROM exampletbl
WHERE arr1='value1' AND arr2='value2' AND arr3='value3';

Zobacz też