Module:Citation/CS1: Difference between revisions
From All Skies Encyclopaedia
imported>Uncle G (Started module.) |
imported>Uncle G (Expanded SFNID function.) |
||
Line 6: | Line 6: | ||
-- This is used by templates such as {{SfnRef}} to create the (encoded) anchor name for a Harvard cross-reference hyperlink. |
-- This is used by templates such as {{SfnRef}} to create the (encoded) anchor name for a Harvard cross-reference hyperlink. |
||
function p.SFNID() |
function p.SFNID() |
||
local pframe = frame:getParent() |
|||
return "CITEREF" |
|||
local P1 = pframe.args[1] or "" |
|||
local P2 = pframe.args[2] or "" |
|||
local P3 = pframe.args[3] or "" |
|||
local P4 = pframe.args[4] or "" |
|||
local P5 = pframe.args[4] or "" |
|||
return "CITEREF" .. P1 .. P2 .. P3 .. P4 .. P5 |
|||
end |
end |
||
return p |
return p |
Revision as of 11:13, 25 August 2012
<section begin=header />
![]() | This Lua module is used on approximately 6,110,000 pages. To avoid major disruption and server load, any changes should be tested in the module's /sandbox or /testcases subpages, or in your own module sandbox. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
![]() | This module is subject to page protection. It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing. |
![]() | This module can only be edited by administrators because it is transcluded onto one or more cascade-protected pages. |
Lua error: bad argument #1 to "get" (not a valid title).<section end=header /> This module and associated sub-modules support the Citation Style 1 and Citation Style 2 citation templates. In general, it is not intended to be called directly, but is called by one of the core CS1 and CS2 templates. <section begin=module_components_table /> These files comprise the module support for CS1|2 citation templates:
<section end=module_components_table />
Other documentation:
- Module talk:Citation/CS1/Feature requests
- Module talk:Citation/CS1/COinS
- Module:Cs1 documentation support – a set of functions (some experimental) that extract information from the module suite for the purpose of documenting CS1|2
- Module:Citation/CS1/doc/Category list – lists of category names taken directly from Module:Citation/CS1/Configuration and Module:Citation/CS1/Configuration/sandbox
testcases
- Module:Citation/CS1/testcases (run)
- Module:Citation/CS1/testcases/errors (run) – error and maintenance messaging
- Module:Citation/CS1/testcases/dates (run) – date validation
- Module:Citation/CS1/testcases/identifiers (run) – identifiers
- Module:Citation/CS1/testcases/anchor (run) – CITEREF anchors
local p = {}
-- This is used by templates such as {{Harvard citation}} to create the Harvard footnote.
function p.Harvard()
return "PLACEHOLDER"
end
-- This is used by templates such as {{SfnRef}} to create the (encoded) anchor name for a Harvard cross-reference hyperlink.
function p.SFNID()
local pframe = frame:getParent()
local P1 = pframe.args[1] or ""
local P2 = pframe.args[2] or ""
local P3 = pframe.args[3] or ""
local P4 = pframe.args[4] or ""
local P5 = pframe.args[4] or ""
return "CITEREF" .. P1 .. P2 .. P3 .. P4 .. P5
end
return p