Template:post-pic

From Homestar Runner Wiki

(Difference between revisions)
Jump to: navigation, search
(fix)
(Sorry for reverting, but I deliberately avoided using "ifexist" b/c it does an expensive "page check" and several pages got added to Category:Pages with too many expensive parser function calls)
Line 1: Line 1:
{{#if:{{{1|}}}|<!--
{{#if:{{{1|}}}|<!--
-
   -->{{#switch:{{#ifexist:File:{{{1|}}}||nophoto|{{{1|}}}}}<!--
+
   -->{{#switch:{{#if:{{{nophoto|}}}|nophoto|{{{1|}}}}}<!--
   -->|Nophoto.PNG<!--
   -->|Nophoto.PNG<!--
   -->|nophoto.png<!--
   -->|nophoto.png<!--
-
   -->|nophoto={{nophoto|200px|filename={{{1|}}}|caption=Please upload missing Tweet image.}}<!-- /* use nophoto template in any of these cases */
+
   -->|nophoto={{nophoto|200px|filename={{#if:{{{nophoto|}}}|{{{1|}}}|}}|caption=Please upload missing Tweet image.}}<!-- /* use nophoto template in any of these cases */
-
   -->|#default={{#if:{{{isvideo|}}}<!--n
+
   -->|#default={{#if:{{{isvideo|}}}<!--
     -->|<div style="background-color: black; padding:6px; display:inline-block;"><div style="display:block; margin-bottom:8px; border-bottom: 10px dotted white;"></div>[[File:{{{1|}}}{{!}}{{#if:{{{size|}}}|{{{size|}}}|188px}}{{!}}Video thumbnail for {{{date|Date}}}]]<div style="display:block; margin-top:6px; border-top: 10px dotted white;"></div></div><!--
     -->|<div style="background-color: black; padding:6px; display:inline-block;"><div style="display:block; margin-bottom:8px; border-bottom: 10px dotted white;"></div>[[File:{{{1|}}}{{!}}{{#if:{{{size|}}}|{{{size|}}}|188px}}{{!}}Video thumbnail for {{{date|Date}}}]]<div style="display:block; margin-top:6px; border-top: 10px dotted white;"></div></div><!--
     -->|{{#if:{{{isFirst|}}}||<br />}}[[File:{{{1|}}}{{!}}{{#if:{{{size|}}}|{{{size|}}}|200px}}{{!}}{{post-getTypeName|{{{2|}}}}} image for {{{date|Date}}}]]<!--
     -->|{{#if:{{{isFirst|}}}||<br />}}[[File:{{{1|}}}{{!}}{{#if:{{{size|}}}|{{{size|}}}|200px}}{{!}}{{post-getTypeName|{{{2|}}}}} image for {{{date|Date}}}]]<!--

Revision as of 14:18, 19 August 2024

See {{post}}
  • Helper function to display images
Personal tools