Module:NorbyteLink/doc
Jump to navigation
Jump to search
This is the documentation page for Module:NorbyteLink
Doc page: Module:NorbyteLink/doc
This module handles link generation for searches on Norbyte.
Usage
{{#invoke:NorbyteLink|main}}
The module automatically reads all parameters passed to the parent template {{NorbyteLink}}.
Arguments
The module loops through all arguments passed to the calling template and processes them based on their keys:
- Named Parameters: Standard named arguments are encoded and formatted as structured
key:valuefilters (e.g.,|type=weapontranslates totype:weaponin the search URL). - Positional Arguments: Unnamed positional arguments are treated as raw search terms and are appended to the URL without a key prefix.
Magic Parameters
Note: To prevent parameter leaking, all arguments starting with an underscore are treated as internal configuration and are never passed to the search URL as key:value pairs.
- _h: Controls the height (in pixels) of the rendered search icon. Defaults to
14if not specified. - _q: Explicitly forces its value to be passed as a raw search query without a key prefix (identical to a positional argument).
- _validate: Defaults to
true. Controls whether internal spacing issues apply a tracking category (see below).
Validation & Query Flattening
The module automatically sanitizes inputs and appends the tracking category Category:Gamedata Fields for Review in the main article namespace under the following rules:
- Key Stripping (Query Flattening): If a key contains any spaces or non-whitelist characters, or if a value contains internal spaces, the key is stripped and the value is passed as a raw, keyless query term.
- Tracking Category:
- Non-whitelist characters (outside
a-zA-Z0-9_-%'()&/.) anywhere in a key or value, or spaces in a key, will always append the tracking category. - Internal spaces in a value field will only append the tracking category if
_validate=true(or left at its default).
- Non-whitelist characters (outside