Edge Rewrite
// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a25cad77af7f7fd8

Jump to content

Module:P703/doc

From Wikipedia, the free encyclopedia

Description

[edit]

This module displays organisms from Wikidata property P703 ("found in taxon") with inline citations extracted directly from Wikidata references. It is completely self-contained with zero external module dependencies, making it easily transferable across all Wikimedia projects.

Key Features

[edit]
  • Zero dependencies: No reliance on language-specific citation or Wikidata modules
  • Inline citations: Automatically extracts and formats bibliographic data from Wikidata
  • Smart interwiki linking: Links to local articles, fallback to other languages, or Wikidata
  • Highly configurable: Customizable display count and citation behavior
  • Internationalization ready: Easy to translate via i18n table

Usage

[edit]

Basic Syntax

[edit]
{{#invoke:P703|main}}

With Custom Parameters

[edit]
{{#invoke:P703|main|qid=Q3613679|numval=10|sources=true}}

In Infoboxes

[edit]
|organisms={{#if: {{#property:P703}} | {{#invoke:P703|main}} | }}

Parameters

[edit]
ParameterDescriptionDefault ValueValid Values
qidWikidata entity ID to queryCurrent page's QIDAny valid Q-identifier (e.g., Q3613679)
numvalMaximum organisms to display5Any positive integer
sourcesDisplay inline citationstruetrue, false, yes, no

Behavior

[edit]

The module adapts its output based on the number of organisms found:

ScenarioOutput FormatExample
No organismsReturns localized "no known organism" messageno known organism
1–n organismsShows count and complete list3 organisms: Human, Mouse, Rat
More than n organismsShows count with "including" prefix15 organisms, including: Human, Mouse, Rat, Dog, Cat

Examples

[edit]

Example 1: Standard Use (Current Page)

[edit]
{{#invoke:P703|main}}

Output: 2 organisms: Human, Mouse

Example 2: Specific Entity

[edit]
{{#invoke:P703|main|qid=Q3613679}}

Output: Displays organisms for Wikidata item Q3613679

Example 3: Display 20 Organisms

[edit]
{{#invoke:P703|main|numval=20}}

Output: 25 organisms, including: [first 20 organisms]

Example 4: Without Citations

[edit]
{{#invoke:P703|main|sources=false}}

Output: 5 organisms: Human, Mouse, Rat, Dog, Cat (no reference tags)

Example 5: Combine All Parameters

[edit]
{{#invoke:P703|main|qid=Q2079986|numval=3|sources=true}}

Output: 10 organisms, including: Organism₁[1], Organism₂[2], Organism₃[3]

Citation Format

[edit]

When sources=true (default), the module automatically extracts and formats bibliographic data from Wikidata references:

Supported Fields:

  • Authors (up to 3, then "et al.")
  • Article title (with optional URL)
  • Journal name (italicized)
  • Volume (bold) and issue number
  • Page numbers
  • Publication year
  • DOI and PMID identifiers

Example Citation:

Smith J, Jones A, Williams B et al. "Protein Expression in Model Organisms". 
Nature Genetics 45 (3): pp. 123-130. (2023). doi:10.1038/ng.3456. pmid:12345678.

Interwiki Linking Logic

[edit]

The module intelligently chooses the best link for each organism:

  1. Local wiki article exists[[Local Article|Label]]
  2. Article exists on another wikiLabel (lang)
  3. No article foundLabel (d)

This ensures users can always access information about the organism, even if no local article exists.

Internationalization

[edit]

To adapt this module for other languages, edit the i18n table in the code:

local i18n = {
    no_organism = "aucun organisme connu",     -- French example
    including = "dont",
    wd_label = "d",
    separator = ", ",
    organism = "organisme",
    organisms = "organismes"
}

Technical Details

[edit]

Performance Optimizations

[edit]
  • Entity caching: Prevents redundant API calls for referenced sources
  • Lazy evaluation: Only fetches data when needed
  • Efficient claim processing: Stops at numval limit

Zero Dependencies

[edit]

Unlike most modules, P703 is completely self-contained:

  • X mark No Module:LanguageSpecificModule
  • check Direct Wikibase API usage only

This makes it:

  • Easy to deploy on any Wikimedia project
  • Maintainable without external module updates
  • Consistent across different language wikis

Error Handling

[edit]
ScenarioModule Response
No QID providedUses current page's Wikidata item
Invalid QIDReturns "no known organism"
No P703 claimsReturns "no known organism"
Missing reference dataGracefully omits citation
Malformed citation dataIncludes available fields only

See Also

[edit]

License

[edit]

This module is released under CC0 (Public Domain). Feel free to adapt, translate, and deploy on any Wikimedia project without attribution.

  1. ...
  2. ...
  3. ...