User:Poke/GW2ChatLinks
GW2ChatLinks is a MediaWiki extensions that brings native support for Guild Wars 2 chat links.
Search functionality[edit]
When searching, and the search term contains one or more chat links, then all contained chat links are decoded and produce a specialized output before other search results. Due to technical limitations, it is not possible to prevent the standard search from being executed.
The output from the decoded chat links is generated by specialized templates that allow modifying the output dynamically without changing the extension’s source files.
Special page[edit]
As an alternative or extension to the search functionality, the creation of a special page is being discussed which performs the decoding process separately. The search results could then either duplicate/include the special page’s behaviour, or redirect to the special page, preventing further standard search results from being displayed.
Parser functions[edit]
The extension adds a few specialized parser functions to generate chat links. All generated chat links are embedded within a span tag: <span class="gw2chatlink">…</span>
.
Generic chat links: #chatlink
[edit]
The #chatlink
parser function is a generic parser function to generate a chat link from an id.
- Parameter 1
- Chat link type. Supports the following values:
- In addition it is also possible to specify a number representing the chat link type, as explained on chat link format.
- Parameter 2
- Respective identifier, or in case of coin links the amount of coins in copper.
Examples[edit]
Code | Desired result | Live result | Meaning |
---|---|---|---|
{{#chatlink:coin|0}} |
[&AQAAAAA=] |
0}} | 0 |
{{#chatlink:coin|1}} |
[&AQEAAAA=] |
1}} | 1 |
{{#chatlink:coin|10203}} |
[&AdsnAAA=] |
10203}} | 1 2 3 |
{{#chatlink:item|23029}} |
[&AgH1WQAA] |
23029}} | Copper Harvesting Sickle |
{{#chatlink:item|23040}} |
[&AgEAWgAA] |
23040}} | Basic Salvage Kit |
{{#chatlink:map|72}} |
[&BEgAAAA=] |
72}} | Desider Atum Waypoint |
{{#chatlink:skill|5491}} |
[&BnMVAAA=] |
5491}} | Fireball |
Item chat links: #chatlink-item
[edit]
Unlike the generic parser function, the #chatlink-item
parser function allows specifying upgrades, skin transmutations and other item properties.