Module:Women in Red event/doc

From Wikipedia, the free encyclopedia

Usage[edit]

This module has various functons that use the list of WikiProject Women in Red events stored at Wikipedia:WikiProject Women in Red/events. These are used in

and elsewhere.

main function[edit]

{{#invoke:Women in Red event|main|event|field}}

  • Given an event number, reads one of the fields (event, year, month, type, image, series)

For example:

  • {{#invoke:Women in Red event|main|294|name}} gives "Education"
  • {{#invoke:Women in Red event|main|7|year}} gives "2016"
  • {{#invoke:Women in Red event|main|236|series}} gives "Alphabet run"

text function[edit]

Produces a piped link to the event page followed by the date, for use in the project banner. For example:

date function[edit]

Produces a formatted date (including month and year) of the event. For example:

  • {{#invoke:Women in Red event|date|210}} gives "October–December 2021"

This function takes two optional parameters:

  • sentence - if set to "yes" then the date will be expressed as a sentence using the words "from" and "to", e.g. "from October to December 2021"
  • abbrev - if set to "yes" then the names of the months will be abbreviated, e.g. "Oct–Dec 2021"

findLatest function[edit]

Shows the latest event number to be defined (currently 310), ignoring the quasi event numbers "2017" and "2018". For example

  • {{#invoke:Women in Red event|findLatest}} gives "310"

An optional parameter |add= can be used to add or subtract numbers to the latest. For example

  • {{#invoke:Women in Red event|findLatest|add=1}} gives "311"

list function[edit]

Produce a table of events, for various purposes. The following parameters are recognised.

  • first, last: specify the first and/or last event to show in the list. For example {{#invoke:Women in Red event|list|first=52|last=55}} produces
MeetupNameDate
52Women in peaceAug 2017
53Canadian womenAug 2017
54Hispanic & Latina womenSep 2017
55Olympic womenSep 2017
  • latest: to show a specified number of the latest events. In this case |first= and |last= will be ignored. For example, {{#invoke:Women in Red event|list|latest=3}} produces
MeetupNameDate
308LGBTQ+ women | Wiki Loves PrideJun 2024
309Women in MusicJun 2024
310Alphabet run: X–ZJun 2024

Columns[edit]

The columns of the table can be customised by setting various parameters to yes or no.

  • meetup: shows or hides a column with the meetup number. By default this column is shown. If a background colour is defined then it will be used in this cell.
  • logo: enables a column to show the logo associated with each event.
  • series: enables a column to show the series (if applicable) of each event.
  • name: enables a column to show the name of each event, and a link to the meetup page. This will be shown by default.
  • date: shows or hides a column which displays the date of each event. Shown by default.
  • template: column to show the syntax for the template using the shortcut {{WIR}}
  • wrapper (deprecated): column to show the wrapper template for each event. These are no longer in general use.
  • category: enables a column which links to the category for articles created by each event, along with the population of that category.

Examples[edit]

The table currently shown on Wikipedia talk:WikiProject Women in Red/events is produced by the syntax {{#invoke:Women in Red event|list|logo=yes|series=yes|wrapper=yes|category=yes}}.

The table currently shown on Template:WikiProject Women in Red/doc is produced by the syntax {{#invoke:Women in Red event|list|latest=10|template=yes}} which produces the following:

MeetupNameDateTemplate
301Find HerMar 2024{{WIR|301}}
302Alphabet run: S & T Apr 2024{{WIR|302}}
303Gender studiesApr 2024{{WIR|303}}
304HealthApr 2024{{WIR|304}}
305Press womenMay 2024{{WIR|305}}
306Alphabet run: U–WMay 2024{{WIR|306}}
307Geofocus: Central and Eastern EuropeMay 2024{{WIR|307}}
308LGBTQ+ women | Wiki Loves PrideJun 2024{{WIR|308}}
309Women in MusicJun 2024{{WIR|309}}
310Alphabet run: X–ZJun 2024{{WIR|310}}

event_list_by_year function[edit]

Produces a list of all past events in a particular year, for use in Template:Women in Red navigation.

For example, {{#invoke:Women in Red event|event_list_by_year|2023}} produces:

count_banners function[edit]

Used by Template:WikiProject Women in Red to count the number of WIR banners on the page, and output a category if this number is more than 1, i.e. there are multiple banners on the same page. It looks for templates of the form {{WikiProject Women in Red...}}. The categories are shown in Category:Pages with multiple WikiProject Women in Red banners.

current_events function[edit]

Produces a list of current and upcoming events, for navigational purposes at the top of meetup pages.

For example:

  • {{#invoke:Women in Red event|current_events}} produces
Recently completed: Alphabet run: S & T Gender studies Health
May 2024: Press women Alphabet run: U–W Geofocus: Central and Eastern Europe
Ongoing initiatives: #1day1woman Education
Upcoming events: LGBTQ+ women | Wiki Loves Pride Women in Music Alphabet run: X–Z Ideas

events function[edit]

{{#invoke:Women in Red event|events}}

Produces a list of current, upcoming and recently completed events, for use on Wikipedia:WikiProject Women in Red/Events. It has a number of optional parameters:

  • monthly - include a section for edit-a-thons in the current month. This parameter defines the heading, e.g. |monthly=Happening now
  • ongoing - include a section for ongoing initiatives or contests. This parameter defines the heading, e.g. |ongoing=Ongoing initiatives
  • upcoming - include a section for upcoming events. This parameter defines the heading, e.g. |upcoming=Coming up
  • recent - include a section for recently completed events (i.e. events in the previous month). This parameter defines the heading, e.g. |recent=Recently completed
  • past - include a section for all past events (except recently completed). This parameter defines the heading, e.g. |past=Past events

category_header function[edit]

Used by Template:WIR category to produce a header for various categories. Please see that template's documentation.

addDateCategories function[edit]

pinterest function[edit]