User:Skybike/Template:This months newsletter: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
m (changed parameters for link texts, changed default texts to newletters name, doku)
m (Newsletter preload summary now points to the newsletter draft to make it more public)
Line 64: Line 64:
     -->&preloadparams%5b%5d={{#time: Y |{{{date|now}}}}}<!--  $2 is Year (like 2019)  
     -->&preloadparams%5b%5d={{#time: Y |{{{date|now}}}}}<!--  $2 is Year (like 2019)  
     -->&preloadparams%5b%5d={{urlencode:{{current release|cr}}}}<!--  $3 is current release
     -->&preloadparams%5b%5d={{urlencode:{{current release|cr}}}}<!--  $3 is current release
     -->&summary=Created%20preloaded%20page<!-- A short summary (%20 is hex ASCII for space)
     -->&summary=Newsletter%20creation%2C%20automatic%20preload%20from%20<!--A short summary (%20 is hex ASCII for space %2C , %5B [ %3A : %2F / %7C | %5D ])
      -->%5B%5BUser%3ASkybike%2FTemplate%3AThis%20months%20newsletter%2FNewsletter%20example%7Chere%5D%5D<!--


         ## blue linktext, shown as default if empty or "create=create name" or "create=/create name" ##
         ## blue linktext, shown as default if empty or "create=create name" or "create=/create name" ##

Revision as of 21:37, 19 November 2020

FlightGear Newsletter April 2024

The following template description is not displayed when the template is inserted in an article.

This sandbox experiment is based on User:Johan G/Template:This months newsletter.

If we decide to publish it I would suggest a more general name like "Template:Newsletter link" instead of "This months newsletter" as you can change the date here.

Goal

This template will link to the FlightGear Newsletter. If it does not yet exist this template will show a red link that when clicked will load a FlightGear Newsletter example with common headings, templates and categories already there, as well as some helpful comments for the editor. It is multilingual and supports custom

Usage

{{:User:Skybike/Template:This months newsletter |date= |link= |create= |subpage-to= |lang= }}

All parameters are optional

date
Default is current date. But you can choose a different date in the form YYYY-MM (like 2024-04).
link, create
Alternative name for the printed link to an existing Newsletter and to not existing Newsletter (by default "FlightGear Newsletter April 2024" and "Create FlightGear Newsletter April 2024")


Advanced Usage


All parameters are optional

date=
  • Default is now. More expressions are 2019-6, January 2020, next month, last month, +1 month, +8 month, +8 months, -8 days,,...
  • Only english therms are accepted, März 2018 or nächster Monat do NOT work, nowhere.


link= / create=
  • Shown as blue link text linking to an existing newsletter (link=) and creating a new one (create=):
    • "link=abc|create=def" shows "Abc" or "Def"


  • There are optional explanatory black texts around the blue link. Both are empty by default. You can define them by a "/" slash in the way "link=black/blue/black" "Black blue black"
    • Only the first one: "Write/me" shows "Write me"
    • Both texts: "Write/me/now" shows "Write me now"
    • Only the last text: "/me/now" shows "Me now"
    • No text: "Me" shows "Me"



subpage-to
Create the next newsletter as a subpage to subpage-to instead of as a separate page. Can be used for sandbox experiments as a subpage to your user page.
lang
This template has {{LangSwitch}} - overwrite that at subpages by entering en, de, fr, es, ca,...

Examples

{{This months newsletter}}

FlightGear Newsletter April 2024

(if it exists: FlightGear Newsletter May 2017 and if not Create FlightGear Newsletter May 2000


In {{newsletter-header}} we would use link= and create= to replace the default text:

{{This months newsletter|link=Please help us write/the coming edition!|create=Create the coming Newsletter edition}}

Please help us write the coming edition!


On translated pages (like De/Newsletter) you can link to last months english newsletter via:

{{This months newsletter |date=last month |lang= en |link=Add your article to the english/name |ceate=Create English  newsletter}}

Add your article to the english FlightGear Newsletter March 2024

Known issues

  • The first letter of "create=" and "link=" is always a capital letter
  • text//text and text/ does not work as you need a link text. Use text/name/text instead (or don't use link= and create= at all).
  • You can't combine the magical word "name" with other words than "create" and "read" within the blue link ("create=ab/cd name ef/gh" or "link=ab name" does not work). Type the newsletters name manually or define these words as black text using "/" slash
  • time= only works with english language, try to use international "YYYY-MM" (2018-12) whenever possible to help translators.
  • "name" and "read name" and "create name" are english codewords but have translated output. |create=bitte/create name/, um ihn zu füllen|lang=de
  • The internal wiki server may need some time (up to minutes) to index new pages. This template still shows the "create" link during that time.

Technical notes

The template will preload a subpage (User:Skybike/Template:This months newsletter/Newsletter example) to this template with a FlightGear newsletter example for the editor that clicks the link. Visit mediawiki.org to get more information.

You can use the following parameters on the preload subpage:

  • $1 for month (01,02,...12)
  • $2 for Year (like 2024).
  • $3 for current release YYYY.V, now 2020.3. See {{current release}} as source.


Define a subpage with this template (here to [[User:DeleteMe/FlightGear Newsletter April 2024]])

{{This months newsletter|subpage-to=User:DeleteMe}}

Create FlightGear Newsletter April 2024

Related templates