HRWiki:autocolumn
From Homestar Runner Wiki
It's dot com (Talk | contribs) (username changed) |
The Cheatbot (Talk | contribs) (autoreplace: TrogdorCon '97 → Trogdor Con '97) |
||
(includes 9 intermediate revisions) | |||
Line 1: | Line 1: | ||
'''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. | ||
- | '''Filename:''' | + | '''Filename:''' exfAutoColumn.php |
'''Written by:''' [[User:It's dot com|It's dot com]] ©2006 | '''Written by:''' [[User:It's dot com|It's dot com]] ©2006 | ||
Line 27: | Line 27: | ||
:<code>class</code> | :<code>class</code> | ||
:<code>style</code> | :<code>style</code> | ||
- | You cannot have fewer than 2 columns, | + | 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 (<nowiki>~~~~</nowiki>)) is not supported. This feature will be included when we upgrade to MediaWiki 1.6. | ||
==Variations== | ==Variations== | ||
Line 96: | Line 99: | ||
*[[Peasant's Quest Preview]] | *[[Peasant's Quest Preview]] | ||
*[[Senor Mortgage]] | *[[Senor Mortgage]] | ||
- | *[[Shopping | + | *[[Shopping For Danger]] |
*[[Sick Day]] | *[[Sick Day]] | ||
*[[Strong Bad is a Bad Guy]] | *[[Strong Bad is a Bad Guy]] | ||
Line 109: | Line 112: | ||
*[[The System is Down]] | *[[The System is Down]] | ||
*[[Theme Song Video]] | *[[Theme Song Video]] | ||
- | *[[ | + | *[[Trogdor Con '97]] |
*[[Where's The Cheat?]] | *[[Where's The Cheat?]] | ||
</autocolumn> | </autocolumn> | ||
Line 164: | Line 167: | ||
#[[User:Chmera|Chmera]] | #[[User:Chmera|Chmera]] | ||
#[[User:Csours|Csours]] | #[[User:Csours|Csours]] | ||
- | #[[User: | + | #[[User:DBK|Dantheburgerking]] |
#[[User:Darthvader66|Darthvader66]] | #[[User:Darthvader66|Darthvader66]] | ||
#[[User:DorianGray|DorianGray]] | #[[User:DorianGray|DorianGray]] | ||
Line 193: | Line 196: | ||
#[[User:Spell4yr|Spell4yr]] | #[[User:Spell4yr|Spell4yr]] | ||
#[[User:Teh Frossty One|Teh Frossty One]] | #[[User:Teh Frossty One|Teh Frossty One]] | ||
- | #[[User:Thunderbird L17|Thunderbird]] | + | #[[User:Thunderbird L17|Thunderbird L17]] |
#[[User:Trelawney|Trelawney]] | #[[User:Trelawney|Trelawney]] | ||
#[[User:Trey56|Trey56]] | #[[User:Trey56|Trey56]] | ||
Line 203: | Line 206: | ||
</table> | </table> | ||
- | [[Category:Help| | + | [[Category:Help|{{PAGENAME}}]] |
Current revision as of 04:16, 6 November 2022
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 parametersalign
valign
– "top" is the default valueclass
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 |
of |
about |
Seriously |
You |
it |
Homestar |
marshmallows |