Template:Main Page Screenshot/doc: Difference between revisions

From PZwiki
(Moved docs)
 
m (Automated Formatting for Infobox and Section Headers)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This template is transcluded onto the [[Main Page|main page]] to display a random image from a list.
==Usage==
'''To add a screenshot/caption:'''
'''To add a screenshot/caption:'''
''Please note that if you do not have the appropriate [[Special:ListGroupRights|user rights]], you will not be able to add a screenshot. If you'd like a screenshot to be featured on the main page, please [[Special:Upload|upload the file]] and post a link to it on an [[PZwiki:administrators|administrator's]] talk page.''
* Upload the file if it isn't on the wiki already.
* Upload the file if it isn't on the wiki already.
* Edit this page.
* Edit this page.
* Change the following..
* Change the following...
  <nowiki>{{#switch:{{#ifexpr:{{{test|0}}}=1|{{{1}}}|</nowiki>'''<nowiki>{{rand|#}}</nowiki>'''<nowiki>}}</nowiki>
  <nowiki>{{#switch:{{#ifexpr:{{{test|0}}}=1|{{{1}}}|</nowiki>'''<nowiki>{{rand|#}}</nowiki>'''<nowiki>}}</nowiki>
* ..to be this:
: ...to be this:
  <nowiki>{{#switch:{{#ifexpr:{{{test|0}}}=1|{{{1}}}|</nowiki>'''<nowiki>{{rand|#+1}}</nowiki>'''<nowiki>}}</nowiki>
  <nowiki>{{#switch:{{#ifexpr:{{{test|0}}}=1|{{{1}}}|</nowiki>'''<nowiki>{{rand|#+1}}</nowiki>'''<nowiki>}}</nowiki>
* Copy and paste the following between the last line of the page and the one before it:
* Copy and paste the following between the last line of the page and the one before it:
<pre>|#=[[File:FILENAME.xyz|center|800px|500px|CAPTION]]''CAPTION''</pre>
<pre>|#=[[File:FILENAME.xyz|center|800px|500px|CAPTION]]''CAPTION''</pre>
* Test your changes by inserting <nowiki>{{Main Page Screenshot|#|test=1}}</nowiki> onto a page and previewing, you should see your screenshot/caption.
* Test your changes by inserting <code><nowiki>{{</nowiki>Main Page Screenshot|'''#'''|test=1}}</code> onto a page and replacing <code>'''#'''</code> with the screenshots ID number. Preview changes, then you should see your screenshot/caption.
-----
-----




''Please do not use equals signs or vertical bars in your captions.''
''Please do not use equals signs or vertical bars in your captions.''

Latest revision as of 11:33, 7 March 2024

This template is transcluded onto the main page to display a random image from a list.

Usage

To add a screenshot/caption:

Please note that if you do not have the appropriate user rights, you will not be able to add a screenshot. If you'd like a screenshot to be featured on the main page, please upload the file and post a link to it on an administrator's talk page.

  • Upload the file if it isn't on the wiki already.
  • Edit this page.
  • Change the following...
{{#switch:{{#ifexpr:{{{test|0}}}=1|{{{1}}}|{{rand|#}}}}
...to be this:
{{#switch:{{#ifexpr:{{{test|0}}}=1|{{{1}}}|{{rand|#+1}}}}
  • Copy and paste the following between the last line of the page and the one before it:
|#=[[File:FILENAME.xyz|center|800px|500px|CAPTION]]''CAPTION''
  • Test your changes by inserting {{Main Page Screenshot|#|test=1}} onto a page and replacing # with the screenshots ID number. Preview changes, then you should see your screenshot/caption.


Please do not use equals signs or vertical bars in your captions.