This module is the core engine for specific-source templates that cite books hosted at the Internet Archive.
| This module is rated as alpha. It is ready for limited use and third-party feedback. It may be used on a small number of pages, but should be monitored closely. Suggestions for new features or adjustments to input and output are welcome. |
| This module depends on the following other modules: |
This module is the core engine for specific-source templates that cite books hosted at the Internet Archive.
This module acts as a dynamic wrapper and dispatcher. It intercepts specific parameters to build Internet Archive URLs, and passes the remaining formatted data to {{cite book}} or {{cite journal}}.
<includeonly>{{#invoke:IA Citation|BOOK_NAME}}</includeonly><noinclude>
{{Documentation}}
</noinclude>
The BOOK_NAME has an entry in the appropriate Module:IA Citation/data/x file. Example: {{Template:Bosworth-The New Islamic Dynasties}}
Books with multiple editions are routed via |edition=
<includeonly>{{#switch:{{#invoke:Normalize volume and edition|edition|{{{edition|}}}}}
| 1 = {{#invoke:IA Citation|BOOK_NAME_1990}}
| 2 | #default = {{#invoke:IA Citation|BOOK_NAME_2007}}
}}</includeonly><noinclude>
{{Documentation}}
</noinclude>
Each edition (BOOK_NAME_1990 and BOOK_NAME_2007) has an entry in the Module:IA Citation/data/x file. Example: {{Daftary-The Ismailis}}.
Note: {{Normalize volume and edition}} will match on "Second", "2nd", "ii", etc..
Books with multiple volumes are routed via |volume=.
<includeonly>{{#switch:{{#invoke:Normalize volume and edition|volume|{{{volume|}}}}}
| 1 = {{#invoke:IA Citation|BOOK_NAME_V1}}
| 2 = {{#invoke:IA Citation|BOOK_NAME_V2}}
| 3 = {{#invoke:IA Citation|BOOK_NAME_V3}}
| {{#invoke:IA Citation|BOOK_NAME_V1}}
}}</includeonly><noinclude>
{{Documentation}}
</noinclude>
Each volume has an entry in the Module:IA Citation/data/x file. Example: {{Catalogue of Byzantine Seals at Dumbarton Oaks and in the Fogg Museum of Art}}
Note: {{Normalize volume and edition}} will match on "1", "i", "Vol. 1", etc..
|chapter-page= parameter in combination with |chapter=To avoid loading a single large data table into memory, configuration data is split into alphabetical subpages (shards).
The module intercepts template-specific parameters (such as |ia-search= and |ia-display=) to prevent them from causing "unknown parameter" errors in the underlying CS1 template.
The module parses the page= and pages= fields using `mw.ustring` to extract custom routing commands:
(n#): Extracted using the regex pattern %s*%(n([0-9]+)%) to route URLs to specific physical leaves when printed page numbers (like Roman numerals) do not match the digital structure.[term]: Extracted using %s*%[(.-)%] to pass a specific search term to the IA viewer.These markers are stripped from the display text before being rendered in the final Wikipedia citation.
A core feature of this module is its handling of the Internet Archive's restricted viewing modes.
If an editor provides a page number, the module automatically appends that number as a "dummy" search string (e.g., ?q=42). This is a necessary architectural workaround: supplying a search string forces the IA viewer to open and highlight specific pages that might be blocked due to restrictions (similar to Google Books snippet view with search strings).
To accommodate various IA viewing restrictions, display and search behaviors are resolved in the following priority order (Highest to Lowest):
page=42 [search term]|ia-search= or |ia-display= in the Wikipedia template call.Testcases: Template:Catalogue of Byzantine Seals at Dumbarton Oaks and in the Fogg Museum of Art/testcases
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.