Erweiterung:MsLinks
![]() Freigabestatus: stabil |
|
---|---|
![]() |
|
Einbindung | Parser-Funktion |
Beschreibung | Creates links to view or download files using icons appropriate to the file type |
Autor(en) | Martin Schwindl, Martin Keyler |
Betreuer | Sophivorus |
Letzte Version | 5.3 (2021-11-15) |
MediaWiki | 1.23+ |
PHP | 5.3+ |
Lizenz | GNU General Public License 2.0 oder neuer |
Herunterladen | |
|
|
Quarterly downloads | 22 (Ranked 143rd) |
Übersetze die MsLinks-Erweiterung, wenn sie auf translatewiki.net verfügbar ist | |
The MsLinks extension adds a button to the editor that creates links to view or download files using icons appropriate to the file type.
Installation
- Die Erweiterung herunterladen und die Datei(en) in ein Verzeichnis namens
MsLinks
im Ordnerextensions/
ablegen. - Folgenden Code am Ende deiner LocalSettings.php -Datei einfügen:
wfLoadExtension( 'MsLinks' );
Erledigt – Zu Special:Version in dem Wiki (bei Einstellung auf deutsch nach Spezial:Version) navigieren, um die erfolgreiche Installierung der Erweiterung zu überprüfen.
Vagrant-Installation:
- Wird Vagrant benutzt, ist mit
vagrant roles enable MsLinks --provision
zu installieren
Konfiguration
You can configure the icon that is associated with each file type, by adding the icon to the images folder of the MsLinks extension and setting the $wgMSL_FileTypes
array appropriately. Below is the default configuration:
$wgMSL_FileTypes = [
'no' => 'no_icon.png',
'jpg' => 'image_icon.png',
'gif' => 'image_icon.png',
'bmp' => 'image_icon.png',
'png' => 'image_icon.png',
'tiff' => 'image_icon.png',
'tif' => 'image_icon.png',
'ai' => 'image_ai_icon.png',
'psd' => 'image_ps_icon.png',
'pdf' => 'pdf_icon.png',
'pps' => 'pps_icon.png',
'ppt' => 'pps_icon.png',
'pptx' => 'pps_icon.png',
'xls' => 'xls_icon.png',
'xlsx' => 'xls_icon.png',
'doc' => 'doc_icon.png',
'docx' => 'doc_icon.png',
'dot' => 'doc_icon.png',
'dotx' => 'doc_icon.png',
'rtf' => 'doc_icon.png',
'txt' => 'txt_icon.png',
'html' => 'code_icon.png',
'php' => 'code_icon.png',
'exe' => 'exe_icon.gif',
'asc' => 'txt_icon.png',
'dwg' => 'dwg_icon.gif',
'zip' => 'zip_icon.png',
'mov' => 'movie_icon.png',
'mpeg' => 'movie_icon.png',
'mpg' => 'movie_icon.png',
'wmv' => 'movie_icon.png',
'avi' => 'movie_icon.png',
'mp4' => 'movie_icon.png',
'flv' => 'movie_flash_icon.png',
'wma' => 'music_icon.png',
'mp3' => 'music_icon.png',
'wav' => 'music_icon.png',
'mid' => 'music_icon.png',
];
Verwendung
To insert a MsLink, simply edit a page and click on the new button in the toolbar. It will insert an empty MsLink, which you can then fill with the filename of the file you want to link to. You can also add some parameters to it, like in regular images. Below are some examples of usage:
Beschreibung | Eingabe | Ergebnis |
---|---|---|
Basic MsLink | {{#l:Testfile.pdf}} | ![]() |
MsLink with description | {{#l:Testfile.pdf|File description}} | ![]() |
Icon on the right side | {{#l:Testfile.pdf|File description|right}} | File description ![]() |
Direct MsLink | {{#l:dlink|Testfile.pdf|This file will be downloaded when clicked}} | ![]() |
Siehe auch
![]() | Diese Erweiterung ist in den folgenden Softwarepaketen enthalten und/oder wird von den folgenden Wiki-Farmen, bzw. Wiki-Hostern verwendet: Dies ist keine maßgebliche Liste. Softwarepakete und/oder Wiki-Farmen, bzw. Wiki-Hoster nutzen diese Erweiterung ggf., obwohl sie nicht in dieser Liste enthalten sind. Prüfe daher stets die Nutzung im verwendeten Softwarepaket und/oder bei der Wiki-Farm, bzw. dem Wiki-Hoster. |
Categories:
- Stable extensions/de
- Parser function extensions/de
- GPL licensed extensions/de
- Extensions in Wikimedia version control/de
- EditPage::showEditForm:initial extensions/de
- ParserFirstCallInit extensions/de
- All extensions/de
- Extensions included in Miraheze/de
- Extensions included in WikiForge/de
- Extensions included in WikiTide/de