Citoid/Aktivera Citoid på din wiki
Citoid är en automatiskt ifylld källgenerator som automatiskt skapar källmallar baserade på URLer eller en akademisk referenskod såsom DOIs, PMIDs, PMCIDs och ISBN. Den är för närvarande tillgänglig som en VisualEditor-funktion och i 2017 års wikitextredigerare . Citoid använder Zotero-översättare för att konvertera en sidlänk till detaljerad information.

Steg 1: Aktivera källmallsverktyget
Citoid-servicen använder källverktyget i VisualEditor. Detta är redan aktiverat på de flesta stora Wikipedias och många mindre projekt. Om källverktyget är aktiverat kommer "Ange källa"-menyn att lista en eller flera lokala källmallar utöver "Enkel" och "Återanvänd". Om citatverktyget inte är aktiverat måste du aktivera det innan du fortsätter genom att följa stegen som beskrivs i avsnittet Definition av citatverktyg. Varje källmall måste ha normal MallData för att fungera.
Steg 2: Konfigurera Citoid
Utökningen Citoid måste konfigureras med hjälp av speciella MallData-kartor och en speciell Citoid-specifik sida. Det är viktigt att utföra dessa två steg i ordning!
Step 2.a: Check your wiki has citation templates
If your local wiki has citation templates, proceed to step 2.b. If it does not, you'll need to create or import some first.
Steg 2.a: Skapa 'citoid'-kartors värden för varje källmall
[]
eller tvådimensionella Arrays [[]]
i citoidkartan. Fler detaljer
Då Citoid har sina egna parametrar för varje dokumenttyp (t.ex. kallas tidningens namn "publicationTitle" i Citoid, men "journal" i Mall:tidningsref) du måste lägga till en speciell mappning som kallas "citoid" i objektet maps
för TemplateData för varje citatmall.
If you prefer using wikitext, edit <templatedata />
(usually inside a /doc
or /TemplateData
subpage) and add the citoid
mapping in the maps
object:
{
"description": "…",
"params": {…},
"paramOrder": […],
"maps": {
"citoid": {
…,
"publicationTitle": "journal",
…
}
},
"format": "{{_ |_=_}}"
}
This special mapping creates a map between Citoid's fields and the template's fields.
Kartan måste heta 'citoid' för att låta Citoid-tillägget veta vilken karta den ska leta efter.
An unlimited number of maps with unique keys are allowed in the maps
object.
Note that you can only see TemplateData maps in edit mode; they are not visible in the TemplateData table.
If you recently created TemplateData for your wiki by copying it from English Wikipedia, it probably already includes the Citoid maps.
However if the TemplateData is too old, it may not contain it.
De mest uppdaterade kartobjekten som är kompatibla med Citoid-tillägget finns på engelska Wikipedia:
- w:Template:Cite news/doc
- w:Template:Cite journal/doc
- w:Template:Cite web/doc
- w:Template:Cite book/TemplateData
- w:Template:Citation/doc
Steg 2.b: Konfigurera en speciell MediaWikisida
Du måste konfigurera en speciell MediaWiki: namnrymdssida, MediaWiki:Citoid-template-type-map.json
.
This message maps the 34 native Citoid types (artwork
, book
, journalArticle
, tvBroadcast
, website
, etc.) to the appropriate templates (Cite web, Cite book, Cite journal, etc.).
Du bör matcha en lokal källmall till varje Citoidtyp. Om ingen mall finns kommer inte Citoid att fungera. Det är bättre att ha en felaktig matchning än ingen alls. Som exempel kanske din wiki inte har en mall för att källreferera extramaterial i DVDfodral, så överväg att använda en mall för böcker eller filmer i detta fall. Du kan använda en generisk mall såsom t.ex. engelskspråkiga wikis Template:Citation som en reservmall för typer där det inte finns en bra mall för den typ av källa du matchar.
Ett exempel på namnrymndssida finns på engelskspråkiga Wikipedua: $url.
Felsökning
Den nya källknappen syns inte i verktygsfältet

När du skapar MediaWikisidan i steg 2.b ska den föregående rullgardinsmenyn för källor (File:VisualEditor_-_Cite_Pulldown.png) ersättas av en ny knapp för Citoidservicen i verktygsfältet. Om den nya knappen inte syns kan ett problem med MediaWiki:Citoid-template-type-map.json föreligga. Om denna sida inte existerar lokalt, eller om JSON-koden på den sidan är felaktig, kommer Citoid inte att fungera. Du kan även behöva förnya din JavaScript cache.
Vi kunde inte skapa en referens åt dig.
If this message occurs for every or most citations, then you may be trying to insert citation templates that have no maps data. Check your browser console as you will see a warning with the name of the template if this is the case. Tomma referenser är vanligast när du försöker infoga en källmall som inte har någon karta. Detta problem dyker också up om mallen har karta, men datan når inte MediaWikis API. Om kartan finns i MallData-blocket i mallens dokumentation, försök då göra en "tom redigering" på mallen. Also ensure that blank template data on the template page itself isn't over-writing the template data from a transcluded documentation page. Om det inte hjälper kan problemet ligga hos kartan. Note that if this error occurs inconsistently, then there may just be a problem with the particular url you're trying to cite. To check this, try citing the url from the API. If it doesn't work there either, it is not a config issue.
Min favoritsajt erkänns inte av Citoid och jag får bara enkel information
Citoidservicen förlitar sig på den lysande Zoterogemenskapen för mycket av "magin" så Zoteroöversättare måste skrivas för varje webbplats. Du kan se en lista på alla Zoteroöversättare på https://github.com/zotero/translators. I nuläget fungerar Zotero bäst på engelskspråkiga källor. Vi behöver din hjälp med att förbättra täckningen av andra webbplatser. Du kan skriva din egen Zoteroöversättare. Börja med att titta på en befintlig översättare för en liknande webbplats, och läs guiden på Citoid/Creating Zotero translators.
Dates are formatted differently on my wiki
Dates with full information (month, year, and day) are in ISO format, which is an international standard. If the community doesn't like the way this looks to the user, it is possible to edit the citation template to format the ISO dates to something that is standard in your language. For instance, you can add logic to the template such that if the date is detected to be in ISO yyyy-mm-dd format, the date is reformatted *to appear* to be dd/mm/yyyy on the page. However, if you do this, the underlying data (i.e. when you edit the wikitext, or the form in VisualEditor) will still remain the same.
Dates with only month and year are in also in ISO (YYYY-MM) but these are not accepted by some citation templates. See T132308.
Many language wiki templates (pl, it, en) don't accept xx-XX style language codes
See T115326 for the related task. See the thread at T97256 to learn how different wikis decided to workaround this limitation.
Se även
- Zoterohandledning
- Zotero översättningsserver -- xpcshellbaserad Zotero översättningsserver och zoteronode, en övergiven ekvivalent till nodejs
- Giltiga parameternamn för varje typ
- Zotero parameterkartor
- Research:Citoid support for Wikimedia references
- https://www.zotero.org/support/dev/translators/testing
- Learn how to write a translator with Sebastian Karcher, Zotero (video, slides, links)
- List of websites with Zotero translators
- Examples of different itemType URLs
- James Forrester talks Citoid and Zotero at m:WikiCite 2017