Template:Talk header/testcases

From blackwiki
Jump to navigation Jump to search

Plain

Plain
{{Talk header}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
Plain – no archives
{{Talk header|noarchive=yes}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
Plain – search
{{Talk header|search=yes}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
Plain – search and no archives
{{Talk header|noarchive=yes|search=yes}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
Plain – italic title
{{Talk header|italic title=yes}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
Plain – display_title
{{Talk header|display_title=someRandomTitle}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}

arpol=yes / noarchive

arpol=yes
{{Talk header|arpol=yes}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
arpol=yes – no archives
{{Talk header|arpol=yes|noarchive=yes}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
arpol=yes – search
{{Talk header|arpol=yes|search=yes}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
arpol=yes – search and no archives
{{Talk header|arpol=yes|noarchive=yes|search=yes}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
arpol=yes – italic title
{{Talk header|arpol=yes|italic title=yes}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}

disclaimer=yes / namespace=User talk

disclaimer=yes|namespace=User talk
{{Talk header|disclaimer=yes|namespace=User talk}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
disclaimer=yes|namespace=User talk – no archives
{{Talk header|disclaimer=yes|namespace=User talk|noarchive=yes}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
disclaimer=yes|namespace=User talk – search
{{Talk header|disclaimer=yes|namespace=User talk|search=yes}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
disclaimer=yes|namespace=User talk – search and no archives
{{Talk header|disclaimer=yes|namespace=User talk|noarchive=yes|search=yes}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
disclaimer=yes|namespace=User talk – italic title
{{Talk header|disclaimer=yes|italic title=yes|namespace=User talk}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}

With shortcuts

arpol=yes and shortcuts

WikiProject

bottom=yes

bottom=yes
{{Talk header|bottom=yes}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
bottom=yes – no archives
{{Talk header|bottom=yes|noarchive=yes}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
bottom=yes – search
{{Talk header|bottom=yes|search=yes}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
bottom=yes – search and no archives
{{Talk header|bottom=yes|noarchive=yes|search=yes}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
bottom=yes – italic title
{{Talk header|bottom=yes|italic title=yes}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}

Custom texts

custom_header=Custom header text
{{Talk header|custom_header=Custom header text}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
bottom=yes|custom_header=Custom header text
{{Talk header|bottom=yes|custom_header=Custom header text}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
custom_text=Custom body text
{{Talk header|custom_text=Custom body text}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
Archive notice
{{Talk header|archive notice=yes}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
Archive notice minthreadsleft
{{Talk header|archive notice=yes|minthreadsleft=4}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}

Find sources

Using search_term to change the default search

By default, the pagename is used as the argument to {{find sources}}. This can be altered with the use of |search_term=.

Find sources – control: no params (except demospace=1) shows find sources using the pagetitle
{{Talk header|demospace=1}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
Find sources – with search_term (5-word)
{{Talk header|demospace=1|search_term=United States embargo against Cuba}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
Find sources – with search_term (6-word)
{{Talk header|demospace=1|search_term=Clandestine press of the French Resistance}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
Find sources – with search_term (9-word)
{{Talk header|demospace=1|search_term=Collaboration with the Axis Powers during World War II}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}

Opt-out find sources

The opt-out makes no sense, unless it's opted in before you opt it out. But opt-in is not the default in Template space, so we add param |demospace=1 to simulate the correct namespace so it would be included, then use the opt-out params to hide it again.

Find sources – control 1: no params (except demospace=1) shows find sources
{{Talk header|demospace=1}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
Find sources – control 2: 'find sources=no' is the default
{{Talk header|demospace=1|hide_find_sources=no}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
Opt-out hide_find_sources=yes hides the display
{{Talk header||demospace=1|hide_find_sources=yes}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}

Redo same trio, using alias |demospace=main:

Find sources – control 1: no params (except demospace=main) shows find sources
{{Talk header|demospace=main}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
Find sources – control 2: 'find sources=no' is the default
{{Talk header|demospace=main|hide_find_sources=no}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
Opt-out hide_find_sources=yes hides the display
{{Talk header||demospace=main|hide_find_sources=yes}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}

Param search-domain

Article on medical topics get a different set of links generated by {{find medical sources}} rather than the regular template.

9c-1a. Param search-domain: find medical sources – control 1: no params (except demospace=main) shows find sources
{{Talk header|demospace=main|search-domain=medical}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
9c-1b. Param domain: (same as above)
{{Talk header|demospace=main|domain=medical}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
9c-2a. Param search-domain: find medical sources – control 2: 'find sources=no' is the default
{{Talk header|demospace=main|hide_find_sources=no|search-domain=medical}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
9c-2b. Param domain: (same as above)
{{Talk header|demospace=main|domain=medical|hide_find_sources=no}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
9c-3a. Param search-domain: medical+opt-out hide_find_sources=yes hides the display
{{Talk header|demospace=main|hide_find_sources=yes|search-domain=medical}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
9c-3b. Param domain: (same as above)
{{Talk header|demospace=main|domain=medical|hide_find_sources=yes}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}


9c-4a. Param search-domain: find video sources – control 1: no params (except demospace=main) shows find sources
{{Talk header|demospace=main|search-domain=video game}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
9c-4b. Param domain: (same as above)
{{Talk header|demospace=main|domain=video}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
9c-5a. Param search-domain: find video sources – control 2: 'find sources=no' is the default
{{Talk header|demospace=main|hide_find_sources=no|search-domain=video game}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
9c-5b. Param domain: (same as above)
{{Talk header|demospace=main|domain=video|hide_find_sources=no}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
9c-6a. Param search-domain: video+opt-out hide_find_sources=yes hides the display
{{Talk header|demospace=main|hide_find_sources=yes|search-domain=video game}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
9c-6b. Param domain: (same as above)
{{Talk header|demospace=main|domain=video|hide_find_sources=yes}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}

WikiProject detection

Expand to view description of how to run these tests

These tests rely on using {{Talk header/sandbox}} transcluding the "Find sources" wrapper template ({{Find sources/sandbox}}, rev. 1038369884‎) to choose the right domain-specific "find sources" template. Because these tests depend on using the WikiProjects listed in the Talk header template at the top of an article page, they cannot be tested in the normal way. You can either add a Talk header to the top of *this* page, and test in Preview mode, or test in Preview mode at the Talk pages of actual articles which have the appropriate Talk page headers and WikiProject listings. In the latter case, edit the Talk page header, find the transclusion of Script error: No such module "Template link general". (normally at the top of the page) and change it to Script error: No such module "Template link general"., and observe the "find sources" links that are generated in each case. (If the page you're testing doesn't have a header, then just add Script error: No such module "Template link general". at the top of the page, and Preview it.)

Any article Talk page with the correct header and projects may be used for this; the list below contains some suggested Talk pages with the correct WikiProjects on it to validate the test case. After viewing the test case result in Preview mode on the page, it's best to cancel out and not save the altered page.

Articles including project Video games

These should employ {{find video games sources}} in Preview mode, after you've made the change described above:

Articles including project Medicine

These should employ {{find medical sources}} in Preview mode, after you've made the change described above:

Articles including project Biography

These should employ {{find biographical sources}} in Preview mode, after you've made the change described above:


Articles that include combinations of projects – medical & biographical

Currently, pages linking both medical and biographical WikiProjects will show only medical source links by default.


Other articles not including any of the projects above

These should default to the standard {{find sources}} list in Preview mode, after you've made the change described above; in other words, the same set of links will be present before and after the change:

(chosen from Special:Random)

Auto archiving notice

Archive age only
{{Talk header|archive_age=7|demospace=main}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
Archive age + unit
{{Talk header|archive_age=48|archive_units=hours|demospace=main}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
Archive age + minthreads
{{Talk header|archive_age=7|demospace=main|minthreadsleft=5}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
Archive age + bot
{{Talk header|archive_age=7|bot=lowercase sigmabot II|demospace=main}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
Archive age + minthreads + bot
{{Talk header|archive_age=7|bot=lowercase sigmabot II|demospace=main|minthreadsleft=5}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}
Archive age + minthreads + bot + units
{{Talk header|archive_age=2|archive_units=months|bot=lowercase sigmabot II|demospace=main|minthreadsleft=5}}
Side by side comparison
{{Talk header}}{{Talk header/sandbox}}