Template:Censor: Difference between revisions
del tag / class parameter / Parameters section |
m title parameter - I thought this was already on here but I guess not |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly><onlyinclude>{{TTS|html={{{html|del}}}|class={{{class|censor}}}|{{{1}}}|{{{tts| | <includeonly><onlyinclude>{{#switch:{{{ParameterThatShouldAlwaysBeEmpty|}}} | {{{2|}}}{{{3|}}} = {{TTS|html={{{html|del}}}|class={{{class|censor}}}|{{{1}}}|{{{tts|censored}}}|title={{{title|censored}}}}} | #default = {{TTS|html={{{html|del}}}|class={{{class|censor}}}|t1={{{1}}}|{{{2}}}|t3={{{3|}}}|{{{tts|censored}}}|title={{{title|censored}}}}} }}</onlyinclude></includeonly><!-- | ||
more readable version: | |||
{{#switch:{{{ParameterThatShouldAlwaysBeEmpty|}}} | |||
| {{{2|}}}{{{3|}}} = {{TTS|html={{{html|del}}}|class={{{class|censor}}}|{{{1}}}|{{{tts|censored}}}|title={{{title|censored}}}}} | |||
| #default = {{TTS|html={{{html|del}}}|class={{{class|censor}}}|t1={{{1}}}|{{{2}}}|t3={{{3|}}}|{{{tts|censored}}}|title={{{title|censored}}}}} | |||
}} | |||
--> | --> | ||
== Demo == | == Demo == | ||
| Line 5: | Line 11: | ||
Item with {{censor|bad word}} name | Item with {{censor|bad word}} name | ||
SCP-540 was recently moved to site {{ | ... the way literally all discourse in the United States has become this weird game of "how do we rationally convince the bourgeoisie to not be {{censor||asshole|s|tts2=assholes}}" ... | ||
=== [[Template:redacted]] === | |||
SCP-540 was recently moved to site {{redacted|██}} | |||
=== [[Template:thingamabob]] === | |||
all mimsy were the {{thingamabob|borogoves}}, and the {{thingamabob|mome raths}} {{thingamabob|outgrabe}} | |||
== Description == | == Description == | ||
This is a template for superficially hiding words. It may be used to comply with rules about language on Item pages, | This is a template for superficially hiding words. It may be used to comply with rules about language on Item pages, although this should only be done either in the label or alias fields of an Item page, or on [[:Category:Next nine thousand (RD)|prototypes]] which are not intended to be live Item pages. | ||
In visual browsers, the word will be visible when highlighted. In text-to-speech, it will be pronounced " | In visual browsers, the word will be visible when highlighted. In text-to-speech, it will be pronounced "censored", or as the string specified with <code>tts</code>. Whatever string was originally entered can still always be viewed in the page's "edit" tab unless you decide to replace it with block characters. | ||
== Parameters == | == Parameters == | ||
* <code>tts</code> | * <code>tts</code> - Pronunciation for redacted text. Specify this first so that if screen readers are attempting to edit a page as plain text the TTS-friendly text is said before the "irrelevant" visual text which will be not be read as deleted. | ||
* <code>1</code> | * <code>t1</code> - Text to appear before redaction, such as start of swear word. | ||
* <code>1</code> / <code>2</code> - Text to be redacted, which will be visible on highlight but not pronounced. For a more authentic effect, you can eyeball the space taken up by the string and fill it with the "{{TTS|tts=Unicode full block|█|title=full block}}" character. | |||
* <code>t3</code> - Text to appear after redaction, such as plural ending of swear word. | |||
* <code>tts2</code> - Not displayed. When words are chopped in two with <code>t1</code> or <code>t3</code>, or you wish to make a word both invisible on page and searchable in editing, use this to include an un-chopped censored word for search purposes. | |||
* <code>title</code> - Text to be shown on tooltip. (optional) | |||
=== Only for use in other Templates === | === Only for use in other Templates === | ||
Latest revision as of 01:19, 5 May 2026
Demo
Item with name
... the way literally all discourse in the United States has become this weird game of "how do we rationally convince the bourgeoisie to not be " ...
Template:redacted
SCP-540 was recently moved to site
Template:thingamabob
all mimsy were the borogoves, and the mome raths outgrabe
Description
This is a template for superficially hiding words. It may be used to comply with rules about language on Item pages, although this should only be done either in the label or alias fields of an Item page, or on prototypes which are not intended to be live Item pages.
In visual browsers, the word will be visible when highlighted. In text-to-speech, it will be pronounced "censored", or as the string specified with tts. Whatever string was originally entered can still always be viewed in the page's "edit" tab unless you decide to replace it with block characters.
Parameters
tts- Pronunciation for redacted text. Specify this first so that if screen readers are attempting to edit a page as plain text the TTS-friendly text is said before the "irrelevant" visual text which will be not be read as deleted.t1- Text to appear before redaction, such as start of swear word.1/2- Text to be redacted, which will be visible on highlight but not pronounced. For a more authentic effect, you can eyeball the space taken up by the string and fill it with the "" character.t3- Text to appear after redaction, such as plural ending of swear word.tts2- Not displayed. When words are chopped in two witht1ort3, or you wish to make a word both invisible on page and searchable in editing, use this to include an un-chopped censored word for search purposes.title- Text to be shown on tooltip. (optional)
Only for use in other Templates
html- HTML tag to use.class- CSS classname.
Internal templates
- Template:TTS - used to specify HTML tag plus pronunciation.