Module:Women in Red event/doc explained

Usage

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

and elsewhere.

main function

<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:

A third optional parameter, allows you to specify a default value if none is defined. For example:

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:

name function

<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:

text function

<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:

date function

<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:

This function takes two optional parameters:

Both of these options may be used simultaneously, but the output is slightly awkward, e.g. ""

findLatest function

<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

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

list function

<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

Columns

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.

Examples

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:

event_list_by_year function

<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:

current_events function

<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:

The labels in front of the boxes can be customised with the following parameters:

Examples

events function

<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:

category_header function

<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.

addDateCategories function

<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.

Example

<nowiki>{{#invoke:Women in Red event|addDateCategories|300}}</nowiki> produces the categories and .

pinterest function

<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.

Example