This module has various functons that use the list of WikiProject Women in Red events stored at . These are used in
and elsewhere.
<nowiki>{{</nowiki>#invoke:Women in Red event|''main''<nowiki>|event|field}}</nowiki>
Given an event number, reads one of the fields (event, year, month, type, image, series). For example:
<nowiki>{{#invoke:Women in Red event|main|294|name}}</nowiki>
gives ""<nowiki>{{#invoke:Women in Red event|main|7|year}}</nowiki>
gives ""<nowiki>{{#invoke:Women in Red event|main|293|series}}</nowiki>
gives ""A third optional parameter, allows you to specify a default value if none is defined. For example:
<nowiki>{{#invoke:Women in Red event|main|291|type|edit-a-thon}}</nowiki>
gives "" because there is no type
value defined for 291.A option allows you to remove the # character from the output (this is sometimes useful because this character can upset the formatting of a page and it is not possible to have this character in a page name). For example:
<nowiki>{{#invoke:Women in Red event|main|293|series|hash=no}}</nowiki>
gives ""<nowiki>{{</nowiki>#invoke:Women in Red event|''name''<nowiki>|event}}</nowiki>
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:
<nowiki>{{#invoke:Women in Red event|name|294}}</nowiki>
gives ""<nowiki>{{#invoke:Women in Red event|name|7}}</nowiki>
gives ""<nowiki>{{#invoke:Women in Red event|name|236}}</nowiki>
gives ""<nowiki>{{</nowiki>#invoke:Women in Red event|''text''<nowiki>|event}}</nowiki>
Produces a piped link to the event page followed by the date, for use in the project banner. For example:
<nowiki>{{</nowiki>#invoke:Women in Red event|text<nowiki>|291}}</nowiki>
gives ""<nowiki>{{</nowiki>#invoke:Women in Red event|''date''<nowiki>|event|sentence|abbrev}}</nowiki>
Produces a formatted date (including month and year) of the event. For example:
<nowiki>{{#invoke:Women in Red event|date|210}}</nowiki>
gives ""This function takes two optional parameters:
Both of these options may be used simultaneously, but the output is slightly awkward, e.g. ""
<nowiki>{{</nowiki>#invoke:Women in Red event|''findLatest''<nowiki>|add}}</nowiki>
Shows the latest event number to be defined (currently), ignoring the quasi event numbers "2017" and "2018". For example
<nowiki>{{#invoke:Women in Red event|findLatest}}</nowiki>
gives ""An optional parameter can be used to add or subtract numbers to the latest. For example
<nowiki>{{#invoke:Women in Red event|findLatest|add=1}}</nowiki>
gives ""<nowiki>{{#invoke:Women in Red event|findLatest|add=-5}}</nowiki>
gives ""<nowiki>{{</nowiki>#invoke:Women in Red event|''list''<nowiki>|first|last|latest|meetup|logo|series|name|date|template|wrapper|category}}</nowiki>
Produce a table of events, for various purposes. The following parameters are recognised.
For example <nowiki>{{#invoke:Women in Red event|list|first=52|last=55}}</nowiki>
produces
For example, <nowiki>{{#invoke:Women in Red event|list|latest=3}}</nowiki>
produces
The columns of the table can be customised by setting various parameters to yes
or no
.
If any other columns are required, please ask one of the module's maintainers.
The table currently shown on is produced by the syntax <nowiki>{{#invoke:Women in Red event|list|logo=yes|series=yes|wrapper=yes|category=yes}}</nowiki>
.
The table currently shown on is produced by the syntax <nowiki>{{#invoke:Women in Red event|list|latest=10|template=yes}}</nowiki>
which produces the following:
<nowiki>{{</nowiki>#invoke:Women in Red event|''event_list_by_year''<nowiki>|year}}</nowiki>
Produces a list of all past events in a particular year, for use in .
For example, <nowiki>{{#invoke:Women in Red event|event_list_by_year|2023}}</nowiki>
produces:
<nowiki>{{</nowiki>#invoke:Women in Red event|''current_events''<nowiki>|year|month}}</nowiki>
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.month
- specify the month as a number between 1-12. If the year is specified then the month will default to 1, i.e. January.The labels in front of the boxes can be customised with the following parameters:
recent
current
ongoing
upcoming
<nowiki>{{#invoke:Women in Red event|current_events}}</nowiki>
produces:<nowiki>{{#invoke:Women in Red event|current_events|year=2023|month=2|ongoing=Still happening|upcoming=Coming up}}</nowiki>
produces:<nowiki>{{</nowiki>#invoke:Women in Red event|''events''<nowiki>}}</nowiki>
Produces a list of current, upcoming and recently completed events, for use on . 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.ongoing
- include a section for ongoing initiatives or contests. This parameter defines the heading, e.g.upcoming
- include a section for upcoming events. This parameter defines the heading, e.g.recent
- include a section for recently completed events (i.e. events in the previous month). This parameter defines the heading, e.g.past
- include a section for all past events (except recently completed). This parameter defines the heading, e.g.<nowiki>{{</nowiki>#invoke:Women in Red event|''category_header''<nowiki>}}</nowiki>
Used by to produce a header for various categories. Please see that template's documentation.
<nowiki>{{</nowiki>#invoke:Women in Red event|''addDateCategories''|event<nowiki>}}</nowiki>
Used by to add appropriate categories to meetup pages. This function takes the event number as the first positional parameter.
<nowiki>{{#invoke:Women in Red event|addDateCategories|300}}</nowiki>
produces the categories and .
<nowiki>{{</nowiki>#invoke:Women in Red event|''pinterest''<nowiki>|event}}</nowiki>
Generates a link to Pinterest collection based on the date of the event.
The link is of the form <nowiki>https://www.pinterest.com/wikiwomeninred/MONTH-YEAR-editathons</nowiki>
where MONTH
and YEAR
are replaced with the relevant month and year. For annual events, the month of January is used.
<nowiki>{{</nowiki>#invoke:Women in Red event|''pinterest''|{{#invoke:Women in Red event|findLatest|add=-10}}<nowiki>}}</nowiki>
produces