Jump to content

Template:Censor: Difference between revisions

From LithoGraphica
Reversedragon (talk | contribs)
demo
 
Reversedragon (talk | contribs)
m title parameter - I thought this was already on here but I guess not
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{HueCSS}}
<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><!--
<pre style="display: none;"><onlyinclude>{{TTS|html=s|class=censor|{{{1}}}|{{{tts|redacted}}}}}</onlyinclude></pre>
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 ==


Item with {{censor|bad word}} name
Item with {{censor|bad word}} name


SCP-540 was recently moved to site {{censor|tts=redacted|██}}
... 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, but only in the label or alias fields.
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 "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 ==
 
* <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>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 ===
 
* <code>html</code>  - HTML tag to use.
* <code>class</code> - CSS classname.
 
== Internal templates ==


In visual browsers, the word will be visible when highlighted. In text-to-speech, it will be pronounced "redacted", 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.
* [[Template:TTS]] - used to specify HTML tag plus pronunciation.




[[Category:Templates for text markup]]
[[Category:Templates for markup]] [[Category:Pages serving as current format examples]]  {{ArticleTitle|NoContents=y}}

Latest revision as of 01:19, 5 May 2026

Demo

Item with pronounced censored 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 pronounced censored" ...

Template:redacted

SCP-540 was recently moved to site pronounced redacted

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 "pronounced Unicode full block" character.
  • t3 - Text to appear after redaction, such as plural ending of swear word.
  • tts2 - Not displayed. When words are chopped in two with t1 or t3, 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