Module:Women in Red event/doc
| This is a documentation subpage for Module:Women in Red event. It may contain usage information, categories and other content that is not part of the original module page. |
| This module is rated as beta. It is considered ready for widespread use, but as it is still relatively new, it should be applied with some caution to ensure results are as expected. |
| This Lua module is used on approximately 62,000 pages and changes may be widely noticed. Test changes in the module's /sandbox or /testcases subpages, or in your own module sandbox. Consider discussing changes on the talk page before implementing them. |
Usage
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
- Template:WikiProject Women in Red,
- Template:WIR meetup header,
- Template:WIR category
- Template:Women in Red navigation
and elsewhere.
main function
{{#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"
name function
{{#invoke:Women in Red event|name|event}}
Given an event number, returns the name or the series of the event. If the both the name and the series are defined, then it will prepend the series with a colon. For example:
{{#invoke:Women in Red event|name|294}}gives "Education"{{#invoke:Women in Red event|name|7}}gives "Black women: History"{{#invoke:Women in Red event|name|236}}gives "Alphabet run: C & D"
text function
{{#invoke:Women in Red event|text|event}}
Produces a piped link to the event page followed by the date, for use in the project banner. For example:
{{#invoke:Women in Red event|text|291}}gives "Women who died: 2023 edit-a-thon from December 2023 to January 2024"
date function
{{#invoke:Women in Red event|date|event|sentence|abbrev}}
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
{{#invoke:Women in Red event|findLatest|add}}
Shows the latest event number to be defined (currently 354), ignoring the quasi event numbers "2017" and "2018". For example
{{#invoke:Women in Red event|findLatest}}gives "354"
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 "355"
list function
{{#invoke:Women in Red event|list|first|last|latest|meetup|logo|series|name|date|template|wrapper|category}}
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
| Meetup | Name | Date |
|---|---|---|
| 52 | Women in peace | Aug 2017 |
| 53 | Canadian women | Aug 2017 |
| 54 | Hispanic & Latina women | Sep 2017 |
| 55 | Olympic women | Sep 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
| Meetup | Name | Date |
|---|---|---|
| 352 | Halloween | Oct 2025 |
| 353 | Alphabet run: U, V, W | Nov 2025 |
| 354 | Asian women | Nov 2025 |
Columns
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
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:
| Meetup | Name | Date | Template |
|---|---|---|---|
| 345 | Indigenous women | Aug 2025 | {{WIR|345}} |
| 346 | Film and stage | Aug 2025 | {{WIR|346}} |
| 347 | Alphabet run: Q & R | Sep 2025 | {{WIR|347}} |
| 348 | Women writers & their works | Sep 2025 | {{WIR|348}} |
| 349 | Geofocus: Microstates | Sep 2025 | {{WIR|349}} |
| 350 | Alphabet run: S & T | Oct 2025 | {{WIR|350}} |
| 351 | Women in STEM | Oct 2025 | {{WIR|351}} |
| 352 | Halloween | Oct 2025 | {{WIR|352}} |
| 353 | Alphabet run: U, V, W | Nov 2025 | {{WIR|353}} |
| 354 | Asian women | Nov 2025 | {{WIR|354}} |
event_list_by_year function
{{#invoke:Women in Red event|event_list_by_year|year}}
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:
- INITIATIVES:
- Peace and Diplomacy
- #1day1woman EDIT-A-THONS:
- Folklore
- Women who died: 2023
- Jan:
- Feb:
- Mar:
- Apr:
- May:
- Jun:
- Jul:
- Aug:
- Sep:
- Oct:
- Nov:
- Dec:
current_events function
{{#invoke:Women in Red event|current_events|year|month}}
Produces a list of current, upcoming, recently completed and ongoing events, for navigational purposes at the top of meetup pages. The display on a certain month and year can be specified by using the parameters:
year- specify the 4-digit year, e.g.|year=2022month- specify the month as a number between 1-12. If the year is specified then this will default to 1, i.e. January.
The labels in front of the boxes can be customised with the following parameters:
recentcurrentongoingupcoming
Examples
{{#invoke:Women in Red event|current_events}}produces:
| Recently completed: | |
| November 2025: | |
| Ongoing initiatives: | |
| Upcoming events: |
{{#invoke:Women in Red event|current_events|year=2023|month=2|ongoing=Still happening|upcoming=Coming up}}produces:
| Recently completed: | |
| February 2023: | |
| Still happening: | |
| Coming up: |
events function
{{#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 nowongoing- include a section for ongoing initiatives or contests. This parameter defines the heading, e.g.|ongoing=Ongoing initiativesupcoming- include a section for upcoming events. This parameter defines the heading, e.g.|upcoming=Coming uprecent- include a section for recently completed events (i.e. events in the previous month). This parameter defines the heading, e.g.|recent=Recently completedpast- include a section for all past events (except recently completed). This parameter defines the heading, e.g.|past=Past events
category_header function
{{#invoke:Women in Red event|category_header}}
Used by Template:WIR category to produce a header for various categories. Please see that template's documentation.