Module:Biglist/doc: Difference between revisions
overview |
update |
||
Line 1: | Line 1: | ||
This module helps avoid problems with templates that might exceed expand size or time and which might put a page in an error tracking category: |
|||
This module can emulate a list of {{tl|userlinks}} entries or a list of {{tl|search}} entries. It is not intended for use in articles. |
|||
*[[:Category:Pages where template include size is exceeded]] or |
|||
*[[:Category:Pages with script errors]] (time exceeding 10 seconds). |
|||
Using this module to replace a large list of entries can significantly reduce the resources required to generate the page, making editing and viewing an uncached page faster |
Using this module to replace a large list of entries can significantly reduce the resources required to generate the page, making editing and viewing an uncached page faster. |
||
== Columns-list == |
|||
'''Example usage''' |
|||
Some articles use {{tl|columns-list}} to show lists of items in multiple columns. The module only supports cases using <code>colwidth</code> and no other parameters. Given that limitation, using the module requires an expansion size only a little more than the size of the wikitext, while the template requires an amount three times larger. The following example is from [[List of least concern fishes]]. |
|||
'''Wikitext''' |
|||
<pre> |
<pre> |
||
{{#invoke:biglist|columns-list|colwidth=30em|*[[Aptychotrema rostrata|Eastern shovelnose ray]] ''(Aptychotrema rostrata)'' |
|||
⚫ | |||
*[[Aptychotrema vincentiana|Southern shovelnose ray]] ''(Aptychotrema vincentiana)'' |
|||
⚫ | |||
*[[Rhinobatos annulatus|Lesser guitarfish]] ''(Rhinobatos annulatus)'' |
|||
⚫ | |||
*[[Rhinobatos blochii|Bluntnose guitarfish]] ''(Rhinobatos blochii)'' |
|||
⚫ | |||
*[[Rhinobatos sainsburyi|Goldeneye shovelnose ray]] ''(Rhinobatos sainsburyi)'' |
|||
*[[Trygonorrhina dumerilli|Southern fiddler ray]] ''(Trygonorrhina dumerilli)'' |
|||
*[[Trygonorrhina fasciata|Eastern fiddler ray]] ''(Trygonorrhina fasciata)''}} |
|||
</pre> |
|||
'''Result''' |
|||
{{#invoke:biglist|columns-list|colwidth=30em|*[[Aptychotrema rostrata|Eastern shovelnose ray]] ''(Aptychotrema rostrata)'' |
|||
*[[Aptychotrema vincentiana|Southern shovelnose ray]] ''(Aptychotrema vincentiana)'' |
|||
*[[Rhinobatos annulatus|Lesser guitarfish]] ''(Rhinobatos annulatus)'' |
|||
*[[Rhinobatos blochii|Bluntnose guitarfish]] ''(Rhinobatos blochii)'' |
|||
*[[Rhinobatos sainsburyi|Goldeneye shovelnose ray]] ''(Rhinobatos sainsburyi)'' |
|||
*[[Trygonorrhina dumerilli|Southern fiddler ray]] ''(Trygonorrhina dumerilli)'' |
|||
*[[Trygonorrhina fasciata|Eastern fiddler ray]] ''(Trygonorrhina fasciata)''}} |
|||
== Search == |
|||
Some project pages list hundreds of topics using {{tl|search}}. An alternative would be to use the module as in the following example. |
|||
'''Wikitext''' |
|||
<pre> |
|||
{{#invoke:biglist|topicsearch|prefix=*|list= |
{{#invoke:biglist|topicsearch|prefix=*|list= |
||
Aalenilla compressa |
Aalenilla compressa |
||
Line 17: | Line 40: | ||
'''Result''' |
'''Result''' |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
== Userlinks == |
|||
Some [[WP:LTA]] pages list hundreds of users using {{tl|userlinks}}. An alternative would be to use the module as in the following example. |
|||
'''Wikitext''' |
|||
<pre> |
|||
{{#invoke:biglist|userlinks|prefix=#|list= |
{{#invoke:biglist|userlinks|prefix=#|list= |
||
Example |
Example |
||
Jimbo Wales |
Jimbo Wales |
||
}} |
}} |
||
</pre> |
|||
'''Result''' |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
}} |
}} |
||
== Weatherboxcols == |
|||
The module only works for built-in items, currently userlinks and topicsearch. The module generates the output using search-and-replace—no templates are expanded. |
|||
[[List of cities by sunshine duration]] has many tables with cells that show the average temperature in a particular month and location; each cell is colored according to the temperature. Using {{tl|Weather box/cols}}, the article had script errors which were removed by replacing entries such as: |
|||
<pre> |
|||
| style="{{Weather box/cols|183.0 }};"|183.0 |
|||
</pre> |
|||
with |
|||
<pre> |
|||
| {{#invoke:biglist|weatherboxcols|183.0}} |
|||
</pre> |
Revision as of 02:21, 14 July 2016
This module helps avoid problems with templates that might exceed expand size or time and which might put a page in an error tracking category:
- Category:Pages where template include size is exceeded or
- Category:Pages with script errors (time exceeding 10 seconds).
Using this module to replace a large list of entries can significantly reduce the resources required to generate the page, making editing and viewing an uncached page faster.
Columns-list
Some articles use {{columns-list}} to show lists of items in multiple columns. The module only supports cases using colwidth
and no other parameters. Given that limitation, using the module requires an expansion size only a little more than the size of the wikitext, while the template requires an amount three times larger. The following example is from List of least concern fishes.
Wikitext
{{#invoke:biglist|columns-list|colwidth=30em|*[[Aptychotrema rostrata|Eastern shovelnose ray]] ''(Aptychotrema rostrata)'' *[[Aptychotrema vincentiana|Southern shovelnose ray]] ''(Aptychotrema vincentiana)'' *[[Rhinobatos annulatus|Lesser guitarfish]] ''(Rhinobatos annulatus)'' *[[Rhinobatos blochii|Bluntnose guitarfish]] ''(Rhinobatos blochii)'' *[[Rhinobatos sainsburyi|Goldeneye shovelnose ray]] ''(Rhinobatos sainsburyi)'' *[[Trygonorrhina dumerilli|Southern fiddler ray]] ''(Trygonorrhina dumerilli)'' *[[Trygonorrhina fasciata|Eastern fiddler ray]] ''(Trygonorrhina fasciata)''}}
Result
- Eastern shovelnose ray (Aptychotrema rostrata)
- Southern shovelnose ray (Aptychotrema vincentiana)
- Lesser guitarfish (Rhinobatos annulatus)
- Bluntnose guitarfish (Rhinobatos blochii)
- Goldeneye shovelnose ray (Rhinobatos sainsburyi)
- Southern fiddler ray (Trygonorrhina dumerilli)
- Eastern fiddler ray (Trygonorrhina fasciata)
Search
Some project pages list hundreds of topics using {{search}}. An alternative would be to use the module as in the following example.
Wikitext
{{#invoke:biglist|topicsearch|prefix=*|list= Aalenilla compressa Aalenirhynchia }}
Result
- Aalenilla compressa – (wp gwp g bwp b | eb 1911 co gct sw arc ht)
- Aalenirhynchia – (wp gwp g bwp b | eb 1911 co gct sw arc ht)
Userlinks
Some WP:LTA pages list hundreds of users using {{userlinks}}. An alternative would be to use the module as in the following example.
Wikitext
{{#invoke:biglist|userlinks|prefix=#|list= Example Jimbo Wales }}
Result
- Example (talk · contribs · deleted contribs · logs · edit filter log · block user · block log)
- Jimbo Wales (talk · contribs · deleted contribs · logs · edit filter log · block user · block log)
Weatherboxcols
List of cities by sunshine duration has many tables with cells that show the average temperature in a particular month and location; each cell is colored according to the temperature. Using {{Weather box/cols}}, the article had script errors which were removed by replacing entries such as:
| style="{{Weather box/cols|183.0 }};"|183.0
with
| {{#invoke:biglist|weatherboxcols|183.0}}