Jump to content

User:Spinningspark/Coding and formatting

From Wikipedia, the free encyclopedia


Coding help[edit]

Javascript[edit]

CSS[edit]

Latex[edit]

Mediawiki[edit]

HTML[edit]

Tables and pictures[edit]

Email[edit]

Searching[edit]

Other[edit]

Archives[edit]

See Talk:Vacuum tube for example with search input in the archive box rather than talk page header. Also has example of indexing. VAcuum tube uses User:MiszaBot which is now defunct but User:lowercase sigmabot III picks up its archiving tasks without the need to change any of the setup.

The above example is for MiszaBot I which has been deactivated. It's function has been taken over by lowercase sigmabot III which works with the same parameters but ClueBot III seems to be much more sophisticated. None of this nonsense about not archiving if the datestamp not in right format. Trying out on Talk:Ground loop (electricity).

{{User:ClueBot III/ArchiveThis
|archiveprefix=Talk:<article>/Archive
|format= %%i
|age=8766
|maxarchsize=100000
|numberstart=1
|archivebox=yes
|box-advert=yes
|minkeepthreads=2
}}
  • 1 year = 8766 hours
  • 2 years = 17532
  • 3 years = 26298
  • 4 years = 35064
  • 5 years = 43830

Disambiguation see also[edit]

Multiple sources[edit]

<ref>Multiple sources: {{ubl|style=margin-left:1em|Gupta, page 113| Voltmer, pages 146–147}}</ref>

Lorem[mult 1] ipsum[mult 2] dolores.[mult 3]

  1. ^ cite 1
  2. ^ Multiple sources:
    • Gupta, page 113
    • Voltmer, pages 146–147
  3. ^ cite 3

Templates[edit]

<br style="clear:left;"/>

{{Archive top |result = [[File:Symbol support vote.svg|15px]] Promoted to GA |status = Result }} {{Archive bottom}}

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


The discussion above is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.

{{Discussion top}} {{Discussion bottom}}

The following discussion is closed. Please do not modify it. Subsequent comments should be made in a new section.
The discussion above is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.

{{notice|header=Notice heading|A notice}}

{{tmbox|type=notice|text=some text}}

Please don't hover over me, it makes me nervous I like to keep conversations together. If you post on my Talk page, that is where I will answer you, so keep me on your watchlist if you want to see the reply.

If I post on your Talk page, I will likewise watch for your reply. If you use that other silly system and insist on posting to my Talkpage instead, we can still cope, I am not obsessive about it.

{{Warning| Text goes here}}

{{divbox|blue|Box title|Box content|radius=15px}}

Categories[edit]

Don't CAT the Sandbox!!!!

[[Category:Puzzles]]

To make a link to a category without categorising the page
[[:Category:Automotive technologies]]

To force a sort order
[[Category:Mechanical puzzles|Puzzles, Mechanical]]

