HRWiki:autocolumn

From Homestar Runner Wiki

Jump to: navigation, search

Description: An extension to easily create tables whose columns have equal lengths (or nearly so), especially for tables that are updated often.

Filename: exfAutoColumn.php

Written by: It's dot com ©2006

Please put any bugs or feature requests on the talk page.

Contents

[edit] Format

<table [parameters]>

<autocolumn [parameters]>

[single list of content to be automatically divided]

</autocolumn>
</table>

[edit] Parameters

The parameters in the <table> tag are the normal table parameters, and are optional.

The available <autocolumn> parameters are listed below. Each one is optional.

cols – the number of columns (the default is 2)
width – the remaining parameters are normal cell parameters
align
valign – "top" is the default value
class
style

You cannot have fewer than 2 columns (unless there is only 1 item in the list), nor can you have more columns than total items in the list. The function removes all extra white space between the tags and then formats each column according to standard wiki markup rules.

[edit] Known limitations

  • Automatic text replacement (for example, when signing using tildes (~~~~)) is not supported. This feature will be included when we upgrade to MediaWiki 1.6.

[edit] Variations

  • You can use wiki table markup ( {| ... |} ) instead of HTML (see gallery sample 1).
  • You can have a header row (see gallery sample 1).
  • You can stack <autocolumn> rows within the same table (see gallery sample 2).
  • If the entire list is an ordered list (each line begins with a # and has no subitems), it will be correctly numbered across the columns (see gallery sample 3).

[edit] Example

<table width="80%">
<autocolumn cols="3" width="33%">
*'''Debut:''' [[some kinda robot]]
*[[i she be]]
*[[guitar]]
*[[island]]
*[[japanese cartoon]]
*[[personal favorites]]
*[[different town]]
*[[radio]]
*[[rock opera]]
*[[technology]]
</autocolumn>
</table>

[edit] Gallery

View the source code to see how each table was made. You can also experiment in the sandbox.

[edit] Sample 1

Selected Toons


[edit] Sample 2

Before
I
drink
a
tall
glass

of
melonade
I
like
to
eat

about
147
Fluffy
Puff
Marshmallows

Seriously
folks
they're
the
best

You
heard

it
folks

Homestar
likes

marshmallows


[edit] Sample 3

  1. AbdiViklas
  2. Alcnolien
  3. Bad Graphics Ghost
  4. BazookaJoe
  5. Bill
  6. Bluebry muffin
  7. Chmera
  8. Csours
  9. Dantheburgerking
  10. Darthvader66
  11. DorianGray
  12. Double J
  13. FireBird
  14. Frickinsellout
  15. GWR 2004
  1. Has Matt?
  2. Heimstern Läufer
  3. It's dot com
  4. ItalianBallerina
  5. Jay
  6. Jetamoo
  7. Joshua
  8. KieferSkunk
  9. Kilroy
  10. Lapper
  11. LePorello
  12. Mycroft Holmes
  13. NFITC1
  14. Nintendostar Runner
  15. Octan
  1. Qermaq
  2. Rogue Leader
  3. Sam Goldfish
  4. Seriously
  5. Shadow Hog
  6. Spell4yr
  7. Teh Frossty One
  8. Thunderbird L17
  9. Trelawney
  10. Trey56
  11. Venusy
  12. Xeroc
  13. YK
  14. Yourmomgoestocollege
Personal tools