Template:Potd: Difference between revisions

From MapSpawn
Jump to navigationJump to search
(Created page with "<div id="mp-lower" class="MainPageBG" style="margin-top:4px; border:1px solid #ddcef2; background:#faf5ff; overflow:auto;"> <div id="mp-bottom"> <h2 id="mp-tfp-h2" style="margin:0.5em; background:#ddcef2; font-family:inherit; font-size:120%; font-weight:bold; border:1px solid #afa3bf; color:#000; padding:0.2em 0.4em">{{#ifexist:Template:POTD protected/{{#time:Y-m-d}}|Today's featured picture | Featured picture <span style="font-size:85%; font-weight:normal;">(Check...")
 
No edit summary
Line 1: Line 1:
<div id="mp-lower" class="MainPageBG" style="margin-top:4px; border:1px solid #ddcef2; background:#faf5ff; overflow:auto;">
{{Documentation subpage}}
<div id="mp-bottom">
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
<h2 id="mp-tfp-h2" style="margin:0.5em; background:#ddcef2; font-family:inherit; font-size:120%; font-weight:bold; border:1px solid #afa3bf; color:#000; padding:0.2em 0.4em">{{#ifexist:Template:POTD protected/{{#time:Y-m-d}}|Today's featured picture | Featured picture&ensp;<span style="font-size:85%; font-weight:normal;">(Check back later for today's.)</span>}}</h2>
== Usage ==
<div id="mp-tfp" style="margin:0.1em 0.4em 0.6em;">{{#ifexist:Template:POTD protected/{{#time:Y-m-d}}|{{POTD protected/{{#time:Y-m-d}}}}|{{POTD protected/{{#time:Y-m-d|-1 day}}}}}}</div>
Displays the English Wikipedia's current [[Wikipedia:Picture of the day|picture of the day]] (POTD) in a box of no more than 600 pixels wide, without the [[blurb]] (explanatory text), for use on user pages. To always display the current day's POTD, use <code><nowiki>{{POTD}}</nowiki></code>; to permanently feature a particular day's POTD, use <code><nowiki>{{POTD|date=[date]}}</nowiki></code>, where the <code>[date]</code> parameter can be given in any valid format.
</div>
 
</div><noinclude>
It is also possible to create your own custom POTD layouts, in case the already-existing versions will not look good within your user page design. Mix and match the following components to make your own. '''This system will only work for POTDs selected beginning January 1, 2007.''' Be sure to replace <code>[date]</code> with an appropriate date value. For a dynamically updating version, use <code><nowiki>{{#time:Y-m-d}}</nowiki></code> (example: <code><nowiki>{{POTD/{{#time:Y-m-d}}|image}}</nowiki></code>).
{{User:UBX/Purge}}
 
[[Category:POTD display templates]]
{| class="wikitable"
</noinclude>
!Template!!width=15%|Description!!Renders as
|-
|<code><nowiki>{{POTD/[date]|image}}</nowiki></code>||The name of the image, without the <code>File:</code> prefix||{{POTD/{{#time:Y-m-d}}|image}}
|-
|<code><nowiki>{{POTD/[date]|size}}</nowiki></code>||The size of the image, without the trailing <code>px</code>||{{POTD/{{#time:Y-m-d}}|size}}
|-
|<code><nowiki>{{POTD/[date]|caption}}</nowiki></code>||The image caption ([[blurb]])||{{POTD/{{#time:Y-m-d}}|caption}}
|-
|<code><nowiki>{{POTD/[date]|title}}</nowiki></code>||A link to the article the image represents||{{POTD/{{#time:Y-m-d}}|title}}
|-
|<code><nowiki>{{POTD/[date]|texttitle}}</nowiki></code>||A linkless short caption, also useful as an [[alt attribute]]||{{POTD/{{#time:Y-m-d}}|texttitle}}
|-
|<code><nowiki>{{POTD/[date]|credit}}</nowiki></code>||The credit line of the image, including the genre (e.g. photograph, painting)||{{POTD/{{#time:Y-m-d}}|credit}}
|}
 
There are two additional predefined layouts:
* <code><nowiki>{{POTD/{{#time:Y-m-d}}|column}}</nowiki></code>: This has the image and caption above each other with no borders. Used on some of the [[Wikipedia:Main Page alternatives|Main Page alternatives]] and also suitable for user pages.
* <code><nowiki>{{POTD/{{#time:Y-m-d}}|row}}</nowiki></code>: This has the image and caption  encapsulated in (usually) a single table row. This is the version used on the current [[Main Page]].
 
It is also possible to permanently feature a POTD for a selected day. Just add a specific value for the date you want. For example, today's POTD is <code>{{tlp|POTD/{{#time:Y-m-d}}|image}}</code>. Likewise, you can use date parameters with the other templates as well. If you like the pre-made formats, you can use date parameters there as well, like this: <code><nowiki>{{</nowiki>[[Template:Pic of the day|Pic of the day]]|date={{#time:Y-m-d}}}}</code> or <code><nowiki>{{</nowiki>[[Template:POTD|POTD]]|date={{#time:Y-m-d}}}}</code>. Again, '''this system will only work for POTDs selected beginning January 1, 2007.'''
 
==Search==
{{POTD subpage search box}}
 
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:POTD templates| ]]
}}</includeonly>

Revision as of 22:11, 3 February 2024

Template:Documentation subpage

Usage

Displays the English Wikipedia's current picture of the day (POTD) in a box of no more than 600 pixels wide, without the blurb (explanatory text), for use on user pages. To always display the current day's POTD, use {{POTD}}; to permanently feature a particular day's POTD, use {{POTD|date=[date]}}, where the [date] parameter can be given in any valid format.

It is also possible to create your own custom POTD layouts, in case the already-existing versions will not look good within your user page design. Mix and match the following components to make your own. This system will only work for POTDs selected beginning January 1, 2007. Be sure to replace [date] with an appropriate date value. For a dynamically updating version, use {{#time:Y-m-d}} (example: {{POTD/{{#time:Y-m-d}}|image}}).

Template Description Renders as
{{POTD/[date]|image}} The name of the image, without the File: prefix image}}
{{POTD/[date]|size}} The size of the image, without the trailing px size}}
{{POTD/[date]|caption}} The image caption (blurb) caption}}
{{POTD/[date]|title}} A link to the article the image represents title}}
{{POTD/[date]|texttitle}} A linkless short caption, also useful as an alt attribute texttitle}}
{{POTD/[date]|credit}} The credit line of the image, including the genre (e.g. photograph, painting) credit}}

There are two additional predefined layouts:

  • {{POTD/{{#time:Y-m-d}}|column}}: This has the image and caption above each other with no borders. Used on some of the Main Page alternatives and also suitable for user pages.
  • {{POTD/{{#time:Y-m-d}}|row}}: This has the image and caption encapsulated in (usually) a single table row. This is the version used on the current Main Page.

It is also possible to permanently feature a POTD for a selected day. Just add a specific value for the date you want. For example, today's POTD is Template:Tlp. Likewise, you can use date parameters with the other templates as well. If you like the pre-made formats, you can use date parameters there as well, like this: {{Pic of the day|date={{#time:Y-m-d}}}} or {{POTD|date={{#time:Y-m-d}}}}. Again, this system will only work for POTDs selected beginning January 1, 2007.

Search

Template:POTD subpage search box