To force to top of list (Space is lower in ASCII)
[[Category:Rubik's Cube| ]]

Locator Maps[edit]

Locator template (example):

Clickable image[edit]

The entire template is now deprecated. Use the link= parameter in the file link instead

{{Click
|image  = <image to be linked>
|size   = <size of the image> 
|width  = <width of the image> DEPRECATED
|height = <height of the image, optional> DEPRECATED
|link   = <page the image must link to>
|title  = <the label for the image, optional>
|desc   = <location of a description link, optional> 
}}

Template:Superimpose2 for up to 50 superimposed images

Link[edit]

Click here to see Pamela Anderson naked

Ha ha, very cute

Edit help: How to put paragraphs within a single bulleted item?[edit]

<huge amount of not-so-good intervening suggestions removed>

I'd say the best option to use is partial HTML. Have a standard bulleted list, but use <p> tags on the long item. Example:
  • Item 1
  • Item 2
  • Item 3 with a really long boring block of text that really should be broken into two or more paragraphs but there's no apparant way to do it. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

    Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

  • Item 4
This method keeps the bulleted list while allowing for paragraph breaks. Pyrospirit (talk · contribs) 02:40, 2 January 2008 (UTC)[reply]

References[edit]

A great example of use of footnotes/references/bibliography using a footnotes template can be found in Niagara Falls Suspension Bridge

{{Ref label|truss|k|none}}
{{Note label|start|a|none}}

A much[note 1] better way though[note 2], is;

<ref group=note>

Grouped notes[edit]

  1. ^ A footnote
  2. ^ Another footnote
{{Reflist|group=note}}

OR[note 1]

  1. ^ A footnote
<references group=note />

Fonts[edit]

Can be used with <span>, <p> or <font> tags.

style="font-style:italic;" Now is the time for all good men to come to the aid of the party
style="font-style:normal;" Now is the time for all good men to come to the aid of the party
style="font-weight:bold;" Now is the time for all good men to come to the aid of the party
style="font-weight:normal;" Now is the time for all good men to come to the aid of the party
 
style="font-family:times;" Now is the time for all good men to come to the aid of the party
style="font-family:times new roman;" Now is the time for all good men to come to the aid of the party
style="font-family:courier;" Now is the time for all good men to come to the aid of the party
style="font-family:monospace;" Now is the time for all good men to come to the aid of the party
style="font-family:courier new;" Now is the time for all good men to come to the aid of the party
style="font-family:script;" Now is the time for all good men to come to the aid of the party
 
style="font-style:italic;color:red;" Now is the time for all good men to come to the aid of the party
style="font-size:16pt;" 16 point font

Colour match[edit]

Series colour Allotrope colour
alkali metal
alkaline earth metal
lanthanide
actinide
transition metal
poor metal
metalloid
nonmetal
halogen
noble gas

Code snip for setting heading colours.


|-<!-- 

ELEMENT PHYSICAL PROPERTIES 

-->
! colspan=2 style="background:<!-- COLOR 1 -->#{{#if:{{{series color|}}}|{{{series color}}}|{{#switch:{{{series}}}
 |alkali metal|alkali metals=FF6666
 |alkaline earth metal|alkaline earth metals=FFDEAD
 |lanthanide|lanthanides=FFBFFF
 |actinide|actinides=FF99CC
 |transition metal|transition metals=FFC0C0
 |poor metal|poor metals=CCCCCC
 |metalloid|metalloids=CCCC99
 |nonmetal|non-metal|nonmetals|non-metals=A0FFA0
 |halogen|halogens=FFFF99
 |noble gas|noble gases=C0FFFF
}}}}; <!-- COLOR 2 -->{{#if:{{{phase color|}}}|color:{{{phase color}}}|color:#{{#switch:{{{phase}}}
 |Gas|gas=008000
 |Liquid|liquid=0000FF
 |Solid|solid=000000
}}}}" | <center>Physical properties</center><!-- 

ALLATROPE 1 PHYSICAL PROPERTIES

 -->
{{#if:{{{allatrope 1|}}}|
{{!}}-
! colspan=2 style="background:<!-- COLOR 1 -->#{{#if:{{{series color|}}}|{{{series color}}}|{{#switch:{{{series}}}
 |alkali metal|alkali metals=FFA9A9
 |alkaline earth metal|alkaline earth metals=FFE6C3
 |lanthanide|lanthanides=FFE3FF
 |actinide|actinides=FFCEE6
 |transition metal|transition metals=ffd8d7
 |poor metal|poor metals=e1e2e2
 |metalloid|metalloids=e2e2bc
 |nonmetal|non-metal|nonmetals|non-metals=caffca
 |halogen|halogens=ffffc7
 |noble gas|noble gases=e2ffff
}}}}; <!-- COLOR 2 -->{{#if:{{{phase color|}}}|color:{{{phase color}}}|color:#{{#switch:{{{phase}}}
 |Gas|gas=008000
 |Liquid|liquid=0000FF
 |Solid|solid=000000
}}}}" {{!}}<center>{{{allatrope 1}}}</center>|}}<!--
-->