Template:Download: Difference between revisions

From Arx Libertatis Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div style="
<ul class="downloads"><li><!--
border-radius: 10px;
 
background-color: #dfd;
  icon
padding: 8px;
-->{{Icon|{{{icon|download}}}}}<!--
padding-top: 0px;
 
padding-bottom: 0px;
  download link
border: 1px solid #7a7;
--><!--
display: inline-block;
 
margin: 1px;
      custom link
margin-left: 20px;
  -->{{#if:{{{url|}}}|[{{{url}}} {{{name}}}]<!--
"><b>
 
{{If|{{{path|}}}
  -->{{#if:{{{mirror|}}}| [{{{mirror}}} (mirror)]|}}<!--
|[{{{path}}} {{{name}}}]
 
|{{If|{{{nogithub|}}}
      self-hosted link
|[http://sourceforge.net/projects/arx/files/{{{sourceforge}}}/{{{file}}}/download {{{name}}}]
  -->|{{#ifeq:{{{selfhosted|1}}}|1|<!--
|[https://github.com/downloads/arx/ArxLibertatis/{{{file}}} {{{name}}}]
 
{{If|{{{sourceforge}}}|
      -->{{SelfHostedDownload|file={{{file}}}|dir={{{dir|}}}|name={{{name}}}}}<!--
<!-- --> [http://sourceforge.net/projects/arx/files/{{{sourceforge}}}/{{{file}}}/download (mirror)]|
 
}} }} }}
      ... with sourceforge mirror (TODO: move somewhere else)
</b>
      --> {{#ifeq:{{{sourceforge|1}}}|1|<!--
{{If|{{{file|}}}
 
|<br><span style="color: #666; font-size: 7pt;">a</span>
        --> {{SourceForgeDownload|file={{{file}}}|dir={{{dir|}}}|name=(mirror)}}<!--
|
 
}}
      -->|}}<!--
</div>
 
<noinclude>
      sourceforge mirror (TODO: move somewhere else)
  -->|<!--
 
      -->{{SourceForgeDownload|file={{{file}}}|dir={{{dir|}}}|name={{{name}}}}}<!--
 
  -->}}<!--
  -->}}<!--
--><!--
 
  filename
--><span class="name">{{{file}}}</span><!--
 
  and filesize
-->{{#if:{{{size|}}}| <span class="size">{{{size}}}</span>}}<!--
 
  newline
-->{{#if:{{{checksum|}}}{{{signature|}}}|<br>}}<!--
 
  and checksum
-->{{#if:{{{checksum|}}}| <span class="checksum">MD5: <code>{{{checksum}}}</code></span>}}<!--
 
  and siganture
-->{{#ifeq:{{{signature|0}}}|1|<span class="signature"><!--
 
      custom link
  -->{{#if:{{{url|}}}|[{{{url}}}.sig signature]<!--
 
      self-hosted link
  -->|{{SelfHostedDownload|file={{{file}}}.sig|dir={{{dir|}}}|name=signature}}<!--
 
      sourceforge link
  -->|{{#ifeq:{{{sourceforge|1}}}|1|{{SourceForgeDownload|file={{{file}}}.sig|dir={{{dir|}}}|name=signature}}<!--
 
  -->}}<!--
  -->}}<!--
  --></span>}}<!--
 
--></li></ul><noinclude>


Parameters:
Parameters:
* name - title of the download [required]
* name - title of the download [required]
* file - filename (without path) [required unless path is set]
* file - filename (without path) [required]
* path - full download path (should not be used for github or sourceforge downloads!)
* dir - subdirectory for file for sourceforge/self-hosted [required]
* nogithub - don't use a github download path
* url - full download path (should not be used for sourceforge or self-hosted downloads!)
* sourceforge - use a sourceforge download path, set to url-encoded directory
* sourceforge - set to 0 to not use a sourceforge download path
* selfhosted - set to 0 to not use a self-hosted download path
* size - textual filesize
* size - textual filesize
* checksum - MD5 checksum
* signature - signature file
</noinclude>
</noinclude>

Latest revision as of 22:13, 9 March 2024

Parameters:

  • name - title of the download [required]
  • file - filename (without path) [required]
  • dir - subdirectory for file for sourceforge/self-hosted [required]
  • url - full download path (should not be used for sourceforge or self-hosted downloads!)
  • sourceforge - set to 0 to not use a sourceforge download path
  • selfhosted - set to 0 to not use a self-hosted download path
  • size - textual filesize
  • checksum - MD5 checksum
  • signature - signature file