Widget:Wikipedia image
From CruisersWiki
(Difference between revisions)
(escape) |
|||
(14 intermediate revisions not shown) | |||
Line 6: | Line 6: | ||
assign var="width" value=$width|regex_replace:'/^([0-9]*).*$/':'\1' | assign var="width" value=$width|regex_replace:'/^([0-9]*).*$/':'\1' | ||
}--><!--{ | }--><!--{ | ||
- | + | assign var="height" value=$height|regex_replace:'/^([0-9]*).*$/':'\1' | |
- | }--><img alt="<!--{$file}-->" src="https://wikipedia.org/wiki/Special:Redirect/file/<!--{$fileEscaped}--><!--{if $ | + | }--><!--{ |
- | + | assign var="noSvg" value=$file|regex_replace:'/\.svg$/':'' | |
- | + | }--><!--{ | |
- | + | if !$nolink | |
+ | }--><a href="<!--{$link}-->" class="image"><!--{ | ||
+ | /if | ||
+ | }--><img <!--{if $thumb}-->class="thumbimage" <!--{/if}-->alt="<!--{$file|escape}-->" src="https://en.wikipedia.org/wiki/Special:Redirect/file/<!--{$fileEscaped}--><!--{ | ||
+ | if $file == $noSvg | ||
+ | }-->?dummy<!--{if $width}-->&width=<!--{$width}--><!--{/if}--><!--{if $height}-->&height=<!--{$height}--><!--{/if}--><!--{ | ||
+ | /if | ||
+ | }-->"<!--{if $width}--> width="<!--{$width}-->"<!--{/if}--><!--{if $height}--> height="<!--{$height}-->"<!--{/if}-->><!--{ | ||
+ | if !$nolink | ||
+ | }--></a><!--{ | ||
+ | /if | ||
+ | }--></includeonly><noinclude> | ||
- | + | A helper widget for [[Template:Wikipedia image]] | |
- | < | + | <!-- https://doc.wikimedia.org/mediawiki-core/master/php/SpecialRedirect_8php_source.html --> |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | --> | + | |
</noinclude> | </noinclude> |
Latest revision as of 13:39, 3 March 2019
A helper widget for Template:Wikipedia image