HRWiki autocolumn: Difference between revisions
imported>HRWikiMirrorBot Imported from hrwiki.org via Wayback Machine (HTML→wikitext) |
imported>HRWikiMirrorBot Reimported from hrwiki.org Wayback HTML→wikitext (full reconvert) |
||
| Line 1: | Line 1: | ||
<!-- Mirrored from Homestar Runner Wiki (hrwiki.org) via Wayback Machine | <!-- Mirrored from Homestar Runner Wiki (hrwiki.org) via Wayback Machine --> | ||
'''Description:''' An extension to easily create tables whose columns have equal lengths (or nearly so), especially for tables that are updated often. | '''Description:''' An extension to easily create tables whose columns have equal lengths (or nearly so), especially for tables that are updated often. | ||
| Line 8: | Line 8: | ||
''Please put any bugs or feature requests on the talk page.'' | ''Please put any bugs or feature requests on the talk page.'' | ||
== Format == | |||
< | <pre><table [parameters]> | ||
< | <autocolumn [parameters]> | ||
[single list of content to be automatically divided] | [single list of content to be automatically divided] | ||
</autocolumn> | |||
</table></pre> | |||
== Parameters == | |||
The | 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. | 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. | ||
== 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. | * Automatic text replacement (for example, when signing using tildes (~~~~)) is not supported. This feature will be included when we upgrade to MediaWiki 1.6. | ||
== Variations == | |||
= | |||
* You can use wiki table markup ( | * 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 have a header row ''(see gallery sample 1)''. | ||
* You can stack < | * 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 | * 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)''. | ||
== Example == | |||
= | |||
<pre> | <pre><table width="80%"> | ||
<autocolumn cols="3" width="33%"> | |||
*'''Debut:''' [[some kinda robot]] | *'''Debut:''' [[some kinda robot]] | ||
*[[i she be]] | *[[i she be]] | ||
| Line 88: | Line 59: | ||
*[[rock opera]] | *[[rock opera]] | ||
*[[technology]] | *[[technology]] | ||
</autocolumn> | |||
</table></pre> | |||
{| class="wikitable | |||
{| class="wikitable" | |||
|- | |- | ||
| | | | ||
| | |||
| | |||
| | |||
|} | |} | ||
== Gallery == | |||
= | |||
View the source code to see how each table was made. You can also experiment in the [[HRWiki:Sandbox|sandbox]]. | View the source code to see how each table was made. You can also experiment in the [[HRWiki:Sandbox|sandbox]]. | ||
=== Sample 1 === | |||
Selected Toons | {| class="wikitable" | ||
|- | |||
! colspan="5" style="background:#DDD" | Selected Toons | |||
|- | |||
| | |||
| | |||
| | |||
| | |||
| | |||
|} | |||
<br /> | <br /> | ||
=== Sample 2 === | |||
{| class="wikitable | {| class="wikitable" | ||
|- | |- | ||
| | | style="background:lightyellow; border:1px solid black; padding:0.5em" | Before<br /> | ||
I<br /> | I<br /> | ||
drink<br /> | drink<br /> | ||
| Line 172: | Line 98: | ||
tall<br /> | tall<br /> | ||
glass<br /> | glass<br /> | ||
| style="background:lightyellow; border:1px solid black; padding:0.5em" | of<br /> | |||
| | |||
melonade<br /> | melonade<br /> | ||
I<br /> | I<br /> | ||
| Line 179: | Line 104: | ||
to<br /> | to<br /> | ||
eat<br /> | eat<br /> | ||
| style="background:lightyellow; border:1px solid black; padding:0.5em" | about<br /> | |||
| | |||
147<br /> | 147<br /> | ||
Fluffy<br /> | Fluffy<br /> | ||
Puff<br /> | Puff<br /> | ||
Marshmallows<br /> | Marshmallows<br /> | ||
| style="background:lightyellow; border:1px solid black; padding:0.5em" | Seriously<br /> | |||
| | |||
folks<br /> | folks<br /> | ||
they're<br /> | they're<br /> | ||
the<br /> | the<br /> | ||
best | best | ||
|- | |- | ||
| | | style="background:#EEF; border:1px solid black; padding:0.5em" | You<br /> | ||
heard<br /> | heard<br /> | ||
| style="background:#EEF; border:1px solid black; padding:0.5em" | it<br /> | |||
| | |||
folks<br /> | folks<br /> | ||
| style="background:#EEF; border:1px solid black; padding:0.5em" | Homestar<br /> | |||
| | |||
likes<br /> | likes<br /> | ||
| style="background:#EEF; border:1px solid black; padding:0.5em" | marshmallows | |||
| | |||
|} | |} | ||
<br /> | <br /> | ||
=== Sample 3 === | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| | | | ||
| | |||
| | |||
|} | |} | ||
[[Category:Help]] | |||
Latest revision as of 14:24, 14 July 2026
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.
Format
<table [parameters]> <autocolumn [parameters]> [single list of content to be automatically divided] </autocolumn> </table>
Parameters
The parameters in the
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.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.
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).
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>
Gallery
View the source code to see how each table was made. You can also experiment in the sandbox.
Sample 1
| Selected Toons | ||||
|---|---|---|---|---|
Sample 2
| Before I |
of melonade |
about 147 |
Seriously folks |
| You heard |
it folks |
Homestar likes |
marshmallows |