Module:Citation/CS1/doc/Importing the Module:Citation/CS1 suite to your wiki
![]() | This page in a nutshell: This is draft to an introductory how-to import Module:Citation/CS1 and submodules to another wiki. See more on Help_talk:Citation_Style_1#Copying_module_to_other_wikis. |
According to Help:Citation Style 1: "Citation Style 1 (CS1) is a collection of reference citation templates that can be modified to create different styles for different referenced materials. Its purpose is to provide a set of default formats for references on Wikipedia. It includes a series of templates that in turn use Module:Citation/CS1."
As an example of a template see {{Cite web}}. The template is written in Lua and it calls Module:Citation/CS1 and a number of (sub)modules.
Basicly to make this work on another wiki you need
- To import/copy the 9 (sub)modules etc. listed on Module:Citation/CS1/doc
- One or more of the templates listed on Help:Citation_Style_1#Templates
- Modify the modules to work on your wiki
This page will try to tell you how to modify the module. Examples from the Danish Wikipedia is used but if/when other wikis also have examples please add them at the relevant place.
Module:Citation/CS1
Module:Citation/CS1 contains rendering and support functions. <Please add more text. Remember it may be used by by someone that is not an expert in coding and not a native English user. So better to add extra info and help links than to assume reader will know/understand.>
What to modify in ~CS1 on your wiki
<examples from Danish Wikipedia pending>
Module:Citation/CS1/Configuration
Module:Citation/CS1/Configuration contains translation tables; error and identifier handlers. <Please add more text. Remember it may be used by by someone that is not an expert in coding and not a native English user. So better to add extra info and help links than to assume reader will know/understand.>
What to modify in ~Configuration on your wiki
<examples from Danish Wikipedia pending>
Module:Citation/CS1/Whitelist
Module:Citation/CS1/Whitelist contains lists of active and deprecated CS1|2 parameters. <Please add more text. Remember it may be used by by someone that is not an expert in coding and not a native English user. So better to add extra info and help links than to assume reader will know/understand.>
What to modify in ~Whitelist on your wiki
<examples from Danish Wikipedia pending>
Module:Citation/CS1/Date validation
Module:Citation/CS1/Date validation contains date format validation functions. <Please add more text. Remember it may be used by by someone that is not an expert in coding and not a native English user. So better to add extra info and help links than to assume reader will know/understand.
For example I'm thinking it would be good to explain yMd and the other use of letters related to dates.>
What to modify in ~Date validation on your wiki
<examples from Danish Wikipedia pending>
Module:Citation/CS1/Identifiers
Module:Citation/CS1/Identifiers contains functions that support the named identifiers (ISBN, DOI, PMID, etc.). <Please add more text. Remember it may be used by by someone that is not an expert in coding and not a native English user. So better to add extra info and help links than to assume reader will know/understand.>
What to modify in ~Identifiers on your wiki
<examples from Danish Wikipedia pending>
Module:Citation/CS1/Utilities
Module:Citation/CS1/Utilities contains common functions and tables. <Please add more text. Remember it may be used by by someone that is not an expert in coding and not a native English user. So better to add extra info and help links than to assume reader will know/understand.>
What to modify in ~Utilities on your wiki
<examples from Danish Wikipedia pending>
Module:Citation/CS1/COinS
Module:Citation/CS1/COinS coontains functions that render a CS1|2 template's metadata used for COinS. <Please add more text. Remember it may be used by by someone that is not an expert in coding and not a native English user. So better to add extra info and help links than to assume reader will know/understand.>
What to modify in ~COinS on your wiki
<examples from Danish Wikipedia pending>
Module:Citation/CS1/styles.css
Module:Citation/CS1/styles.css contains CSS styles applied to the CS1|2 templates.
<Please add more text. Remember it may be used by by someone that is not an expert in coding and not a native English user. So better to add extra info and help links than to assume reader will know/understand.>
Here you can define how it should look if when websites are free, requires registration etc.
- "Example of a free site".
- "Example of a free site (doi)". doi:10.12345/rfc1234.
- "Example of a registration site".
- "Example of a limited site".
- "Example of a subscription site".
See more help/info on Template:Cite_web/doc#Subscription_or_registration_required. On how it looks.
What to modify in ~styles.css on your wiki
If you are happy with the same format at used on English Wikipedia no changes are needed. Danish Wikipedia have made no changes.
But if you for example want to change the red lock to some bills and coins you can change this line (# 59 when this text was written)
url(/media/wikipedia/commons/a/aa/Lock-red-alt-2.svg)
<Other examples of what to change and how?>
Module:Citation/CS1/
Module:Citation/CS1/Suggestions contains lists that maps common erroneous parameter names to valid parameter names. <Please add more text. Remember it may be used by by someone that is not an expert in coding and not a native English user. So better to add extra info and help links than to assume reader will know/understand.>
What to modify in ~Suggestions on your wiki
<examples from Danish Wikipedia pending>
See also
- Lua - an page on how Lua works.
- Lua patterns.
- <link to relevant help pages>