User:Lwarrenwiki/Cheatsheet

Ye olde Lwarrenwiki cheat sheet

{{nbsp|3}} ([https://en.wikipedia.org/w/index.php?title=User:Lwarrenwiki/Cheatsheet&action=edit Edit cheatsheet])

Anti-vandalism tools

= Request for page protection ([[:WP:RFPP]]), Hamiltrash sample =

Sample page protection request, for use at WP:RFPP. See User:Lwarrenwiki/sandbox#Hamiltrash template maker for more variations.

{{Block indent|{{small|

=== :Angelica Hamilton ===

  • {{pagelinks|Angelica Hamilton}}

Indefinite semi-protected: Semi-protection requested due to moderate but highly persistent level of long-term WP:SPA and IP vandalism related to Hamilton (musical), conforming to long-standing #Hamiltrash pattern of vandalism. ~~~~

= Talk page vandalism warnings =

Automated warnings can be generated by Twinkle, when pulled down on the editor's User page or User Talk page. This proved easier and more versatile than my sidebar hack at :User:Lwarrenwiki/hamiltrash.js and my previous manual template (both detailed in the collapsed section below). Sample comments:

General{{nbsp|3}}
[extra line break]

  • Disruptive edit reverted. Insertion of content related to {{subst:fti|Hamilton (musical)}}, conforms to common Hamiltrash pattern of vandalism.
Lams
[extra line break]
  • Disruptive edit reverted. Insertion of Lams shipping (fandom) content related to {{subst:fti|Hamilton (musical)}}, conforms to common Hamiltrash pattern of vandalism.
  • Lyrics
    [extra line break]
    
  • Disruptive edit reverted. Insertion of {{subst:fti|Hamilton (musical)}} lyrics, conforms to common Hamiltrash pattern of vandalism.
  • {{collapse top |left=true |bg=Ivory |indent=1.6em |title=Variations on the user warning message }}

    {{Block indent|

    {{monodiv|1=

    == {{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}} vandalism ==

    File:Information orange.svg Please refrain from making unconstructive edits to Wikipedia, as you did at :XXXXX. Your edits appear to constitute vandalism and have been reverted.

    * Please do not add nonsense to Wikipedia. Such edits are considered vandalism and quickly undone.

    * Wikipedia is an encyclopedia and not a social network. Wikipedia is not a place to socialize or write things that are not directly related to improving the encyclopedia. Off-topic material may be deleted at any time.

    * Please do not add or change content without citing a reliable source.

    Repeated vandalism can result in the loss of editing privileges.

    Thank you. {{subst:4~}}

    }} }}

    {{collapse end}}

    = Reporting a [[:WP:vandalism-only account|vandalism-only account]] =

    Report a VOA at the AIV noticeboard (edit page [https://en.wikipedia.org/w/index.php?title=Wikipedia:Administrator_intervention_against_vandalism&action=edit§ion=2 here]):

    {{Block indent|{{small|

    * {{vandal|:XXXXX}} Vandalism pattern over several days/warnings. {{subst:4~}}
    }} }}

    = Reporting edit warring (3RR) =

    On the editor's User page or User Talk page, pull down the Twinkle menu. Select AIV and AN3 to generate a report with automatic diffs at the :WP:AN3 (aka :WP:3RRV) administrators' noticeboard.

    = Resolved =

    {{Tmbox|image={{Resolved mark}}|text=This is done.}}

    ::

    {{Tmbox|image={{Resolved mark}}|text=This is done.}}

    = Responding to edit requests =

    • {{Blue|{{Edit semi-protected|demo{{=}}yes|answered{{=}}yes}}}}

    :Template:Edit semi-protected produces a small box on the right, e.g., for deactivating a request for an edit to a semi-protected page.

    :Template:ESp includes a long list of templates for adding a detailed response when deactivating a request for an edit to a semi-protected page.

    {{collapse top |left=true |bg=Ivory |indent=1.6em |title=ESp templates for graphical icons}}

    • {{subst:ESp|d}} produces {{tlx|Done}} graphic before a further message:

    :: File:Yes check.svg Done {{Blue|Further message.}}

    • {{subst:ESp|pd}} produces {{tlx|Partly done}} graphic before a further message:

    :: File:Gold check mark.svg Partly done: {{Blue|Further message.}}

    • {{subst:ESp|n}} produces {{tlx|Not done}} graphic before a further message:

    :: File:Red information icon with gradient background.svg Not done: {{Blue|Further message.}}

    • {{subst:ESp|note}} produces {{tlx|Note2}} graphic before a further message:

    :: File:Pictogram voting comment.svg Note: {{Blue|Further message.}}

    • {{subst:ESp|xy}} produces {{tlx|Not done}} and a clarity rejection, before a further message:

    :: File:Red question icon with gradient background.svg Not done: it's not clear what changes you want to be made. Please mention the specific changes in a "change X to Y" format and provide a reliable source if appropriate. {{Blue|Further message.}}

    For more graphic checkmarks, see the long list of variations at :Template:Done/See also. These include:

    {{Block indent |{{Div col|content=

    : {{Already declined}} {{tlx|Already declined}}

    : {{Already done}} {{tlx|Already done}}

    : {{Deferred}} {{tlx|Deferred}}

    : {{Deleted}} {{tlx|Deleted}}

    : {{DuplicateProposal}} {{tlx|DuplicateProposal}}

    : {{NeedsDiscussion}} {{tlx|NeedsDiscussion}}

    : {{Possibly}} {{tlx|Possibly}}

    : {{Redundant symbol}} {{tlx|Redundant symbol}}

    : {{Removed}} {{tlx|Removed}}

    : {{Reopened}} {{tlx|Reopened}}

    : {{Resolved mark}} {{tlx|Resolved mark}}

    : {{Reverted}} {{tlx|Reverted}}

    : {{Reviewing request}} {{tlx|Reviewing request}}

    : {{Undone}} {{tlx|Undone}}

    : {{Unnecessary}} {{tlx|Unnecessary}}

    }} }}

    {{collapse bottom}}

    Formatting wiki text

    = Page diffs =

    For an inline wikilink to a single-edit diff, only the ID of the {{em|older}} page ({{xt|oldid}}) is needed:

    Likely to be piped and parenthesized on talk pages, as (diff) {{nbsp}}– produces ({{blue|diff}}).

    See also Help:Special page.

    = Format title (italics, quotes) =

    The fti template (short for "format title: italic") italicizes the non-parenthetical portion of a page title, and links to the given page.

    • Example — {{{{Blue|subst:fti}}|Hex (Hex album)}} becomes Hex (Hex album)

    The ftq template (short for "format title: quotes") puts the non-parenthetical portion of a page title in double quotes, and links to the given page.

    These are intended for formatting article titles on disambiguation pages, and should always be subst-ed.

    = White space templates to replace HTML code =

    To replace  {{;}} and
    :

    • {{tlx|spaces|{{Blue|n}}|type}}, or redirect from {{tlx|nbsp|{{Blue|n}}|type}}

    :* type=em, fig, en, thin, hair. If not specified, {{Blue|n}} non-breaking spaces ( ) are produced.

    :* A non-breaking space has the same width as a standard space, whose width is between the width of en and thin.

    • {{tlx|br|{{Blue|n}}}} for {{Blue|n}} line breaks
    • {{tlx|Block indent}} for things that aren't in lists, or where a colon doesn't work

    = Fixing dated statements =

    • {{tlx|Show by date|year|month|day|text before|text after|options}}

    :* hour=−5 (−5 for EST, −4 for EDT, omit for UTC)

    • {{tlx|As of|year|month|day|options}}

    :* df=US, lc=y, since=y, alt=alternate text, pre=insertion (e.g., the first week of)

    = Fixing someone else's unsigned talk page post =

    • {{subst:Unsigned|user name|time, day month year (UTC)}}
    • {{subst:Unsigned IP|user IP address|time, day month year (UTC)}}

    : Some experimentation yielded the good news that the time/date parameter may actually be free-form. At the least, I learned that UTC (or any time zone) is not actually required. —14:04, 16 June 2021 (UTC)

    {{nbsp|2}}Example:

    : Typing {{subst:Unsigned|Example|{{CURRENTTIME}}, {{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}} (UTC)}} will yield:

    : {{Unsigned|demo=yes|Example|{{CURRENTTIME}}, {{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}} (UTC)}}

    = Column breaks =

    Automatic

    Use {{tlx|Div col|colwidth{{=}}{{Blue|nn}}em}} and {{tlx|Div col end}} templates for automatically-balanced columns.

    {{Div col|colwidth=30em|content=

    • {{tlx|Div col|colwidth{{=}}{{Blue|nn}}em}} specifies minimum width of columns and automatically determines number of columns based on screen width. (If no colwidth is supplied, the template uses a default of 30em.)
    • {{{{Blue|Div col}}|colwidth=30em|content=

    : * One

    : * Two

    : }} allows the avoidance of {{tlx|Div col end}}

    • {{tlx|Div col|rules{{=}}{{Blue|___}}}} adds vertical lines between columns if set to {{Blue|yes}} or to any CSS styling (e.g., rules={{Blue|1px dashed blue;}})
    • {{tlx|Div col|gap{{=}}{{Blue|nn}}em}} specifies spacing between columns
    • {{tlx|Div col|style{{=}}{{Blue|___}}}} specifies CSS styling to apply to the columns
    • {{tlx|colbegin}} and {{tlx|colend}} are redirects to these templates

    }}

    Manual

    The {{tl|col-begin}}, {{tl|col-break}} and {{tl|col-end}} templates control columns of text on a page:

    {{col-begin}}

    {{col-break}}

    • {{tlx|col-begin}} starts a table, and must be immediately followed by {{tl|col-break}} for the first column
    • {{tlx|col-break}} triggers the start of each column
    • {{tlx|col-end}} ends the multi-column table

    {{col-break}}

    • {{{{Blue|col{{nbh}}n}}}}, where {{Blue|n}} = 2 → 6, replaces each occurrence of {{tl|col-break}}, with {{Blue|n}} remaining constant. It sets column width for each of {{Blue|n}} columns, with align={{Blue|left}}, valign={{Blue|top}}

    :* The width, align, or valign of columns can be overridden: {{{{Blue|col{{nbh}}n}}|width{{=}}{{Blue|nn}}%|align{{=}}{{Blue|right}}|valign{{=}}{{Blue|center}}}}.

    {{col-end}}

    = Message boxes =

    {{col-begin}}

    {{col-break}}

    7 metatemplates in the Module:Message box family:

    {{blist

    | {{tlx|Ambox}} – article message box

    | {{tlx|Cmbox}} – category message box

    | {{tlx|Imbox}} – image file message box

    | {{tlx|Tmbox}} – talk message box

    | {{tlx|Fmbox}} – header/footer message box

    | {{tlx|Ombox}} – other types of page

    | {{tlx|Mbox}}{{spaces|2}} – changes presentation according to namespace

    }}

    {{col-break}}

    Closely related metatemplates:

    {{blist

    | {{tlx|Asbox}} – article stub message box

    | {{tlx|Dmbox}} – dab message box

    | {{tlx|Ivmbox}} – simple full-width message box, default ivory bg

    }}

    {{col-end}}


    {{Ivmbox|A full-width example generated with {{tlx|Ivmbox|A full...|Information icon4.svg}} |Information icon4.svg}}

    {{Anchor|Pinned posts}}

    = Collapsing a talk page discussion =

    {{collapse top |warning=yes}}

    {{collapse top |warning=yes}}

    [ ... ]

    {{collapse bottom}}

    {{Ivmbox|

    • Summary point 1
    • Summary point 2

    |Information icon4.svg}} Refactored this section by collapsing the lengthy discussion. Added notice box text to summarize. ~~~~

    {{collapse bottom}}

    {{Ivmbox|

    • Summary of lengthy discussion
    • Collapsed using {{tl|Collapse top}} and {{tl|Collapse bottom}}
    • To see the code that produces this, show the extended content by clicking [show] in the right margin above.

    |Information icon4.svg}} Refactored this section by collapsing the lengthy discussion. Added notice box text to summarize. ~~~~

    = List of colors =

    {{collapse top |title= X11 color chart }}

    {{Color chart X11}}

    {{collapse bottom}}

    = Pinned posts (📌 {{Resize|75%|''pinned post''}}) =

    The above is done with:  (📌 {{Resize|75%|pinned post}})

    Image tricks

    = CSS image crop =

    {{collapse top |left=true |bg=Ivory |indent=1.6em |title=Example of {{Blue|:Template:CSS image crop}} }}

    {{CSS image crop

    |Image = Name of the image file, or may accept {{Annotated image}}.

    |bSize = Base image width in pixels (the image we are cropping on)

    |cWidth = Crop image width in pixels

    |cHeight = Crop image height in pixels

    |oTop = Offset top in pixels, optional, defaults to 0 when omitted

    |oLeft = Offset left in pixels, optional, defaults to 0 when omitted

    |Location = 'right', 'left', 'center' or 'none' (determines image placement on page)

    — defaults to 'right' for thumbs or when description is provided

    — defaults to 'left' for non-thumbs or when description is blank

    |Description = Description (will render out using thumbnail class)

    |Link = Name of an article to be linked by clicking on the image (usually omit)

    |Alt = Alt text for the image.

    |Page = Page of the file, if there are multiple pages (such as pdf files).

    |magnify-link = Image to be linked by the magnify icon (usually omit)

    }}

    {{collapse bottom}}

    = Multiple images =

    {{collapse top |left=true |bg=Ivory |indent=1.6em |title=Example of {{Blue|:Template:Multiple image}} }}

    {{multiple image

    | align = right

    | direction = horizontal

    | total_width = 300

    | background color = Wheat

    | header_background = White

    | header = Arms of Hamilton of Grange

    | image1 = Arms of Hamilton of Grange.svg

    | alt1 = Hamilton of Grange arms

    | caption1= Arms: Gules, a lion rampant, argent...

    | image2 = Armorial of Hamilton of Grange (1823).jpg

    | alt2 = Hamilton of Grange arms, crest, and motto

    | caption2= Arms, crest, and motto

    | footer_background = White

    | footer = Arms of the Lairds of Grange in Ayrshire, Scotland, including Hamilton's paternal grandfather

    }}

    {{multiple image

    | align = right

    | direction = horizontal

    | total_width = 300

    | background color = Wheat

    | header_background = White

    | header = Arms of Hamilton of Grange

    | image1 = Arms of Hamilton of Grange.svg

    | alt1 = Hamilton of Grange arms

    | caption1= Arms: Gules, a lion rampant, argent...

    | image2 = Armorial of Hamilton of Grange (1823).jpg

    | alt2 = Hamilton of Grange arms, crest, and motto

    | caption2= Arms, crest, and motto

    | footer_background = White

    | footer = Arms of the Lairds of Grange in Ayrshire, Scotland, including Hamilton's paternal grandfather

    }}

    {{collapse bottom}}

    = Commons image cleanup requests =

    To submit a cleanup request, see :commons:Media for cleanup.

    = Commons image crop request (or documenting) =

    To submit a crop request, see :commons:Template:Crop for Wikidata.

    • E.g.: {{Crop for Wikidata |1={{Blue|Wikidata Q item number}} |2={{Blue|Crop instructions}}}}

    {{collapse top |left=true |bg=Ivory |indent=1.6em |title=Steps to take when cropping in Commons}}

    {{Ivmbox |1=It has been requested to crop a part of this image, so that the cropped part can serve as its own image for :Wikidata:Q000000.

    : Example — Crop instructions: Capture a head and chest shot of the second person from the left

    If you perform the crop, please

    • [https://commons.wikimedia.org/w/index.php?title=&action=edit Copy] this file metadata and upload the cropped file using [https://commons.wikimedia.org/w/index.php?title=Special:Upload&uploadformstyle=basic this upload form] with extraction info appended to the source field, e.g.:

    :: source = Original: http://photo-robert.tumblr.com/post/57352306647/game-theory-1989-the-last-line-up-lasted-1

    :: {{tlx|Extracted from|Game Theory final line-up 1989.jpg}}

    • [https://commons.wikimedia.org/w/index.php?title=&action=edit Add] extraction info to the other versions field of the origin file, e.g.:

    :: other_versions ={{tlx|Image extracted|File:Michael Quercio 1989.png}}

    • Add the new file as an image to the Wikidata item, under Statements|Image

    If cropping a JPEG, it is generally preferable to use a lossless cropping tool such as [//tools.wmflabs.org/croptool?title={{FULLPAGENAMEE}} CropTool] on Wikimedia Toolforge, jpegtran, or in some cases GIMP, ImageMagick, IrfanView, XnView. For more help, see Media for cleanup.

    |2=

    50px → 50px

    }}

    {{collapse bottom}}

    Miscellany

    = Rcats for redirects =

    Rcats are maintenance templates used to categorize redirect pages (e.g., R from..., R to...)

    • WP:RE/SG – Redirect style guide
    • WP:TMR – discussion and list of rcat templates

    :* alphabetical listing of rcat templates

    • {{Tlx|R template index}} – navigation box summary
    • {{Tlx|Redirect category shell}}

    = Research tools for editors =

    Requests and renewals at Wikipedia Library Card Platform: https://wikipedialibrary.wmflabs.org/users/

    = Blocked page moves =

    Use :Wikipedia:Requested moves/Technical requests for uncontroversial technical requests.

    = Toolbar scripts and customizations =

    = Userspace and sandbox =

    Contents of my personal namespace:

    • [https://en.wikipedia.org/wiki/Special:PrefixIndex?prefix=Lwarrenwiki&namespace=2 All pages under User:Lwarrenwiki] (includes css, js, userboxes, templates)
    • [https://en.wikipedia.org/wiki/Special:PrefixIndex?prefix=Lwarrenwiki&namespace=3 All pages under User talk:Lwarrenwiki] (user talk archives)
    • [https://en.wikipedia.org/wiki/Special:PrefixIndex?prefix=Lwarrenwiki%2Fsandbox&namespace=2 All pages under User:Lwarrenwiki/sandbox] (draft articles)
    • This cheatsheet is at User:Lwarrenwiki/Cheatsheet
    • New sandbox – at User:Lwarrenwiki/New sandbox, which includes the former contents of User:Lwarrenwiki/sandbox
    • Old sandbox – transcludes the cheatsheet, so it can be accessed from the top menu "Sandbox" link