### WHOIS Gateway Query Example Source: https://github.com/wikimedia/mediawiki-extensions-discussiontools/blob/master/tests/cases/en-big-oldparser/en-big-oldparser.html These examples demonstrate how to query the WHOIS gateway tool to retrieve IP address information. They show the URL structure for making such queries. ```url https://tools.wmflabs.org/whois/gateway.py?lookup=true&ip=2600%3A1700%3A81F1%3A51 ``` ```url https://tools.wmflabs.org/whois/gateway.py?lookup=true&ip=75.111.203.5 ``` -------------------------------- ### Gadget Collapsible Navigation Example (with JS and CSS) Source: https://github.com/wikimedia/mediawiki-extensions-discussiontools/blob/master/tests/cases/en-big-oldparser/en-big-oldparser.html Example URL to demonstrate the 'Allow navigation menus to be collapsed' gadget with both JavaScript and CSS enabled. Useful for testing or showcasing the gadget's appearance. ```url https://en.wikipedia.org/wiki/Example?withJS=MediaWiki:Gadget-CollapsibleNav.js&withCSS=MediaWiki:Gadget-CollapsibleNav.css ``` -------------------------------- ### Gadget Collapsible Navigation Example (with JS only) Source: https://github.com/wikimedia/mediawiki-extensions-discussiontools/blob/master/tests/cases/en-big-oldparser/en-big-oldparser.html Example URL to demonstrate the 'Allow navigation menus to be collapsed' gadget with only JavaScript enabled. Use this to isolate the effect of the JavaScript component. ```url https://en.wikipedia.org/wiki/Example?withJS=MediaWiki:Gadget-CollapsibleNav.js ``` -------------------------------- ### Example of Current Code for Table Styling Source: https://github.com/wikimedia/mediawiki-extensions-discussiontools/blob/master/tests/cases/en-big-parsoid/en-big-parsoid.html This is the current implementation of the table styling before suggested modifications. ```text Current code Body text. ``` -------------------------------- ### Legacy Heading Example: Hello Source: https://github.com/wikimedia/mediawiki-extensions-discussiontools/blob/master/tests/cases/heading-style-parsoid/heading-style-parsoid-formatted-legacy.html Demonstrates a legacy heading format 'Hello' which is parsed by DiscussionTools. ```json { "wgDiscussionToolsPageThreads": [ { "headingLevel": 2, "name": "h-", "type": "heading", "level": 0, "id": "h-Hello", "replies": [], "uneditableSection": true } ] } ``` -------------------------------- ### Legacy Heading Example: Hello! Source: https://github.com/wikimedia/mediawiki-extensions-discussiontools/blob/master/tests/cases/heading-style-parsoid/heading-style-parsoid-formatted-legacy.html Illustrates another legacy heading format 'Hello!' and its representation in DiscussionTools' parsed data. ```json { "wgDiscussionToolsPageThreads": [ { "headingLevel": 2, "name": "h-", "type": "heading", "level": 0, "id": "h-Hello!", "replies": [] } ] } ``` -------------------------------- ### Example of Suggested Code for Table Styling Source: https://github.com/wikimedia/mediawiki-extensions-discussiontools/blob/master/tests/cases/en-big-parsoid/en-big-parsoid.html This is the suggested code for table styling, incorporating changes to improve visibility and text color. ```text Suggested code Body text. ``` -------------------------------- ### Python Bot Fork Example Source: https://github.com/wikimedia/mediawiki-extensions-discussiontools/blob/master/tests/cases/en-big-parsoid/en-big-parsoid-modified-bullet.html An example of a Python bot fork, potentially requiring manual restarts due to deadlocks. ```python signbot.py ``` -------------------------------- ### Using Navbar-collapsible for Tables Source: https://github.com/wikimedia/mediawiki-extensions-discussiontools/blob/master/tests/cases/en-big-parsoid/en-big-parsoid.html Demonstrates how to create a collapsible table with V-T-E links using the `navbar-collapsible` template and wikitable class. ```wikitext {| class="wikitable collapsible" ! colspan=4 | {{navbar-collapsible|1=Title text|2=Template:Foo}} ``` -------------------------------- ### Template Loop Warning Example Source: https://github.com/wikimedia/mediawiki-extensions-discussiontools/blob/master/tests/cases/en-big-oldparser/en-big-oldparser.html This example shows a scenario where placing a template call within its own page can lead to a template loop warning. It highlights the importance of avoiding recursive template calls. ```Wiki markup Warning: This page calls Wikipedia:WikiProject Physics/Article alerts which causes a template loop (an infinite recursive call). * FOUND ``` -------------------------------- ### Piped Link with Lang Template Example Source: https://github.com/wikimedia/mediawiki-extensions-discussiontools/blob/master/tests/cases/en-big-parsoid/en-big-parsoid.html Demonstrates the behavior of piped links containing language templates in wikitext. This example highlights a potential bug where the intended anchor text and link are not rendered correctly. ```wikitext [[red|green|blue]] ``` ```wikitext [[Castell|{{lang|ca|castells}}]] ``` -------------------------------- ### Creating String and Count on Page Templates Source: https://github.com/wikimedia/mediawiki-extensions-discussiontools/blob/master/tests/cases/en-big-parsoid/en-big-parsoid-modified.html These examples show the creation of two new templates: 'String on page' and 'Count on page'. They are intended to help optimize or implement functionality related to checking for strings or counting occurrences on a page. ```wikitext {{String on page}} ``` ```wikitext {{Count on page}} ``` -------------------------------- ### Preloading Edit Summary in URL Source: https://github.com/wikimedia/mediawiki-extensions-discussiontools/blob/master/tests/cases/en-big-parsoid/en-big-parsoid.html Shows how to preload an edit summary in a MediaWiki URL by appending the `&summary=` parameter. The example demonstrates a direct link with a prefilled summary. ```html https://en.wikipedia.org/w/index.php?title=Wikipedia:Sandbox&action=edit&summary=foo%20bar ```