Home
Random
Log in
Settings
About The Republic Wiki
Disclaimers
The Republic Wiki
Search
Editing
Module:SDcat/doc
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
The edit appears to have already been undone.
Anti-spam check. Do
not
fill this in!
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> {{High risk}} {{cascade-protected template|page=module}} Module to check whether local short description matches that on Wikidata setCat has the qid of a Wikidata entity passed as |qid= (it defaults to the associated qid of the current article if omitted) and the local short description passed as |sd= It returns a category if there is an associated Wikidata entity. It returns one of the following tracking categories, as appropriate: * Category:Short description matches Wikidata (case-insensitive) * Category:Short description is different from Wikidata * Category:Short description with empty Wikidata description For testing purposes, a link prefix |lp= may be set to ":" to make the categories visible. == Usage == ; From within a template : <code><nowiki>{{SDcat |sd={{{shortdescription|}}} }}</nowiki></code> : or : <code><nowiki>{{#invoke:SDcat |setCat |sd={{{shortdescription|}}} }}</nowiki></code> [[Template:SDcat]] is a wrapper for this module. ; From another module : <code>sdcat = require("Module:SDcat")._setCat</code> : <code>local tracking_cat = sdcat(shortdesc, itemID)</code> === For testing === <code><nowiki>{{#invoke:SDcat |setCat |qid={{get QID|Douglas Adams}}|sd=English author and humorist (1952β2001) |lp=":"}}</nowiki></code> A few examples of tests are at [[Module talk:SDcat]] <includeonly>{{Sandbox other|| [[Category:Short description related modules]] }}</includeonly> <noinclude> [[Category:Module documentation pages]] </noinclude>
Summary:
Please note that all contributions to The Republic Wiki are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) (see
The Republic Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Cascade-protected template
(
edit
)
Template:High-use
(
edit
)
Template:High risk
(
edit
)
Template:Mbox
(
edit
)
Module:Arguments
(
edit
)
Module:High-use
(
edit
)
Module:Message box
(
edit
)
Module:Message box/configuration
(
edit
)
Module:Message box/ombox.css
(
edit
)
Module:Transclusion count
(
edit
)
Module:Transclusion count/data/S
(
edit
)
Module:Yesno
(
edit
)