Difference between revisions of "Template:DownloadExt"
Jump to navigation
Jump to search
Dschwoerer (talk | contribs) |
|||
Line 1: | Line 1: | ||
− | <includeonly> | + | <includeonly>{{#if: {{#extmediaurl:{{{1}}}|noerror}}|{{SERVER}}/~icp/mimetype-icons/{{{3|{{#replace:{{#extmediamime:{{{1}}}}}|/|_}}}}}.png [{{SERVER}}{{#extmediaurl:{{{1}}}}} {{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}]({{#extmediasize:{{{1}}}}})| {{#extmediaurl:{{{1}}} }} }}</includeonly><noinclude> |
This template can be used to include links to downloadable files that have not been uploaded to mediawiki but reside somewhere else. | This template can be used to include links to downloadable files that have not been uploaded to mediawiki but reside somewhere else. | ||
Line 6: | Line 6: | ||
;''filename'' | ;''filename'' | ||
− | :The name of the file that can be downloaded, | + | :The name of the file that can be downloaded, in a folder specified in the LocalSettings.php |
;''linktext'' | ;''linktext'' | ||
:The text of the link to the download. | :The text of the link to the download. | ||
Line 13: | Line 13: | ||
== Examples == | == Examples == | ||
− | * <code><nowiki>{{DownloadExt| | + | * <code><nowiki>{{DownloadExt|slides01.pdf}}</nowiki></code> {{DownloadExt|slides01.pdf}} |
− | * <code><nowiki>{{DownloadExt|/ | + | * <code><nowiki>{{DownloadExt|harting07a.pdf}}</nowiki></code> {{DownloadExt|harting07a.pdf}} |
+ | *<code><nowiki>{{DownloadExt|bla|test}}</nowiki></code>{{DownloadExt|bla|test}} | ||
+ | *<code><nowiki>{{DownloadExt|bla}}</nowiki></code>{{DownloadExt|bla}} | ||
</noinclude> | </noinclude> |
Revision as of 20:25, 13 June 2013
This template can be used to include links to downloadable files that have not been uploaded to mediawiki but reside somewhere else.
Usage
{{DownloadExt|filename|linktext|type}}
- filename
- The name of the file that can be downloaded, in a folder specified in the LocalSettings.php
- linktext
- The text of the link to the download.
- type
- Often, mediawiki cannot deduce the type of the file to be downloaded. In that case, pass the mimetype here.
Examples
{{DownloadExt|slides01.pdf}}
{{DownloadExt|harting07a.pdf}}
{{DownloadExt|bla|test}}
{{DownloadExt|bla}}