User:Pdfpdf/Tools and references

Useful stuff:

Tools and references

Multiple columns - several methods

=multicol=

{{multicol}}xxx{{multicol-break}}xxx{{multicol-break}}xxx{{multicol-end}}

{{Col-begin}}

{{Col-break}}

  • 1
  • 2
  • 3

{{Col-break}}

  • 4
  • 5

{{Col-break}}

  • 6
  • 7
  • 8

{{Col-break}}

  • 9
  • 10

{{col-end}}

Templates

=Inside Infobox=

  • "{{Birth date and age|df=yes|1999|12|31}}" results in "{{Birth date and age|df=yes|1999|12|31}}"
  • "{{Death date and age|1951|5|27|1884|1|24|df=yes}}" results in "{{Death date and age|1951|5|27|1884|1|24|df=yes}}" (Thomas Blamey)

=Dab Headers=

  • {{for|XXX|YYY}} results in {{for|XXX|YYY}}
  • {{Otheruses}} results in {{Otheruses}}
  • {{About||the acronym|VC|other uses|Victoria Cross (disambiguation)}} results in {{About||the acronym|VC|other uses|Victoria Cross (disambiguation)}}
  • Parameters for Gallery:
  • {{Gallery |title= |width=150 |height=150 |lines=3 ...

=In-line=

class=wikitable

!

+ ?Note Bene!
{{how}} - {{how}}{{how?}} - {{how?}}
{{what}} - {{what}}{{what?}} - {{what?}}
{{when}} - {{when}}{{when?}} - {{when?}}
{{where}} - {{where}}{{where?}} - {{where?}}
{{why}} - {{why}}{{why?}} - {{why?}}
{{who}} - {{who}}{{who?}} - {{who?}}
{{by who}} - {{by who}}{{by who?}} - {{by who?}}who => whom
{{whom}} - {{whom}}{{whom?}} - {{whom?}}whom => according to whom
{{by whom}} - {{by whom}}{{by whom?}} - {{by whom?}}
{{to whom}} - {{to whom}}{{to whom?}} - {{to whom?}}
{{cn}} - {{cn}}{{cn?}} - {{tl|cn?}}
{{dn}} - {{dn}}{{dn?}} - {{tl|dn?}}
{{ref}} - {{ref}}{{ref?}} - {{ref?}}+? gives very different result
{{vague}} - {{vague}}{{vague?}} - {{vague?}}
{{verify}} - see below{{verify?}} - {{tl|verify?}}
{{Nonspecific}} - {{Nonspecific}}{{Nonspecific?}} - {{tl|Nonspecific?}}
{{Failed verification}} - {{Failed verification}}{{Failed verification?}} - {{Failed verification?}}

=Create boxes=

  • {{verify}} - {{verify}}
  • {{refimprove}} - {{refimprove}}
  • {{ref improve}} - {{ref improve}}
  • {{refimprove|section}} - {{refimprove|section}}
  • {{ref improve|section}} - {{ref improve|section}}
  • {{refimprove section}} - {{refimprove section}}

----

  • {{unreferenced}} | {{tl|unreferenced}} | {{unreferenced}}
  • {{unreferenced section}} | {{tl|unreferenced section}} | {{unreferenced section}}
  • {{unreferenced|section}} | {{tl|unreferenced|section}} | {{unreferenced|section}}

----

  • {{disputed}} | {{tl|disputed}} | {{disputed}}
  • {{disputed|section}} | {{tl|disputed|section}} | {{disputed|section}}
  • {{Disputed|section}} | {{tl|Disputed|section}} | {{Disputed|section}}

----

  • {{Disputed-section}} | {{tl|Disputed-section}} | {{Disputed-section}}
  • {{disputed-section}} | {{tl|disputed-section}} | {{disputed-section}}

----

  • {{BLPunsourced}} | {{tl|BLPunsourced}} | {{BLPunsourced}}

{{BLPunsourced}}

  • {{BLP unsourced}} | {{tl|BLP unsourced}} | {{BLP unsourced}}
  • {{BLP unsourced section}} | {{tl|BLP unsourced section}} | {{BLP unsourced section}}

=Citations=

  • "{{Australian Dictionary of Biography |last= Jones |first= Philip |year= 1990 |id= A120339b |title= Unaipon, David (1872 - 1967) |accessdate= 2009-01-13}}" results in
    {{Australian Dictionary of Biography |last= Jones |first= Philip |year= 1990 |id= A120339b |title= Unaipon, David (1872 - 1967) |accessdate= 2009-01-13}}

Stolen from User:Smallbones

'''{{cite news

| last =

| first =

| coauthors =

| title =

| work =

| pages =

| language =

| publisher =

| date =

| url =

| accessdate = }}'''

'''{{cite journal

| last =

| first =

| authorlink =

| coauthors =

| title =

| journal =

| volume =

| issue =

| pages =

| year =

| url =

| doi =

| id =

| accessdate = }}'''

'''{{cite web

| last =

| first =

| authorlink =

| coauthors =

| title =

| work =

| publisher =

| year =

| url =

| format =

| doi =

| accessdate = }}'''

'''{{cite book

| last =

| first =

| authorlink =

| coauthors =

| title =

| publisher =

| year =

| location =

| pages =

| url =

| doi =

| id = }}'''

'''{{cite video

| people =

| title =

| medium =

| publisher =

| location =

| date = }}'''

Categories

"The other neat thing about "lifetime" is that if the death date is blank it adds Category:Living people. PamD (talk) 08:34, 1 February 2009 (UTC)"

wikitable sortable

See: Help:Table | Help:Table#Sorting | Help:Sorting | Template:Sortname | Template:Sortname/doc | {{tl|sortname}} | {{tl|sort}} | {{tl|dts}} | {{tl|nts}}

:

class="wikitable sortable"

:!Name!!Date of
action !!Conflict

:!class=unsortable | U1

:!Unit

Place of actionLocation of
medal

:!class=unsortable | U2

#

:

:|{{sortname|Charles|Anderson|Charles Groves Wright Anderson}}

align=center|1942Second World Warzzz2/19th BattalionMuar River, MalayaAWMaaaalign=right|1

:

:|{{sortname|Thomas|Axford}}

align=center|1918First World Waryyy16th BattalionHamel Wood, FranceAWMbbbalign=right|2<-- deliberate "mistake"

:

:|{{sortname|Peter|Badcoe|Peter John Badcoe}}

style="background:#e3d9ff;" align="center"|1967*Vietnam WarxxxAustralian Army Training TeamHuong Tra, VietnamSouth Australian
Museum{{cite web|url=http://www.samuseum.sa.gov.au/page/default.asp?site=1&id=1761|title=Major Badcoe's Victoria Cross and Yandruwandha Breast Plate Exhibits|accessdate=2008-10-07|publisher=South Australian Museum}}
ccc3<--^<-- deliberate

:

:

class="wikitable sortable"

!Name!!Date of
action!!Conflict

!class=unsortable | U1

!Unit

Place of actionLocation of
medal

!class=unsortable | U2

#
{{sortname|Charles|Anderson|Charles Groves Wright Anderson}}align=center|1942Second World Warzzz2/19th BattalionMuar River, MalayaAWMaaaalign=right|1
{{sortname|Thomas|Axford}}align=center|1918First World Waryyy16th BattalionHamel Wood, FranceAWMbbbalign=right|2
{{sortname|Peter|Badcoe|Peter John Badcoe}}style="background:#e3d9ff;" align=center|1967*Vietnam WarxxxAustralian Army Training TeamHuong Tra, VietnamSouth Australian
Museum{{cite web|url=http://www.samuseum.sa.gov.au/page/default.asp?site=1&id=1761|title=Major Badcoe's Victoria Cross and Yandruwandha Breast Plate Exhibits|accessdate=2008-10-07|publisher=South Australian Museum}}
ccc3<--^
.

wikitable

:

class="wikitable"

:! col 1 !! col 2 !! col 3 !! col 4

:

:| r1c1

r1c2r1c3r1c4

:

:| colspan="2" | r2c1

:| rowspan="3" | r2c3

r2c4

:

:| rowspan="2" | r3c1

r3c2r3c4

:

:| r4c2

:| rowspan="2" | r4c4

:

:| r5c1

:| colspan="2" | r5c2

:

:| r6c1

r6c2r6c3r6c4

:

class="wikitable"

! col 1 !! col 2 !! col 3 !! col 4

r1c1r1c2r1c3r1c4
colspan="2" | r2c1

| rowspan="3" | r2c3

r2c4
rowspan="2" | r3c1r3c2r3c4
r4c2

| rowspan="2" | r4c4

r5c1

| colspan="2" | r5c2

r6c1r6c2r6c3r6c4

wiki table in show/hide section?

{{tn|helpme}}

I'm trying to put a wiki table in a show/hide section. I am not having any success. Here's what I'm doing:

:{{hidden|test|

::a

::b

::c

:

class="wikitable"

:

:|row 1

:

:|row 2

:

:|row 3

:

:}}

Here's what's happening:

{{hidden|test|

:a

:b

:c

class="wikitable"
row 1
row 2
row 3

}}

Can anyone tell me what I'm doing wrong please? Thanks, Pdfpdf (talk) 12:26, 10 March 2009 (UTC)

I'm just looking into your question, and will answer here very soon. --  Chzz  ►  12:30, 10 March 2009 (UTC)

OK; the two templates don't play well together. One solution would be to use HTML table syntax, like this;

:{{Hidden|Title text here|

:

:

:

:

:

:

:

:

:

:

:

:

:

:

1 2
3 4
5 6

:}}

{{Hidden|Title text here|

1 2
3 4
5 6

}}

For more info, see Help:Table#Other table syntax

Hope that answers your question, if not please put another helpme on here.

Cheers, --  Chzz  ►  12:46, 10 March 2009 (UTC)

Replied on my talk. --  Chzz  ►  13:07, 10 March 2009 (UTC)

----

Hi. This is actually a two part problem.

  1. The {{tl|hidden}} template requires two attributes: header and content. You may omit the titles (i.e., |header= and |content= are not required) unless there is an equals symbol in the content, which you have: class="wikitable". Since there is an equals symbol in your content, you have to include the attribute title, |content=.
  2. You also had unescaped pipe symbols inside of another template. The pipe ("|") is used to separate parameters inside of templates (as you probably know) and also used to identify table cells (as you probably also know). The problem is that the parser cannot tell if the pipe it encounters is indicating a new cell or a template parameter. In my experience, the template usually wins. Solution? It's easy. Change the pipes that relate to the table to the {{tl|!}} template. It looks funky when you see the code, but it fixes most problems with wiki tables inside of templates.

And here is the working result or your original example, only making those two changes:

{{Hidden|test|content=

:a

:b

:c

{{{!}} class="wikitable"

{{!}}-

{{!}}row 1

{{!}}-

{{!}}row 2

{{!}}-

{{!}}row 3

{{!}}}

}}

Of course, the solution below works well, too. Since I am very comfortable with XHTML and CSS, it's the method I usually use. But learning how to work with tables inside of templates is a highly useful skill, too. It's good to know both methods. Feel free to ask me if you run into any future issues like this. —Willscrlt “Talk” ) 11:55, 7 May 2009 (UTC)

= Tables - a solution =

Hi,

I thought about your problem, and have a possible solution.

If you use the actual code generated by the {{hidden}} template instead of the template itself, it would work.

You'd put this bit before all the medals;

And this bit after them;

I've made an example in User:Chzz/table

I hope this helps.

--  Chzz  ►  14:48, 10 March 2009 (UTC)

P.S. I've also just found Help:Collapsing

--  Chzz  ►  14:51, 10 March 2009 (UTC)

=Sort out wikitables in show / hide boxes=

Show / Hide

I've recently learnt some new tricks that may amuse you, and you may even find them useful.

[Before I start, do you know about ? Whatever you put between them stays as text and doesn't get treated as markup.
e.g. the text xxyy can be seen on this page, but if I remove the ,
then it will do what it is supposed to (i.e. xxyy) ]

Right!

;First trick:

{{collapse top}}

The quick brown fox jumps over the lazy dog.

{{collapse bottom}}

results in:

{{collapse top}}

The quick brown fox jumps over the lazy dog.

{{collapse bottom}}

;Second trick

{{Hidden|titlestyle = background-color: #ccccff;|Second trick|content=

The quick brown fox jumps over the lazy dog.}}

results in:

{{Hidden|titlestyle = background-color: #ccccff;|Second trick|content=

The quick brown fox jumps over the lazy dog.}}

;More tricks at

User:Pdfpdf#Tools and references and

User:Pdfpdf/Tools and references

Cheers, Pdfpdf (talk) 13:54, 11 April 2009 (UTC)

<span style="font-family:comic sans ms;color:navy;">Colours</span>

Blatently stolen from User talk:B. Fairbairn

Pink

Violet

Fuchsia

Red

Crimson

Maroon

Purple

Aqua

Blue

Navy

Lime

Green

Teal

Olive

Yellow

Gold

Orange

Coral

Tan

Chocolate

Brown

Silver

Gray

That takes care of headings, external references, internal references, tables, quotes, fonts, colours, strike-through and sizes.

Still to work out loads more. B. Fairbairn (talk) 13:13, 5 April 2009 (UTC)

:::::

class="wikitable" border="1" cellspacing=1 WIDTH=300
style="background:black;"|.

|style="background:pink;"|

|style="background:violet;"|

|style="background:fuchsia;"|

|style="background:red;"|

|style="background:crimson;"|

|style="background:maroon;"|

|style="background:purple;"|

|style="background:aqua;"|

|style="background:blue;"|

|style="background:navy;"|

|style="background:lime;"|

|style="background:green;"|

|style="background:teal;"|

|style="background:olive;"|

|style="background:yellow;"|

|style="background:gold;"|

|style="background:orange;"|

|style="background:coral;"|

|style="background:tan;"|

|style="background:chocolate;"|

|style="background:brown;"|

|style="background:silver;"|

|style="background:gray;"|

|style="background:black;"|.

An example of (Actually, I'm not sure what it's an example of)

{{Hidden|titlestyle = background-color: #ccccff;|Variation on POTD|

=Variation on POTD=

{{Monopoly board layout

|Edition=Can you become the Supreme Leader of the Supreme Cabal?

|Banner=WIKIOPOLY

|corner_1=Go
Collect $200 salary as you pass

|corner_2=WP:BANNED
Just browsing

|corner_3=Wikibreak

|corner_4=You are banned!

|spaces_horizontal=9

|spaces_vertical=9

|Color_101=SaddleBrown|Space_101=ANI
$60

|Space_102=Community discussion

|Color_103=SaddleBrown|Space_103=AN
$60

|Space_104=Teh Drahmaz
(pay $200)

|Space_105=Admin cabal
$200

|Color_106=SkyBlue|Space_106=AIV
$100

|Space_107=Chance

?

|Color_108=SkyBlue|Space_108=UAA
$100

|Color_109=SkyBlue|Space_109=WikiProject Spam
$120

|Space_110=

|Space_111=

|Space_112=

|Space_201=

|Space_202=

|Space_203=

|Color_204=DarkOrchid|Space_204=CSD
$140

|Space_205=Wikimedia Foundation
$150

|Color_206=DarkOrchid|Space_206=AFD
$140

|Color_207=DarkOrchid|Space_207=Deletion review
$160

|Space_208=Developers
$200

|Color_209=Orange|Space_209=Editor review
$180

|Space_210=Community discussion

|Color_211=Orange|Space_211=PERM
$180

|Color_212=Orange|Space_212=RFA
$200

|Color_301=Red|Space_301=Third opinion
$220

|Space_302=Chance

?

|Color_303=Red|Space_303=Mediation
$220

|Color_304=Red|Space_304=Arbitration
$240

|Space_305=Jimbo Wales
$200

|Color_306=Yellow|Space_306=In the news
$260

|Color_307=Yellow|Space_307=On this day
$260

|Space_308=MediaWiki
$150

|Color_309=Yellow|Space_309=Did you know
$280

|Space_310=

|Space_311=

|Space_312=

|Color_401=Green|Space_401=FPC
$300

|Color_402=Green|Space_402=POTD
$300

|Space_403=Community discussion

|Color_404=Green|Space_404=FAC
$320

|Space_405=Rouge admin
$200

|Space_406=Chance

?

|Color_407=Blue|Space_407=TFA
$350

|Space_408=Edit war
(pay $100)

|Color_409=Blue|Space_409=Main Page
$400

|Space_410=

|Space_411=

}}

}}